summaryrefslogtreecommitdiff
path: root/src/lib
diff options
context:
space:
mode:
authorHermet Park <hermetpark@gmail.com>2019-08-08 23:28:18 +0900
committerHermet Park <hermetpark@gmail.com>2019-08-08 23:30:20 +0900
commit49343b628afaf776c38871fe8270f56ad4a1ed1d (patch)
tree8cf9c06f6cd3cc14f07fc823662afd555eb2e463 /src/lib
parent090588f58b61527a03970f772b44ab447340a717 (diff)
evas vg: ++safety.
Realloc internal composite buffer if its size is invalid.
Diffstat (limited to 'src/lib')
-rw-r--r--src/lib/evas/canvas/efl_canvas_vg_object.c18
1 files changed, 18 insertions, 0 deletions
diff --git a/src/lib/evas/canvas/efl_canvas_vg_object.c b/src/lib/evas/canvas/efl_canvas_vg_object.c
index 1d932012ce..56f892023b 100644
--- a/src/lib/evas/canvas/efl_canvas_vg_object.c
+++ b/src/lib/evas/canvas/efl_canvas_vg_object.c
@@ -403,6 +403,24 @@ _evas_vg_render(Evas_Object_Protected_Data *obj, Efl_Canvas_Vg_Object_Data *pd,
403 403
404 if (alpha < 255) 404 if (alpha < 255)
405 { 405 {
406 //Replace with a new size.
407 if (cd->blend_buffer)
408 {
409 int w2, h2;
410 ector_buffer_size_get(cd->blend_buffer, &w2, &h2);
411
412 if (w2 != w || h2 != h)
413 {
414 if (cd->blend_pixels)
415 {
416 free(cd->blend_pixels);
417 cd->blend_pixels = NULL;
418 }
419 efl_unref(cd->blend_buffer);
420 cd->blend_buffer = NULL;
421 }
422 }
423
406 // Reuse buffer 424 // Reuse buffer
407 if (!cd->blend_pixels) 425 if (!cd->blend_pixels)
408 cd->blend_pixels = calloc(w * h, sizeof(uint32_t*)); 426 cd->blend_pixels = calloc(w * h, sizeof(uint32_t*));