From: Matthias Clasen Date: Fri, 20 Oct 2023 01:43:35 +0000 (-0400) Subject: gsk: Use vertex arrays when we can X-Git-Tag: archive/raspbian/4.12.4+ds-3+rpi1^2~21^2^2~27^2 X-Git-Url: https://dgit.raspbian.org/?a=commitdiff_plain;h=a65dc12392c2dc3d00486686f846209411c95b3e;p=gtk4.git gsk: Use vertex arrays when we can Use the new has_vertex_arrays api to determine whether we can use vertex arrays in GL.` Fixes: #6173 --- diff --git a/gsk/gl/gskglcommandqueue.c b/gsk/gl/gskglcommandqueue.c index 0924b73993..8a6ad31fd7 100644 --- a/gsk/gl/gskglcommandqueue.c +++ b/gsk/gl/gskglcommandqueue.c @@ -1070,7 +1070,7 @@ gsk_gl_command_queue_execute (GskGLCommandQueue *self, glBlendFunc (GL_ONE, GL_ONE_MINUS_SRC_ALPHA); glBlendEquation (GL_FUNC_ADD); - if (!gdk_gl_context_get_use_es (self->context)) + if (gdk_gl_context_has_vertex_arrays (self->context)) { glGenVertexArrays (1, &vao_id); glBindVertexArray (vao_id); @@ -1257,7 +1257,7 @@ gsk_gl_command_queue_execute (GskGLCommandQueue *self, } glDeleteBuffers (1, &vbo_id); - if (!gdk_gl_context_get_use_es (self->context)) + if (gdk_gl_context_has_vertex_arrays (self->context)) glDeleteVertexArrays (1, &vao_id); gdk_profiler_set_int_counter (self->metrics.n_binds, n_binds);