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

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

Issue 7770002: gfx::Compositor: SchedulePaint. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: . Created 9 years, 3 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
Index: ui/gfx/compositor/compositor_gl.cc
diff --git a/ui/gfx/compositor/compositor_gl.cc b/ui/gfx/compositor/compositor_gl.cc
index ee1a38d994c861e7ece04cd0a7bc28e0fa1efff0..962703f31822a0a1973bb04f9ab4d9a514851a8d 100644
--- a/ui/gfx/compositor/compositor_gl.cc
+++ b/ui/gfx/compositor/compositor_gl.cc
@@ -441,11 +441,12 @@ void TextureGL::DrawInternal(const ui::TextureProgramGL& program,
glDrawArrays(GL_TRIANGLE_FAN, 0, 4);
}
-CompositorGL::CompositorGL(gfx::AcceleratedWidget widget,
+CompositorGL::CompositorGL(CompositorOwner* owner,
const gfx::Size& size)
- : Compositor(size),
+ : Compositor(owner, size),
started_(false) {
- gl_surface_ = gfx::GLSurface::CreateViewGLSurface(false, widget);
+ gl_surface_ = gfx::GLSurface::CreateViewGLSurface(false,
+ owner->GetAcceleratedWidget());
gl_context_ = SharedResources::GetInstance()->
CreateContext(gl_surface_.get());
gl_context_->MakeCurrent(gl_surface_.get());
@@ -494,17 +495,16 @@ void CompositorGL::Blur(const gfx::Rect& bounds) {
}
void CompositorGL::SchedulePaint() {
- // TODO: X doesn't provide coalescing of regions, its left to the toolkit.
- NOTIMPLEMENTED();
+ owner()->PaintNow();
sadrul 2011/09/06 17:27:05 This will actually be a PostTask
}
// static
-Compositor* Compositor::Create(gfx::AcceleratedWidget widget,
+Compositor* Compositor::Create(CompositorOwner* owner,
const gfx::Size& size) {
if (SharedResources::GetInstance() == NULL)
return NULL;
else
- return new CompositorGL(widget, size);
+ return new CompositorGL(owner, size);
}
} // namespace ui

Powered by Google App Engine
This is Rietveld 408576698