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

Unified Diff: ui/gl/gl_fence_nv.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_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 750d47695529a39af6892e89d5179c6bbdd3cb38..7a856c399926d75db709bd89c7371e24fcdbd9bc 100644
--- a/ui/gl/gl_fence_nv.cc
+++ b/ui/gl/gl_fence_nv.cc
@@ -49,8 +49,14 @@ void GLFenceNV::ServerWait() {
}
GLFenceNV::~GLFenceNV() {
- DCHECK(glIsFenceNV(fence_));
- glDeleteFencesNV(1, &fence_);
+ if (fence_) {
+ DCHECK(glIsFenceNV(fence_));
+ glDeleteFencesNV(1, &fence_);
+ }
+}
+
+void GLFenceNV::Invalidate() {
+ fence_ = 0;
}
} // namespace gl
« 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