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

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 clip recorder params in omnibox. 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
« no previous file with comments | « ui/compositor/paint_cache.h ('k') | ui/compositor/paint_context.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/compositor/paint_cache.cc
diff --git a/ui/compositor/paint_cache.cc b/ui/compositor/paint_cache.cc
index ca80aa3940c6b589c85f9236070fe97d334ab304..b4db1ab3b4cd7fd41d892570901d4b5d2e8e0bec 100644
--- a/ui/compositor/paint_cache.cc
+++ b/ui/compositor/paint_cache.cc
@@ -15,11 +15,14 @@ PaintCache::PaintCache() : has_cache_(false) {
PaintCache::~PaintCache() {
}
-bool PaintCache::UseCache(const PaintContext& context) {
+bool PaintCache::UseCache(const PaintContext& context,
+ const gfx::Size& size_in_layer) {
if (!has_cache_)
return false;
DCHECK(context.list_);
- auto* item = context.list_->CreateAndAppendItem<cc::DrawingDisplayItem>();
+ gfx::Rect bounds_in_layer = context.ToLayerSpaceBounds(size_in_layer);
+ auto* item = context.list_->CreateAndAppendItem<cc::DrawingDisplayItem>(
+ bounds_in_layer);
display_item_.CloneTo(item);
return true;
}
« no previous file with comments | « ui/compositor/paint_cache.h ('k') | ui/compositor/paint_context.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698