summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorVincent Torri <vincent.torri@gmail.com>2017-08-13 21:08:53 +0200
committerCedric BAIL <cedric@osg.samsung.com>2017-08-14 10:16:05 -0700
commitff0d8ef0a418c334b1e8abbf83d9fab281937a3e (patch)
tree6c8df6a4485de2a932e18406432460b2f2ac93f9
parent87c9b111d1bbf4988caead460710a3481911cd81 (diff)
downloadefl-ff0d8ef0a418c334b1e8abbf83d9fab281937a3e.tar.gz
evas GDI engine: improve speed
expedite mean value goes from ~125 to ~205 Signed-off-by: Cedric BAIL <cedric@osg.samsung.com>
-rw-r--r--src/modules/evas/engines/software_gdi/evas_outbuf.c21
1 files changed, 6 insertions, 15 deletions
diff --git a/src/modules/evas/engines/software_gdi/evas_outbuf.c b/src/modules/evas/engines/software_gdi/evas_outbuf.c
index e58692e16b..5ec4443e16 100644
--- a/src/modules/evas/engines/software_gdi/evas_outbuf.c
+++ b/src/modules/evas/engines/software_gdi/evas_outbuf.c
@@ -17,7 +17,6 @@ _find_gdiob(HDC dc, BITMAPINFO_GDI *bitmap_info, int depth, int w, int h, void *
int sz;
int lbytes;
int bpp;
- int fitness = 0x7fffffff;
bpp = depth >> 3;
if (bpp == 3) bpp = 4;
@@ -25,28 +24,18 @@ _find_gdiob(HDC dc, BITMAPINFO_GDI *bitmap_info, int depth, int w, int h, void *
sz = lbytes * h;
EINA_LIST_FOREACH(gdipool, l, gdiob2)
{
- int szdif;
-
if ((gdiob2->dc != dc) ||
(gdiob2->bitmap_info != bitmap_info) ||
(gdiob2->depth != depth))
continue;
- szdif = gdiob2->psize - sz;
- if (szdif < 0) continue;
- if (szdif == 0)
+ if (gdiob2->psize == sz)
{
gdiob = gdiob2;
gdil = l;
goto have_gdiob;
}
- if (szdif < fitness)
- {
- fitness = szdif;
- gdiob = gdiob2;
- gdil = l;
- }
}
- if ((fitness > (100 * 100)) || (!gdiob))
+ if (!gdiob)
return evas_software_gdi_output_buffer_new(dc, bitmap_info, depth, w, h, data);
have_gdiob:
@@ -319,8 +308,10 @@ evas_software_gdi_outbuf_new_region_for_update(Outbuf *buf,
/* w, h, NULL); */
}
if ((buf->priv.gdi.region) || (buf->priv.destination_alpha))
- /* FIXME: faster memset! */
- memset(im->image.data, 0, w * h * sizeof(DATA32));
+ {
+ /* FIXME: faster memset! */
+ /* memset(im->image.data, 0, w * h * sizeof(DATA32)); */
+ }
buf->priv.pending_writes = eina_list_append(buf->priv.pending_writes, im);
return im;