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

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

Issue 8463018: Use ScopedMakeCurrent (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: "" 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_cc.h ('k') | ui/gfx/compositor/compositor_gl.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/gfx/compositor/compositor_cc.cc
diff --git a/ui/gfx/compositor/compositor_cc.cc b/ui/gfx/compositor/compositor_cc.cc
index 6649f38c2fe15f7dab7a1a10178ede0c3f224a4e..fb9a470d5c2e696a3ce7315cb03244809e654780 100644
--- a/ui/gfx/compositor/compositor_cc.cc
+++ b/ui/gfx/compositor/compositor_cc.cc
@@ -11,6 +11,7 @@
#include "ui/gfx/gl/gl_context.h"
#include "ui/gfx/gl/gl_surface.h"
#include "ui/gfx/gl/gl_implementation.h"
+#include "ui/gfx/gl/scoped_make_current.h"
#include "webkit/glue/webthread_impl.h"
#include "webkit/gpu/webgraphicscontext3d_in_process_impl.h"
@@ -81,9 +82,11 @@ void SharedResourcesCC::Destroy() {
initialized_ = false;
}
-bool SharedResourcesCC::MakeSharedContextCurrent() {
- DCHECK(initialized_);
- return context_->MakeCurrent(surface_.get());
+gfx::ScopedMakeCurrent* SharedResourcesCC::GetScopedMakeCurrent() {
+ if (initialized_)
piman 2011/11/11 17:35:31 nit: Please keep the DCHECK here. ScopedResourcesC
jonathan.backer 2011/11/11 18:12:48 Done.
+ return new gfx::ScopedMakeCurrent(context_.get(), surface_.get());
+ else
+ return NULL;
}
void* SharedResourcesCC::GetDisplay() {
« no previous file with comments | « ui/gfx/compositor/compositor_cc.h ('k') | ui/gfx/compositor/compositor_gl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698