| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #ifndef CC_PLAYBACK_DISPLAY_ITEM_LIST_H_ | 5 #ifndef CC_PLAYBACK_DISPLAY_ITEM_LIST_H_ |
| 6 #define CC_PLAYBACK_DISPLAY_ITEM_LIST_H_ | 6 #define CC_PLAYBACK_DISPLAY_ITEM_LIST_H_ |
| 7 | 7 |
| 8 #include <stddef.h> | 8 #include <stddef.h> |
| 9 #include <utility> | 9 #include <utility> |
| 10 | 10 |
| (...skipping 108 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 119 | 119 |
| 120 void ProcessAppendedItem(const DisplayItem* item); | 120 void ProcessAppendedItem(const DisplayItem* item); |
| 121 | 121 |
| 122 ContiguousContainer<DisplayItem> items_; | 122 ContiguousContainer<DisplayItem> items_; |
| 123 // The visual rects associated with each of the display items in the | 123 // The visual rects associated with each of the display items in the |
| 124 // display item list. There is one rect per display item, and the | 124 // display item list. There is one rect per display item, and the |
| 125 // position in |visual_rects_| matches the position of the item in | 125 // position in |visual_rects_| matches the position of the item in |
| 126 // |items_| . These rects are intentionally kept separate | 126 // |items_| . These rects are intentionally kept separate |
| 127 // because they are not needed while walking the |items_| for raster. | 127 // because they are not needed while walking the |items_| for raster. |
| 128 std::vector<gfx::Rect> visual_rects_; | 128 std::vector<gfx::Rect> visual_rects_; |
| 129 skia::RefPtr<SkPicture> picture_; | 129 sk_sp<SkPicture> picture_; |
| 130 | 130 |
| 131 scoped_ptr<SkPictureRecorder> recorder_; | 131 scoped_ptr<SkPictureRecorder> recorder_; |
| 132 skia::RefPtr<SkCanvas> canvas_; | 132 skia::RefPtr<SkCanvas> canvas_; |
| 133 const DisplayItemListSettings settings_; | 133 const DisplayItemListSettings settings_; |
| 134 bool retain_individual_display_items_; | 134 bool retain_individual_display_items_; |
| 135 | 135 |
| 136 gfx::Rect layer_rect_; | 136 gfx::Rect layer_rect_; |
| 137 bool is_suitable_for_gpu_rasterization_; | 137 bool is_suitable_for_gpu_rasterization_; |
| 138 int approximate_op_count_; | 138 int approximate_op_count_; |
| 139 | 139 |
| 140 // Memory usage due to the cached SkPicture. | 140 // Memory usage due to the cached SkPicture. |
| 141 size_t picture_memory_usage_; | 141 size_t picture_memory_usage_; |
| 142 | 142 |
| 143 DiscardableImageMap image_map_; | 143 DiscardableImageMap image_map_; |
| 144 | 144 |
| 145 friend class base::RefCountedThreadSafe<DisplayItemList>; | 145 friend class base::RefCountedThreadSafe<DisplayItemList>; |
| 146 FRIEND_TEST_ALL_PREFIXES(DisplayItemListTest, ApproximateMemoryUsage); | 146 FRIEND_TEST_ALL_PREFIXES(DisplayItemListTest, ApproximateMemoryUsage); |
| 147 DISALLOW_COPY_AND_ASSIGN(DisplayItemList); | 147 DISALLOW_COPY_AND_ASSIGN(DisplayItemList); |
| 148 }; | 148 }; |
| 149 | 149 |
| 150 } // namespace cc | 150 } // namespace cc |
| 151 | 151 |
| 152 #endif // CC_PLAYBACK_DISPLAY_ITEM_LIST_H_ | 152 #endif // CC_PLAYBACK_DISPLAY_ITEM_LIST_H_ |
| OLD | NEW |