diff options
author | Mike Blumenkrantz <zmike@osg.samsung.com> | 2016-05-05 10:38:31 -0400 |
---|---|---|
committer | Mike Blumenkrantz <zmike@osg.samsung.com> | 2016-05-05 10:49:30 -0400 |
commit | 217551e92be2813fc8f847686bfaa7751b545ddb (patch) | |
tree | b2179874f4307712aa3831aebc39721f65432cf3 | |
parent | fa66ce28ec4c7fba739d075535868d584cc0b658 (diff) |
wayland_egl: ensure gl context destruction when unsetting wl_display
extra refcounting during setup in this case will prevent the context
destruction, leading to a dead gl context which is unable to render
-rw-r--r-- | src/modules/evas/engines/wayland_egl/evas_engine.c | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/src/modules/evas/engines/wayland_egl/evas_engine.c b/src/modules/evas/engines/wayland_egl/evas_engine.c index 4945a70c59..1252e91442 100644 --- a/src/modules/evas/engines/wayland_egl/evas_engine.c +++ b/src/modules/evas/engines/wayland_egl/evas_engine.c | |||
@@ -726,8 +726,14 @@ eng_setup(Evas *evas, void *info) | |||
726 | (ob->info->info.screen != ob->screen) || | 726 | (ob->info->info.screen != ob->screen) || |
727 | (ob->info->info.destination_alpha != ob->alpha)) | 727 | (ob->info->info.destination_alpha != ob->alpha)) |
728 | { | 728 | { |
729 | ob->gl_context->references++; | ||
730 | gl_wins--; | 729 | gl_wins--; |
730 | if (!ob->info->info.display) | ||
731 | { | ||
732 | eng_window_free(re->generic.software.ob); | ||
733 | re->generic.software.ob = NULL; | ||
734 | epd->engine.data.output = NULL; | ||
735 | goto ob_err; | ||
736 | } | ||
731 | 737 | ||
732 | ob = eng_window_new(evas, inf, epd->output.w, epd->output.h, swap_mode); | 738 | ob = eng_window_new(evas, inf, epd->output.w, epd->output.h, swap_mode); |
733 | if (!ob) goto ob_err; | 739 | if (!ob) goto ob_err; |
@@ -737,7 +743,6 @@ eng_setup(Evas *evas, void *info) | |||
737 | evas_render_engine_software_generic_update(&re->generic.software, ob, | 743 | evas_render_engine_software_generic_update(&re->generic.software, ob, |
738 | epd->output.w, epd->output.h); | 744 | epd->output.w, epd->output.h); |
739 | gl_wins++; | 745 | gl_wins++; |
740 | eng_get_ob(re)->gl_context->references--; | ||
741 | } | 746 | } |
742 | else if ((ob->w != epd->output.w) || (ob->h != epd->output.h) || | 747 | else if ((ob->w != epd->output.w) || (ob->h != epd->output.h) || |
743 | (ob->info->info.rotation != ob->rot)) | 748 | (ob->info->info.rotation != ob->rot)) |