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

Unified Diff: aura/window.cc

Issue 7845033: Rework View Layer Draw() to use the Layer::DrawTree() method and the LayerDelegate. (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
« no previous file with comments | « aura/window.h ('k') | chrome/browser/ui/views/wrench_menu.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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
« no previous file with comments | « aura/window.h ('k') | chrome/browser/ui/views/wrench_menu.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698