From 545161d9546d1a80ca5ffd31cbc3b4d0cae335f8 Mon Sep 17 00:00:00 2001 From: Hermet Park Date: Wed, 21 Sep 2016 13:06:18 +0900 Subject: [PATCH] Revert "evas engine: return as soon as possible if the surface or context is not valid." This reverts commit 2f158ebe65cc3d007c1eae0e25590f092931ee25. misunderstood ^ operator. pinged by jpeg. previous code was correct. --- src/modules/evas/engines/software_generic/evas_engine.c | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/src/modules/evas/engines/software_generic/evas_engine.c b/src/modules/evas/engines/software_generic/evas_engine.c index 9999361..62ad71a 100644 --- a/src/modules/evas/engines/software_generic/evas_engine.c +++ b/src/modules/evas/engines/software_generic/evas_engine.c @@ -3655,14 +3655,18 @@ eng_gl_make_current(void *data EINA_UNUSED, void *surface, void *context) _tls_check(); - if ((!sfc) || (!ctx)) + if ((!sfc) ^ (!ctx)) { ERR("Evas GL on SW engine does not support surfaceless contexts."); + return 0; + } - // Unset surface/context + // Unset surface/context + if ((!sfc) && (!ctx)) + { eina_tls_set(gl_current_ctx_key, NULL); eina_tls_set(gl_current_sfc_key, NULL); - return 0; + return 1; } // Initialize Context if it hasn't been. -- 2.7.4