glarea: Synchronize
Create a fence object and pass it along when creating the GL texture, so that the GL renderer can wait for the texture to be ready.
This commit is contained in:
@@ -32,6 +32,7 @@
|
||||
#include "gtksnapshot.h"
|
||||
#include "gtkrenderlayoutprivate.h"
|
||||
#include "gtkcssnodeprivate.h"
|
||||
#include "gdk/gdkgltextureprivate.h"
|
||||
|
||||
#include <epoxy/gl.h>
|
||||
|
||||
@@ -760,6 +761,8 @@ gtk_gl_area_snapshot (GtkWidget *widget,
|
||||
priv->texture = NULL;
|
||||
priv->textures = g_list_prepend (priv->textures, texture);
|
||||
|
||||
gdk_gl_texture_builder_set_sync (texture->builder, glFenceSync (GL_SYNC_GPU_COMMANDS_COMPLETE, 0));
|
||||
|
||||
texture->holder = gdk_gl_texture_builder_build (texture->builder,
|
||||
release_texture,
|
||||
texture);
|
||||
|
||||
Reference in New Issue
Block a user