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
This commit is contained in:
Matthias Clasen 2023-10-19 21:43:35 -04:00
parent b8ffceaebb
commit 000c876953

View File

@ -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);