summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHermet Park <hermetpark@gmail.com>2019-09-23 21:12:07 +0900
committerMike Blumenkrantz <zmike@samsung.com>2019-10-04 09:26:35 -0400
commitcddac9a4de1b55c432074c4c792551ecb6dd8142 (patch)
tree9cefe185622f1fed612d415b99bd00b176d982c4
parentf0674a4b8560a6ca44c16c80414f91ab695376a0 (diff)
ector engine: +null checking.
Null pixels is allowed when drawing region is 0, In that case, the pixel buffer can be destroyed earlier by vg. @fix
-rw-r--r--src/modules/evas/engines/software_generic/evas_engine.c15
1 files changed, 9 insertions, 6 deletions
diff --git a/src/modules/evas/engines/software_generic/evas_engine.c b/src/modules/evas/engines/software_generic/evas_engine.c
index 0504980f86..0f2cfea165 100644
--- a/src/modules/evas/engines/software_generic/evas_engine.c
+++ b/src/modules/evas/engines/software_generic/evas_engine.c
@@ -4397,12 +4397,15 @@ _draw_thread_ector_surface_set(void *data)
4397 if (surface) 4397 if (surface)
4398 { 4398 {
4399 pixels = evas_cache_image_pixels(&surface->cache_entry); 4399 pixels = evas_cache_image_pixels(&surface->cache_entry);
4400 w = surface->cache_entry.w; 4400 if (pixels)
4401 h = surface->cache_entry.h; 4401 {
4402 x = ector_surface->x; 4402 w = surface->cache_entry.w;
4403 y = ector_surface->y; 4403 h = surface->cache_entry.h;
4404 // clear the surface before giving to ector 4404 x = ector_surface->x;
4405 if (ector_surface->clear) memset(pixels, 0, (w * h * 4)); 4405 y = ector_surface->y;
4406 // clear the surface before giving to ector
4407 if (ector_surface->clear) memset(pixels, 0, (w * h * 4));
4408 }
4406 } 4409 }
4407 4410
4408 ector_buffer_pixels_set(ector_surface->ector, pixels, w, h, 0, EFL_GFX_COLORSPACE_ARGB8888, EINA_TRUE); 4411 ector_buffer_pixels_set(ector_surface->ector, pixels, w, h, 0, EFL_GFX_COLORSPACE_ARGB8888, EINA_TRUE);