Ticket Created

CIQQA-1151

clearClip is almost 4 more times expensive then setClip

setClip should contain clearClip becouse there is no multiply clips

Parents
  • That is surprising since clearClip calls setClip internally and does nothing else. Internally, setClip does some additional work if the dc is not a buffered bitmap.

    When using a buffered bitmap, I see dc.setClip is about half the cost of dc.clearClip. This makes sense to me as dc.setClip is native and just sets a few variables so the cost is very small. The call to dc.clearClip is that plus stack management time (pushing 4 values on the stack and popping them from the stack). I could be wrong here, but it does seem to make sense to me.

    That said, I don't understand what you mean by this...

    setClip should contain clearClip becouse there is no multiply clips

Comment
  • That is surprising since clearClip calls setClip internally and does nothing else. Internally, setClip does some additional work if the dc is not a buffered bitmap.

    When using a buffered bitmap, I see dc.setClip is about half the cost of dc.clearClip. This makes sense to me as dc.setClip is native and just sets a few variables so the cost is very small. The call to dc.clearClip is that plus stack management time (pushing 4 values on the stack and popping them from the stack). I could be wrong here, but it does seem to make sense to me.

    That said, I don't understand what you mean by this...

    setClip should contain clearClip becouse there is no multiply clips

Children