summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorJean-Philippe Andre <jp.andre@samsung.com>2014-02-07 16:06:46 +0900
committerJean-Philippe Andre <jp.andre@samsung.com>2014-02-07 17:59:23 +0900
commit9917962ffbd72f38e0465830ab902c0ba308ff81 (patch)
tree97f0ed8fa35a4fbe9db588f715074a01a5108cd6 /src
parent637416d62ea90de25aa457197bdaaaca15206a66 (diff)
Evas filters: Fix crash when using the GL backend
Buffer management was broken, and we tried to free the GL texture as if it were a simple RGBA_Image.
Diffstat (limited to 'src')
-rw-r--r--src/lib/evas/filters/evas_filter.c20
-rw-r--r--src/lib/evas/filters/evas_filter_utils.c5
2 files changed, 20 insertions, 5 deletions
diff --git a/src/lib/evas/filters/evas_filter.c b/src/lib/evas/filters/evas_filter.c
index 215f88fdef..0e2703c74d 100644
--- a/src/lib/evas/filters/evas_filter.c
+++ b/src/lib/evas/filters/evas_filter.c
@@ -436,9 +436,11 @@ evas_filter_context_buffers_allocate_all(Evas_Filter_Context *ctx,
436 ie = fb->backing; 436 ie = fb->backing;
437 if (ie) 437 if (ie)
438 { 438 {
439 // Not checking for async. It's also safe for sync rendering. 439 if (ctx->async)
440 ie->references++; 440 {
441 evas_unref_queue_image_put(ctx->evas, ie); 441 ie->references++;
442 evas_unref_queue_image_put(ctx->evas, ie);
443 }
442 continue; 444 continue;
443 } 445 }
444 446
@@ -648,10 +650,22 @@ evas_filter_buffer_backing_release(Evas_Filter_Context *ctx, void *stolen_buffer
648 } 650 }
649 return EINA_TRUE; 651 return EINA_TRUE;
650 } 652 }
653 else if (fb->glimage == stolen_buffer)
654 {
655 fb->stolen = EINA_FALSE;
656 if (fb->delete_me)
657 {
658 ENFN->image_free(ENDT, stolen_buffer);
659 free(fb);
660 }
661 return EINA_TRUE;
662 }
651 } 663 }
652 664
653 if (ctx->async) 665 if (ctx->async)
654 evas_unref_queue_image_put(ctx->evas, ie); 666 evas_unref_queue_image_put(ctx->evas, ie);
667 else if (ctx->gl_engine)
668 ENFN->image_free(ENDT, stolen_buffer);
655 else 669 else
656 _backing_free(ctx, ie); 670 _backing_free(ctx, ie);
657 671
diff --git a/src/lib/evas/filters/evas_filter_utils.c b/src/lib/evas/filters/evas_filter_utils.c
index 7ef552fb9e..988ed297cc 100644
--- a/src/lib/evas/filters/evas_filter_utils.c
+++ b/src/lib/evas/filters/evas_filter_utils.c
@@ -34,9 +34,10 @@ evas_filter_buffer_scaled_get(Evas_Filter_Context *ctx,
34 return NULL; 34 return NULL;
35 } 35 }
36 36
37 // FIXME: Not supported on GL engine. HAHAHAHAHA 37 // FIXME: Not supported on GL engine.
38 // Yeah, we need to call the CPU scaling functions and not the engine.
38 if (ctx->gl_engine) 39 if (ctx->gl_engine)
39 CRI("Support not implemened yet. lol yeah"); 40 CRI("Support for stretching not implemened yet for GL.");
40 41
41 if (!src->alpha_only) 42 if (!src->alpha_only)
42 { 43 {