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

Unified Diff: ui/compositor/layer.cc

Issue 2108043002: Clear ui::Layer damaged_region_ after commit. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@2743
Patch Set: Created 4 years, 6 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/compositor/layer.h ('k') | ui/compositor/layer_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/compositor/layer.cc
diff --git a/ui/compositor/layer.cc b/ui/compositor/layer.cc
index f8fe81005fa3e0344cf35dd17bb781272caad521..cf42867560481ca75980736bda03a7260f4757c9 100644
--- a/ui/compositor/layer.cc
+++ b/ui/compositor/layer.cc
@@ -672,9 +672,9 @@ void Layer::SendDamagedRects() {
for (cc::Region::Iterator iter(damaged_region_); iter.has_rect(); iter.next())
cc_layer_->SetNeedsDisplayRect(iter.rect());
-}
-void Layer::ClearDamagedRects() {
+ if (content_layer_)
+ paint_region_.Union(damaged_region_);
damaged_region_.Clear();
}
@@ -739,8 +739,8 @@ scoped_refptr<cc::DisplayItemList> Layer::PaintContentsToDisplayList(
TRACE_EVENT1("ui", "Layer::PaintContentsToDisplayList", "name", name_);
gfx::Rect local_bounds(bounds().size());
gfx::Rect invalidation(
- gfx::IntersectRects(damaged_region_.bounds(), local_bounds));
- ClearDamagedRects();
+ gfx::IntersectRects(paint_region_.bounds(), local_bounds));
+ paint_region_.Clear();
cc::DisplayItemListSettings settings;
settings.use_cached_picture = false;
scoped_refptr<cc::DisplayItemList> display_list =
« no previous file with comments | « ui/compositor/layer.h ('k') | ui/compositor/layer_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698