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

Unified Diff: ui/gl/gl_gl_api_implementation.cc

Issue 197563003: gpu: Allow fences to check whether a flush has occurred (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: line brk 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
« no previous file with comments | « ui/gl/gl_gl_api_implementation.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/gl/gl_gl_api_implementation.cc
diff --git a/ui/gl/gl_gl_api_implementation.cc b/ui/gl/gl_gl_api_implementation.cc
index f925f64ffa88af185c41ca880c09a484e094706d..0965d91b45dab518fd9a0c34778e1817e3fa2f96 100644
--- a/ui/gl/gl_gl_api_implementation.cc
+++ b/ui/gl/gl_gl_api_implementation.cc
@@ -343,6 +343,11 @@ void GLApiBase::InitializeBase(DriverGL* driver) {
driver_ = driver;
}
+void GLApiBase::SignalFlush() {
+ DCHECK(GLContext::GetCurrent());
+ GLContext::GetCurrent()->OnFlush();
+}
+
RealGLApi::RealGLApi() {
}
@@ -353,6 +358,16 @@ void RealGLApi::Initialize(DriverGL* driver) {
InitializeBase(driver);
}
+void RealGLApi::glFlushFn() {
+ GLApiBase::glFlushFn();
+ GLApiBase::SignalFlush();
+}
+
+void RealGLApi::glFinishFn() {
+ GLApiBase::glFinishFn();
+ GLApiBase::SignalFlush();
+}
+
TraceGLApi::~TraceGLApi() {
}
@@ -445,4 +460,14 @@ const GLubyte* VirtualGLApi::glGetStringFn(GLenum name) {
}
}
+void VirtualGLApi::glFlushFn() {
+ GLApiBase::glFlushFn();
+ GLApiBase::SignalFlush();
+}
+
+void VirtualGLApi::glFinishFn() {
+ GLApiBase::glFinishFn();
+ GLApiBase::SignalFlush();
+}
+
} // namespace gfx
« no previous file with comments | « ui/gl/gl_gl_api_implementation.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698