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

Unified Diff: ui/compositor/paint_cache.cc

Issue 1423653005: Further plumb visual rect into cc:DisplayItemList. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix cc unit tests. Created 5 years, 1 month 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
Index: ui/compositor/paint_cache.cc
diff --git a/ui/compositor/paint_cache.cc b/ui/compositor/paint_cache.cc
index ca80aa3940c6b589c85f9236070fe97d334ab304..b0997da02ec6f8b09bf24c6b8e91d2ae1a97e4c7 100644
--- a/ui/compositor/paint_cache.cc
+++ b/ui/compositor/paint_cache.cc
@@ -19,12 +19,15 @@ bool PaintCache::UseCache(const PaintContext& context) {
if (!has_cache_)
return false;
DCHECK(context.list_);
- auto* item = context.list_->CreateAndAppendItem<cc::DrawingDisplayItem>();
+ auto* item =
+ context.list_->CreateAndAppendItem<cc::DrawingDisplayItem>(visual_rect_);
display_item_.CloneTo(item);
return true;
}
-void PaintCache::SetCache(const cc::DrawingDisplayItem* item) {
+void PaintCache::SetCache(const gfx::Rect& visual_rect,
+ const cc::DrawingDisplayItem* item) {
+ visual_rect_ = visual_rect;
item->CloneTo(&display_item_);
has_cache_ = true;
}

Powered by Google App Engine
This is Rietveld 408576698