Chromium Code Reviews| 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..c8fb95d944b3d998661cabd46ee39b78d9864033 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>(); |
| } |
| @@ -113,6 +114,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 the vector matches the position of the item in the |
|
danakj
2015/11/05 23:54:27
nit: the position in |visual_rects_| matches the p
wkorman
2015/11/17 01:47:23
Done.
|
| + // display item list. These rects are intentionally kept separate |
| + // from the items so as to keep the display items small. |
|
danakj
2015/11/05 23:54:27
because they are not needed while walking the |ite
wkorman
2015/11/17 01:47:23
Done.
|
| + std::vector<gfx::Rect> visual_rects_; |
| skia::RefPtr<SkPicture> picture_; |
| scoped_ptr<SkPictureRecorder> recorder_; |