Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(2)

Unified Diff: ui/gl/gl_fence.cc

Issue 180723023: gpu: Mailbox emulation with EGLImage (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: ui/gl/gl_fence.cc
diff --git a/ui/gl/gl_fence.cc b/ui/gl/gl_fence.cc
index 9b85300fabdbc10e7ecf27685930a7b55f1a2408..d8482a7e2b00c3196608020205c392d226a4adb0 100644
--- a/ui/gl/gl_fence.cc
+++ b/ui/gl/gl_fence.cc
@@ -36,6 +36,10 @@ class GLFenceNVFence: public gfx::GLFence {
glFinishFenceNV(fence_);
}
+ virtual void ServerWait() OVERRIDE {
+ glFinishFenceNV(fence_);
+ }
+
private:
virtual ~GLFenceNVFence() {
glDeleteFencesNV(1, &fence_);
@@ -66,6 +70,10 @@ class GLFenceARBSync: public gfx::GLFence {
glClientWaitSync(sync_, GL_SYNC_FLUSH_COMMANDS_BIT, GL_TIMEOUT_IGNORED);
}
+ virtual void ServerWait() OVERRIDE {
+ glWaitSync(sync_, 0, GL_TIMEOUT_IGNORED);
+ }
+
private:
virtual ~GLFenceARBSync() {
glDeleteSync(sync_);
@@ -96,6 +104,12 @@ class EGLFenceSync : public gfx::GLFence {
eglClientWaitSyncKHR(display_, sync_, flags, time);
}
+ virtual void ServerWait() OVERRIDE {
+ EGLint flags = 0;
+ eglWaitSyncKHR(display_, sync_, flags);
+ }
+
+
private:
virtual ~EGLFenceSync() {
eglDestroySyncKHR(display_, sync_);

Powered by Google App Engine
This is Rietveld 408576698