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_PAINT_DISPLAY_ITEM_LIST_H_ | 5 #ifndef CC_PAINT_DISPLAY_ITEM_LIST_H_ |
6 #define CC_PAINT_DISPLAY_ITEM_LIST_H_ | 6 #define CC_PAINT_DISPLAY_ITEM_LIST_H_ |
7 | 7 |
8 #include <stddef.h> | 8 #include <stddef.h> |
9 | 9 |
10 #include <memory> | 10 #include <memory> |
(...skipping 128 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
139 size_t ApproximateMemoryUsage() const; | 139 size_t ApproximateMemoryUsage() const; |
140 bool ShouldBeAnalyzedForSolidColor() const; | 140 bool ShouldBeAnalyzedForSolidColor() const; |
141 | 141 |
142 void EmitTraceSnapshot() const; | 142 void EmitTraceSnapshot() const; |
143 | 143 |
144 void GenerateDiscardableImagesMetadata(); | 144 void GenerateDiscardableImagesMetadata(); |
145 void GetDiscardableImagesInRect(const gfx::Rect& rect, | 145 void GetDiscardableImagesInRect(const gfx::Rect& rect, |
146 float contents_scale, | 146 float contents_scale, |
147 const gfx::ColorSpace& target_color_space, | 147 const gfx::ColorSpace& target_color_space, |
148 std::vector<DrawImage>* images); | 148 std::vector<DrawImage>* images); |
149 gfx::Rect GetRectForImage(ImageId image_id) const; | 149 gfx::Rect GetRectForImage(PaintImage::Id image_id) const; |
150 | 150 |
151 void SetRetainVisualRectsForTesting(bool retain) { | 151 void SetRetainVisualRectsForTesting(bool retain) { |
152 retain_visual_rects_ = retain; | 152 retain_visual_rects_ = retain; |
153 } | 153 } |
154 | 154 |
155 size_t size() const { return items_.size(); } | 155 size_t size() const { return items_.size(); } |
156 | 156 |
157 gfx::Rect VisualRectForTesting(int index) { return visual_rects_[index]; } | 157 gfx::Rect VisualRectForTesting(int index) { return visual_rects_[index]; } |
158 | 158 |
159 ContiguousContainer<DisplayItem>::const_iterator begin() const { | 159 ContiguousContainer<DisplayItem>::const_iterator begin() const { |
(...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
212 bool has_discardable_images_ = false; | 212 bool has_discardable_images_ = false; |
213 | 213 |
214 friend class base::RefCountedThreadSafe<DisplayItemList>; | 214 friend class base::RefCountedThreadSafe<DisplayItemList>; |
215 FRIEND_TEST_ALL_PREFIXES(DisplayItemListTest, ApproximateMemoryUsage); | 215 FRIEND_TEST_ALL_PREFIXES(DisplayItemListTest, ApproximateMemoryUsage); |
216 DISALLOW_COPY_AND_ASSIGN(DisplayItemList); | 216 DISALLOW_COPY_AND_ASSIGN(DisplayItemList); |
217 }; | 217 }; |
218 | 218 |
219 } // namespace cc | 219 } // namespace cc |
220 | 220 |
221 #endif // CC_PAINT_DISPLAY_ITEM_LIST_H_ | 221 #endif // CC_PAINT_DISPLAY_ITEM_LIST_H_ |
OLD | NEW |