Chromium Code Reviews| 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() { |