summaryrefslogtreecommitdiffstats
path: root/ui
diff options
context:
space:
mode:
authorwjmaclean@chromium.org <wjmaclean@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-05-24 18:02:52 +0000
committerwjmaclean@chromium.org <wjmaclean@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-05-24 18:02:52 +0000
commitf57be3052a1960d38092938c3ecfb9ada5303aa9 (patch)
tree87ee5d5381cfd0790dd7c91aad2c50b9961ac209 /ui
parentf452e1aa97fbcd7e3d5560fc456819bf40e5c57c (diff)
downloadchromium_src-f57be3052a1960d38092938c3ecfb9ada5303aa9.zip
chromium_src-f57be3052a1960d38092938c3ecfb9ada5303aa9.tar.gz
chromium_src-f57be3052a1960d38092938c3ecfb9ada5303aa9.tar.bz2
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
Diffstat (limited to 'ui')
-rw-r--r--ui/gfx/compositor/compositor_gl.cc10
1 files changed, 5 insertions, 5 deletions
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);