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

Unified Diff: ui/gl/gl_fence_arb.cc

Issue 2087403003: Add an Invalidate method to GLFence. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 6 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_arb.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_arb.cc
diff --git a/ui/gl/gl_fence_arb.cc b/ui/gl/gl_fence_arb.cc
index 88c6f67887fb63123cd2764171df383ce0134a91..a1ade666565bc620333af6114400fdd3b1486971 100644
--- a/ui/gl/gl_fence_arb.cc
+++ b/ui/gl/gl_fence_arb.cc
@@ -61,8 +61,14 @@ void GLFenceARB::ServerWait() {
}
GLFenceARB::~GLFenceARB() {
- DCHECK_EQ(GL_TRUE, glIsSync(sync_));
- glDeleteSync(sync_);
+ if (sync_) {
+ DCHECK_EQ(GL_TRUE, glIsSync(sync_));
+ glDeleteSync(sync_);
+ }
+}
+
+void GLFenceARB::Invalidate() {
+ sync_ = 0;
}
} // namespace gl
« no previous file with comments | « ui/gl/gl_fence_arb.h ('k') | ui/gl/gl_fence_nv.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698