diff options
author | Matthias Clasen <mclasen@redhat.com> | 2020-04-17 12:35:37 -0400 |
---|---|---|
committer | Matthias Clasen <mclasen@redhat.com> | 2020-04-17 13:42:33 -0400 |
commit | c92079696748c0185a26452c3c503b024e8ca8ec (patch) | |
tree | e90dd5b6c54d45be44eeced608ca78b0830c710f /gsk | |
parent | 908590e032fbd80d9f86445c4f330b10d4e60564 (diff) | |
download | gtk+-c92079696748c0185a26452c3c503b024e8ca8ec.tar.gz |
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.
Diffstat (limited to 'gsk')
-rw-r--r-- | gsk/gl/gskglrenderer.c | 6 |
1 files changed, 5 insertions, 1 deletions
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) \ |