Index: ui/aura/window.cc |
diff --git a/ui/aura/window.cc b/ui/aura/window.cc |
index 992642ed059430e692535edddb94498b63cf7eed..4eb30f2e4b18f144c1f40bd3c7cf3647462d955e 100644 |
--- a/ui/aura/window.cc |
+++ b/ui/aura/window.cc |
@@ -497,6 +497,20 @@ void Window::SchedulePaintInRect(const gfx::Rect& rect) { |
} |
} |
+void Window::NotifyDamage(const gfx::Rect& rect) { |
enne (OOO)
2014/08/11 23:43:23
This code is an unfortunate duplicate of Window::S
sky
2014/08/13 20:01:01
Is this a notification that a paint has been sched
enne (OOO)
2014/08/13 23:55:45
This is a notification that part of the screen has
|
+ if (!layer() && parent_) { |
+ gfx::Rect parent_rect(bounds().size()); |
+ parent_rect.Intersect(rect); |
+ if (!parent_rect.IsEmpty()) { |
+ parent_rect.Offset(bounds().origin().OffsetFromOrigin()); |
+ parent_->NotifyDamage(parent_rect); |
+ } |
+ } else if (layer()) { |
+ FOR_EACH_OBSERVER( |
+ WindowObserver, observers_, OnWindowPaintScheduled(this, rect)); |
+ } |
+} |
+ |
void Window::StackChildAtTop(Window* child) { |
if (children_.size() <= 1 || child == children_.back()) |
return; // In the front already. |