evas cutouts - quickly avoid huge per issues with large nos of cutouts
authorCarsten Haitzler (Rasterman) <raster@rasterman.com>
Fri, 30 Dec 2016 09:55:55 +0000 (18:55 +0900)
committerCarsten Haitzler (Rasterman) <raster@rasterman.com>
Mon, 2 Jan 2017 09:53:56 +0000 (18:53 +0900)
commitb0530aba4f777352cc3ae9772fb1d22f598679a5
tree38537cbffe97e5fd1fc2b94209fcc8c66a0d1167
parent5a9c6d393aeda99d2691953dc978ec8b5f905fa7
evas cutouts - quickly avoid huge per issues with large nos of cutouts

i found evas_common_draw_context_apply_cutouts() was procsessing 300+
cutouts and as it's O(n^2)/2 to try and merge adjacent rects for
cutouts this really performs like complete junk. we apply cutout rects
a LOT. this is not the best solution, but it's quick and much faster
than doing the clipouts which drop framerate to like 1-2fps or so in the
nasty case i say (tyls -m of photos in a dir with a 2160 high
terminal).

this figures out the target area to limit the count of rects
significantly so O(n^2) is far far better when n is now < 10 most of
the time. and for the few operations where it's a high value this now
uses qsort to speed up merges etc. etc.

@optimize
src/lib/evas/canvas/evas_object_text.c
src/lib/evas/canvas/evas_object_textblock.c
src/lib/evas/canvas/evas_object_textgrid.c
src/lib/evas/canvas/evas_render.c
src/lib/evas/common/evas_draw.h
src/lib/evas/common/evas_draw_main.c
src/lib/evas/include/evas_common_private.h
src/lib/evas/include/evas_private.h
src/modules/evas/engines/software_generic/evas_engine.c