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

Unified Diff: cc/playback/display_item_list.h

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 | « cc/playback/display_item.h ('k') | cc/playback/display_item_list.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/playback/display_item_list.h
diff --git a/cc/playback/display_item_list.h b/cc/playback/display_item_list.h
index 21422600d8648a6d9ab31f84d5752a811803c98d..a988e9e9aeec03757c1d0d7541099df39b7d9406 100644
--- a/cc/playback/display_item_list.h
+++ b/cc/playback/display_item_list.h
@@ -61,10 +61,11 @@ class CC_EXPORT DisplayItemList
void RasterIntoCanvas(const DisplayItem& display_item);
template <typename DisplayItemType>
- DisplayItemType* CreateAndAppendItem() {
+ DisplayItemType* CreateAndAppendItem(const gfx::Rect& visual_rect) {
#if DCHECK_IS_ON()
needs_process_ = true;
#endif
+ visual_rects_.push_back(visual_rect);
ProcessAppendedItemsOnTheFly();
return items_.AllocateAndConstruct<DisplayItemType>();
}
@@ -95,6 +96,8 @@ class CC_EXPORT DisplayItemList
float raster_scale,
std::vector<DrawImage>* images);
+ gfx::Rect VisualRectForTesting(int index) { return visual_rects_[index]; }
+
private:
DisplayItemList(gfx::Rect layer_rect,
const DisplayItemListSettings& display_list_settings,
@@ -113,6 +116,12 @@ class CC_EXPORT DisplayItemList
#endif
ListContainer<DisplayItem> items_;
+ // The visual rects associated with each of the display items in the
+ // display item list. There is one rect per display item, and the
+ // position in |visual_rects_| matches the position of the item in
+ // |items_| . These rects are intentionally kept separate
+ // because they are not needed while walking the |items_| for raster.
+ std::vector<gfx::Rect> visual_rects_;
skia::RefPtr<SkPicture> picture_;
scoped_ptr<SkPictureRecorder> recorder_;
« no previous file with comments | « cc/playback/display_item.h ('k') | cc/playback/display_item_list.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698