Ticket Created
over 3 years ago

CIQQA-1151

clearClip is almost 4 more times expensive then setClip

setClip should contain clearClip becouse there is no multiply clips

  • You really only want to only use setClip in onPartialUpdate.  There is no need for it in onUpdate.

  • 1. bug is bug Slight smile

    2. yes I can and even I do it and even I have to do it but use setClip(device_size) instead of clearlip() - first usage setClip practically force tu use somewhen clearClip

    3. if you see my WF you surly will know that it isn't only one drawing but drawing in loop - it's not enough to clearClip only once - practically I have to clearclip after each of controls because I don't know if next control call setClip or not (there are some IF's).

  • You can set multiple clip regions, update each one, and the only do the clear clip later.

  • I didn't  know that clearClip do nothing except setClip(device_size) so thought setClip has to call cleraClip first to do do some work so it means setClip has to be more expensive.

  • 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