| Index: ui/gfx/compositor/compositor.cc
|
| diff --git a/ui/gfx/compositor/compositor.cc b/ui/gfx/compositor/compositor.cc
|
| index 6f7e5dba2a6ede01509996fb250dc7ca6d7125e7..87aa06eccfa58951760db8e1a4439e004419554b 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::ScheduleDraw() {
|
| + delegate_->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,7 +41,7 @@ void Compositor::Draw(bool force_clear) {
|
| return;
|
|
|
| NotifyStart(force_clear);
|
| - root_layer_->DrawTree();
|
| + DrawTree();
|
| NotifyEnd();
|
| }
|
|
|
| @@ -52,6 +57,14 @@ bool Compositor::HasObserver(CompositorObserver* observer) {
|
| return observer_list_.HasObserver(observer);
|
| }
|
|
|
| +void Compositor::OnRootLayerChanged() {
|
| + ScheduleDraw();
|
| +}
|
| +
|
| +void Compositor::DrawTree() {
|
| + root_layer_->DrawTree();
|
| +}
|
| +
|
| void Compositor::NotifyStart(bool clear) {
|
| OnNotifyStart(clear);
|
| }
|
|
|