From f57be3052a1960d38092938c3ecfb9ada5303aa9 Mon Sep 17 00:00:00 2001 From: "wjmaclean@chromium.org" <wjmaclean@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> Date: Tue, 24 May 2011 18:02:52 +0000 Subject: Changes to reflect context/surface refactoring for new compositor (COMPOSITOR_2). BUG=none TEST=none Review URL: http://codereview.chromium.org/7064026 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@86451 0039d316-1c4b-4281-b951-d872f2087c98 --- ui/gfx/compositor/compositor_gl.cc | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'ui') diff --git a/ui/gfx/compositor/compositor_gl.cc b/ui/gfx/compositor/compositor_gl.cc index f266d7c..6dfccef 100644 --- a/ui/gfx/compositor/compositor_gl.cc +++ b/ui/gfx/compositor/compositor_gl.cc @@ -195,8 +195,8 @@ void TextureGL::Draw(const ui::Transform& transform) { CompositorGL::CompositorGL(gfx::AcceleratedWidget widget) : started_(false) { gl_surface_.reset(gfx::GLSurface::CreateViewGLSurface(widget)); - gl_context_.reset(gfx::GLContext::CreateGLContext(NULL, gl_surface.get())), - gl_context_->MakeCurrent(); + gl_context_.reset(gfx::GLContext::CreateGLContext(NULL, gl_surface_.get())), + gl_context_->MakeCurrent(gl_surface_.get()); glColorMask(true, true, true, true); glEnable(GL_BLEND); glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA); @@ -206,11 +206,11 @@ CompositorGL::~CompositorGL() { } void CompositorGL::MakeCurrent() { - gl_context_->MakeCurrent(); + gl_context_->MakeCurrent(gl_surface_.get()); } gfx::Size CompositorGL::GetSize() { - return gl_context_->GetSize(); + return gl_surface_->GetSize(); } Texture* CompositorGL::CreateTexture() { @@ -222,7 +222,7 @@ void CompositorGL::NotifyStart() { started_ = true; gl_context_->MakeCurrent(gl_surface_.get()); glViewport(0, 0, - gl_context_->GetSize().width(), gl_context_->GetSize().height()); + gl_surface_->GetSize().width(), gl_surface_->GetSize().height()); // Clear to 'psychedelic' purple to make it easy to spot un-rendered regions. glClearColor(223.0 / 255, 0, 1, 1); -- cgit v1.1