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

Unified Diff: ui/gl/gl_fence_egl.cc

Issue 898543002: Remove GLFence::CreateWithoutFlush (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: remove flush event Created 5 years, 11 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
« no previous file with comments | « ui/gl/gl_fence_egl.h ('k') | ui/gl/gl_fence_nv.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/gl/gl_fence_egl.cc
diff --git a/ui/gl/gl_fence_egl.cc b/ui/gl/gl_fence_egl.cc
index c96d6d8157dea1b5c9c5f1915e6149d5379ca316..277b631fff8c4cb073a11cbdc04be72a40369eb2 100644
--- a/ui/gl/gl_fence_egl.cc
+++ b/ui/gl/gl_fence_egl.cc
@@ -6,19 +6,14 @@
#include "ui/gl/egl_util.h"
#include "ui/gl/gl_bindings.h"
-#include "ui/gl/gl_context.h"
namespace gfx {
-GLFenceEGL::GLFenceEGL(bool flush) {
+GLFenceEGL::GLFenceEGL() {
display_ = eglGetCurrentDisplay();
sync_ = eglCreateSyncKHR(display_, EGL_SYNC_FENCE_KHR, NULL);
DCHECK(sync_ != EGL_NO_SYNC_KHR);
- if (flush) {
- glFlush();
- } else {
- flush_event_ = GLContext::GetCurrent()->SignalFlush();
- }
+ glFlush();
}
bool GLFenceEGL::HasCompleted() {
@@ -35,17 +30,13 @@ bool GLFenceEGL::HasCompleted() {
}
void GLFenceEGL::ClientWait() {
- if (!flush_event_.get() || flush_event_->IsSignaled()) {
- EGLint flags = 0;
- EGLTimeKHR time = EGL_FOREVER_KHR;
- EGLint result = eglClientWaitSyncKHR(display_, sync_, flags, time);
- DCHECK_NE(EGL_TIMEOUT_EXPIRED_KHR, result);
- if (result == EGL_FALSE) {
- LOG(FATAL) << "Failed to wait for EGLSync. error:"
- << ui::GetLastEGLErrorString();
- }
- } else {
- LOG(ERROR) << "Trying to wait for uncommitted fence. Skipping...";
+ EGLint flags = 0;
+ EGLTimeKHR time = EGL_FOREVER_KHR;
+ EGLint result = eglClientWaitSyncKHR(display_, sync_, flags, time);
+ DCHECK_NE(EGL_TIMEOUT_EXPIRED_KHR, result);
+ if (result == EGL_FALSE) {
+ LOG(FATAL) << "Failed to wait for EGLSync. error:"
+ << ui::GetLastEGLErrorString();
}
}
@@ -54,14 +45,10 @@ void GLFenceEGL::ServerWait() {
ClientWait();
return;
}
- if (!flush_event_.get() || flush_event_->IsSignaled()) {
- EGLint flags = 0;
- if (eglWaitSyncKHR(display_, sync_, flags) == EGL_FALSE) {
- LOG(FATAL) << "Failed to wait for EGLSync. error:"
- << ui::GetLastEGLErrorString();
- }
- } else {
- LOG(ERROR) << "Trying to wait for uncommitted fence. Skipping...";
+ EGLint flags = 0;
+ if (eglWaitSyncKHR(display_, sync_, flags) == EGL_FALSE) {
+ LOG(FATAL) << "Failed to wait for EGLSync. error:"
+ << ui::GetLastEGLErrorString();
}
}
« no previous file with comments | « ui/gl/gl_fence_egl.h ('k') | ui/gl/gl_fence_nv.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698