| Index: aura/window.cc
|
| ===================================================================
|
| --- aura/window.cc (revision 100773)
|
| +++ aura/window.cc (working copy)
|
| @@ -54,7 +54,8 @@
|
| return;
|
|
|
| visibility_ = visibility;
|
| - if (visibility_ != VISIBILITY_HIDDEN)
|
| + layer_->set_visible(visibility_ != VISIBILITY_HIDDEN);
|
| + if (layer_->visible())
|
| SchedulePaint();
|
| }
|
|
|
| @@ -105,12 +106,6 @@
|
| SchedulePaintInRect(gfx::Rect());
|
| }
|
|
|
| -void Window::DrawTree() {
|
| - Draw();
|
| - for (Windows::iterator i = children_.begin(); i != children_.end(); ++i)
|
| - (*i)->DrawTree();
|
| -}
|
| -
|
| void Window::AddChild(Window* child) {
|
| DCHECK(std::find(children_.begin(), children_.end(), child) ==
|
| children_.end());
|
| @@ -168,17 +163,13 @@
|
| return parent_ ? parent_->GetFocusManager() : NULL;
|
| }
|
|
|
| -void Window::Draw() {
|
| - if (visibility_ != VISIBILITY_HIDDEN)
|
| - layer_->Draw();
|
| -}
|
| -
|
| void Window::SchedulePaint() {
|
| SchedulePaintInRect(gfx::Rect(0, 0, bounds_.width(), bounds_.height()));
|
| }
|
|
|
| -void Window::OnPaint(gfx::Canvas* canvas) {
|
| - delegate_->OnPaint(canvas);
|
| +void Window::OnPaintLayer(gfx::Canvas* canvas) {
|
| + if (delegate_)
|
| + delegate_->OnPaint(canvas);
|
| }
|
|
|
| } // namespace aura
|
|
|