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

Unified Diff: ui/compositor/layer.cc

Issue 2018223002: Clear ui::Layer damaged_region_ after commit. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 7 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 e23e87fb63b223517a354fa7034eaab5a434ba61..dabbedd73eee8b0fd00f885268d448f95fb36341 100644
--- a/ui/compositor/layer.cc
+++ b/ui/compositor/layer.cc
@@ -689,9 +689,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();
}
@@ -756,8 +756,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