#include <epoxy/egl.h>#include <glib-object.h>#include "flutter/shell/platform/linux/fl_opengl_manager.h"Go to the source code of this file.
Functions | |
| G_BEGIN_DECLS FlGLFence * | fl_gl_fence_new (FlOpenGLManager *opengl_manager) |
| void | fl_gl_fence_wait (FlGLFence *fence) |
| G_BEGIN_DECLS FlGLFence* fl_gl_fence_new | ( | FlOpenGLManager * | opengl_manager | ) |
FlGLFence:
#FlGLFence marks a point in the OpenGL command stream that can be waited on, which is how rendering done in one context is made visible to another. Flushing a context only guarantees its commands have been submitted, not that they have completed, so a texture rendered in one context can't be used in another until a fence taken after the rendering has been reached. fl_gl_fence_new: @opengl_manager: an #FlOpenGLManager.
Creates a fence that is reached when the commands submitted to the current OpenGL context so far have completed. Requires the context that did the rendering to be current.
Only use this if fl_opengl_manager_can_fence() returns TRUE; drivers without fences have to fall back to waiting for the rendering to complete, e.g. with glFinish().
If the fence can't be created a warning is generated and an #FlGLFence that is not waited for is returned.
Returns: a new #FlGLFence.
Definition at line 50 of file fl_gl_fence.cc.
References fl_opengl_manager_can_wait_sync(), and fl_opengl_manager_get_display().
Referenced by TEST_F().
| void fl_gl_fence_wait | ( | FlGLFence * | fence | ) |
fl_gl_fence_wait: @fence: an #FlGLFence.
Makes the current OpenGL context wait for @fence before executing any commands submitted after this point. Requires the context that is going to use the rendered texture to be current.
This doesn't block the calling thread, the waiting is done by OpenGL. Falls back to blocking the calling thread if the driver can't wait this way.
Definition at line 84 of file fl_gl_fence.cc.
References client_wait().
Referenced by fl_subsurface_egl_present(), and TEST_F().