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

Unified Diff: ui/gl/gl_fence_apple.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_apple.h ('k') | ui/gl/gl_fence_arb.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/gl/gl_fence_apple.cc
diff --git a/ui/gl/gl_fence_apple.cc b/ui/gl/gl_fence_apple.cc
index 52f62c748a31fbf1a86a71aaec07e0916f769a59..0a53f493bd6b1daeaa1937df2f6f211edfce8207 100644
--- a/ui/gl/gl_fence_apple.cc
+++ b/ui/gl/gl_fence_apple.cc
@@ -31,8 +31,14 @@ void GLFenceAPPLE::ServerWait() {
}
GLFenceAPPLE::~GLFenceAPPLE() {
- DCHECK(glIsFenceAPPLE(fence_));
- glDeleteFencesAPPLE(1, &fence_);
+ if (fence_) {
+ DCHECK(glIsFenceAPPLE(fence_));
+ glDeleteFencesAPPLE(1, &fence_);
+ }
+}
+
+void GLFenceAPPLE::Invalidate() {
+ fence_ = 0;
}
} // namespace gl
« no previous file with comments | « ui/gl/gl_fence_apple.h ('k') | ui/gl/gl_fence_arb.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698