path: root/src/lib/evas/include/evas_common_private.h
diff options
authorCarsten Haitzler (Rasterman) <>2016-12-30 18:55:55 +0900
committerCarsten Haitzler (Rasterman) <>2017-01-02 18:53:56 +0900
commitb0530aba4f777352cc3ae9772fb1d22f598679a5 (patch)
tree38537cbffe97e5fd1fc2b94209fcc8c66a0d1167 /src/lib/evas/include/evas_common_private.h
parent5a9c6d393aeda99d2691953dc978ec8b5f905fa7 (diff)
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
Diffstat (limited to 'src/lib/evas/include/evas_common_private.h')
1 files changed, 3 insertions, 0 deletions
diff --git a/src/lib/evas/include/evas_common_private.h b/src/lib/evas/include/evas_common_private.h
index 9311e2ce7d..1fa8ae3293 100644
--- a/src/lib/evas/include/evas_common_private.h
+++ b/src/lib/evas/include/evas_common_private.h
@@ -757,6 +757,9 @@ struct _RGBA_Draw_Context
757 } clip; 757 } clip;
758 Cutout_Rects cutout; 758 Cutout_Rects cutout;
759 struct { 759 struct {
760 int x, y, w, h;
761 } cutout_target;
762 struct {
760 Cutout_Rects *rects; 763 Cutout_Rects *rects;
761 int used; 764 int used;
762 } cache; 765 } cache;