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

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

Issue 8222028: Use WebKit compositor in ui::Layer (Closed) Base URL: http://git.chromium.org/git/chromium.git@trunk
Patch Set: rebase,fixes Created 9 years, 2 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.cc
diff --git a/ui/gfx/compositor/compositor.cc b/ui/gfx/compositor/compositor.cc
index 6f7e5dba2a6ede01509996fb250dc7ca6d7125e7..97839c80d1dc4a64bd0e6b200a878e2c5f22068c 100644
--- a/ui/gfx/compositor/compositor.cc
+++ b/ui/gfx/compositor/compositor.cc
@@ -25,10 +25,15 @@ Compositor::Compositor(CompositorDelegate* delegate, const gfx::Size& size)
Compositor::~Compositor() {
}
+void Compositor::OnRootLayerChanged() {
Ben Goodger (Google) 2011/10/16 22:39:51 please keep the order of functions in the .cc in s
piman 2011/10/19 17:53:23 Done.
+ ScheduleDraw();
+}
+
void Compositor::SetRootLayer(Layer* root_layer) {
root_layer_ = root_layer;
if (!root_layer_->GetCompositor())
root_layer_->SetCompositor(this);
+ OnRootLayerChanged();
}
void Compositor::Draw(bool force_clear) {
@@ -36,10 +41,14 @@ void Compositor::Draw(bool force_clear) {
return;
NotifyStart(force_clear);
- root_layer_->DrawTree();
+ DrawTree();
NotifyEnd();
}
+void Compositor::DrawTree() {
+ root_layer_->DrawTree();
+}
+
void Compositor::AddObserver(CompositorObserver* observer) {
observer_list_.AddObserver(observer);
}

Powered by Google App Engine
This is Rietveld 408576698