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

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

Issue 7064026: Changes to reflect gontext/surface refactoring for new compositor. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 9 years, 7 months 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 | « no previous file | 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 f266d7cf3247a24cdf62dc2642b6cbf9e06ef4a3..6dfccef9fbc197aec74434651640e51850a9d523 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);
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698