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

Unified Diff: ui/compositor/compositor.cc

Issue 1080633009: ui: Clean up damaged rects and clear them after painting. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: damagedregion: fixtest Created 5 years, 8 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 | « content/browser/compositor/reflector_impl_unittest.cc ('k') | ui/compositor/layer.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/compositor/compositor.cc
diff --git a/ui/compositor/compositor.cc b/ui/compositor/compositor.cc
index 43dd4605a11ab614f76706aca6f4276d1e2d5ac0..c50f9efdddb5321b6095e8c8a8bf4b64482433b9 100644
--- a/ui/compositor/compositor.cc
+++ b/ui/compositor/compositor.cc
@@ -326,9 +326,16 @@ void Compositor::BeginMainFrame(const cc::BeginFrameArgs& args) {
void Compositor::BeginMainFrameNotExpectedSoon() {
}
+static void SendDamagedRectsRecursive(ui::Layer* layer) {
+ layer->SendDamagedRects();
+ for (auto* child : layer->children())
sky 2015/04/23 15:53:25 Why are you moving the recursion here?
danakj 2015/04/23 16:02:56 To make the Layer function a simpler method. The C
+ SendDamagedRectsRecursive(child);
+}
+
void Compositor::Layout() {
- if (root_layer_)
- root_layer_->SendDamagedRects();
+ if (!root_layer())
+ return;
+ SendDamagedRectsRecursive(root_layer());
}
void Compositor::RequestNewOutputSurface() {
« no previous file with comments | « content/browser/compositor/reflector_impl_unittest.cc ('k') | ui/compositor/layer.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698