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

Unified Diff: ui/gfx/compositor/compositor_gl.cc

Issue 8463018: Use ScopedMakeCurrent (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Address reviewer comments Created 9 years, 1 month 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/gfx/compositor/compositor_gl.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/gfx/compositor/compositor_gl.cc
diff --git a/ui/gfx/compositor/compositor_gl.cc b/ui/gfx/compositor/compositor_gl.cc
index 078556bd5126ce03016f3a4df0d15d69d753803c..4134687a57b0dee5abcad501900b15f9c4bf1f58 100644
--- a/ui/gfx/compositor/compositor_gl.cc
+++ b/ui/gfx/compositor/compositor_gl.cc
@@ -342,15 +342,12 @@ void SharedResourcesGL::Destroy() {
initialized_ = false;
}
-bool SharedResourcesGL::MakeSharedContextCurrent() {
- if (!initialized_)
- return false;
- else
- return context_->MakeCurrent(surface_.get());
-}
-
gfx::ScopedMakeCurrent* SharedResourcesGL::GetScopedMakeCurrent() {
- return new gfx::ScopedMakeCurrent(context_.get(), surface_.get());
+ DCHECK(initialized_);
+ if (initialized_)
+ return new gfx::ScopedMakeCurrent(context_.get(), surface_.get());
+ else
+ return NULL;
}
scoped_refptr<gfx::GLContext> SharedResourcesGL::CreateContext(
« no previous file with comments | « ui/gfx/compositor/compositor_gl.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698