[gtk/matthiasc/for-master: 2/2] gsk: Fall back to cairo if compiling shaders fails
- From: Matthias Clasen <matthiasc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk/matthiasc/for-master: 2/2] gsk: Fall back to cairo if compiling shaders fails
- Date: Fri, 17 Apr 2020 17:43:16 +0000 (UTC)
commit c92079696748c0185a26452c3c503b024e8ca8ec
Author: Matthias Clasen <mclasen redhat com>
Date: Fri Apr 17 12:35:37 2020 -0400
gsk: Fall back to cairo if compiling shaders fails
There was already some fallback in place here, but
in other places we were just asserting.
gsk/gl/gskglrenderer.c | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
---
diff --git a/gsk/gl/gskglrenderer.c b/gsk/gl/gskglrenderer.c
index a706f0c18e..c1fa55c2dd 100644
--- a/gsk/gl/gskglrenderer.c
+++ b/gsk/gl/gskglrenderer.c
@@ -50,7 +50,11 @@
G_STMT_START{\
programs->program_name ## _program.program_name.uniform_basename ## _location = \
glGetUniformLocation(programs->program_name ## _program.id, "u_"
#uniform_basename);\
- g_assert_cmpint (programs->program_name ## _program.program_name.uniform_basename ##
_location, >, -1); \
+ if (programs->program_name ## _program.program_name.uniform_basename ## _location == -1) \
+ { \
+ g_clear_pointer (&programs, gsk_gl_renderer_programs_unref); \
+ goto out; \
+ } \
}G_STMT_END
#define INIT_COMMON_UNIFORM_LOCATION(program_ptr, uniform_basename) \
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]