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

Unified Diff: ui/gl/gl_fence_nv.cc

Issue 1637293002: Reuse GLFenceNV when an existing CommandsCompletedQuery is reused (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Moved ResetSupported check into a separate function Created 4 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_nv.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_fence_nv.cc
diff --git a/ui/gl/gl_fence_nv.cc b/ui/gl/gl_fence_nv.cc
index 0e23b283458fd71c0404e5806403c79003a15c08..df972bd4b5ef781dd90a6bdefdf3e0858b892717 100644
--- a/ui/gl/gl_fence_nv.cc
+++ b/ui/gl/gl_fence_nv.cc
@@ -20,6 +20,14 @@ GLFenceNV::GLFenceNV() {
// they are bound, in that they acquire their state upon binding.
// We will arbitrarily return TRUE for consistency.
glGenFencesNV(1, &fence_);
+ ResetState();
+}
+
+bool GLFenceNV::ResetSupported() {
+ return true;
+}
+
+void GLFenceNV::ResetState() {
glSetFenceNV(fence_, GL_ALL_COMPLETED_NV);
DCHECK(glIsFenceNV(fence_));
glFlush();
« no previous file with comments | « ui/gl/gl_fence_nv.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698