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

  • I use a lot of clips to separate regions and especially for text because there is problem with fonts when in one sets you have different size of chars (it's drawn vertical background colour in no transparent mode).

    You have to clip if data coming from user or the Internet and you don't know what will be displayed.

    But it doesn't matter bug is bug. But this data are from profiler and I hope, maybe they are on real but proportional when on device.

    In this case I can setClip(0,0,width,height) instead clearClip

  • If you are only using onPartialUpdate() for seconds, there is only one clip region, but it's not uncommon to also use this for heart rate, so more than one.

    Whileyou want to do setClip in onPartialUpdate, you only need to do the clearClip in onUpdate, so most times once a minute vs once a second

  • no multiply clips

                    dc.setColor(0, 0);
                    dc.fillRectangle(0,0,260,260);
                    dc.setClip(100, 50, 50, 10);
                    dc.setClip(100,150, 50, 10);
                    dc.setColor(0xFFFFFF, 0);
                    dc.fillRectangle(0,0,260,260);