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 122 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
133 | 133 |
134 int ApproximateOpCount() const; | 134 int ApproximateOpCount() const; |
135 size_t ApproximateMemoryUsage() const; | 135 size_t ApproximateMemoryUsage() const; |
136 bool ShouldBeAnalyzedForSolidColor() const; | 136 bool ShouldBeAnalyzedForSolidColor() const; |
137 | 137 |
138 void EmitTraceSnapshot() const; | 138 void EmitTraceSnapshot() const; |
139 | 139 |
140 void GenerateDiscardableImagesMetadata(); | 140 void GenerateDiscardableImagesMetadata(); |
141 void GetDiscardableImagesInRect(const gfx::Rect& rect, | 141 void GetDiscardableImagesInRect(const gfx::Rect& rect, |
142 float contents_scale, | 142 float contents_scale, |
| 143 const gfx::ColorSpace& target_color_space, |
143 std::vector<DrawImage>* images); | 144 std::vector<DrawImage>* images); |
144 gfx::Rect GetRectForImage(ImageId image_id) const; | 145 gfx::Rect GetRectForImage(ImageId image_id) const; |
145 | 146 |
146 void SetRetainVisualRectsForTesting(bool retain) { | 147 void SetRetainVisualRectsForTesting(bool retain) { |
147 retain_visual_rects_ = retain; | 148 retain_visual_rects_ = retain; |
148 } | 149 } |
149 | 150 |
150 size_t size() const { return items_.size(); } | 151 size_t size() const { return items_.size(); } |
151 | 152 |
152 gfx::Rect VisualRectForTesting(int index) { return visual_rects_[index]; } | 153 gfx::Rect VisualRectForTesting(int index) { return visual_rects_[index]; } |
(...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
199 bool retain_visual_rects_ = false; | 200 bool retain_visual_rects_ = false; |
200 | 201 |
201 friend class base::RefCountedThreadSafe<DisplayItemList>; | 202 friend class base::RefCountedThreadSafe<DisplayItemList>; |
202 FRIEND_TEST_ALL_PREFIXES(DisplayItemListTest, ApproximateMemoryUsage); | 203 FRIEND_TEST_ALL_PREFIXES(DisplayItemListTest, ApproximateMemoryUsage); |
203 DISALLOW_COPY_AND_ASSIGN(DisplayItemList); | 204 DISALLOW_COPY_AND_ASSIGN(DisplayItemList); |
204 }; | 205 }; |
205 | 206 |
206 } // namespace cc | 207 } // namespace cc |
207 | 208 |
208 #endif // CC_PAINT_DISPLAY_ITEM_LIST_H_ | 209 #endif // CC_PAINT_DISPLAY_ITEM_LIST_H_ |
OLD | NEW |