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

Unified Diff: ui/aura/window.cc

Issue 464643003: Stop painting when receiving delegated frame (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 4 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 | « ui/aura/window.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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.
« no previous file with comments | « ui/aura/window.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698