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 | 9 |
10 #include <memory> | 10 #include <memory> |
(...skipping 148 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
159 size_t ApproximateMemoryUsage() const; | 159 size_t ApproximateMemoryUsage() const; |
160 bool ShouldBeAnalyzedForSolidColor() const; | 160 bool ShouldBeAnalyzedForSolidColor() const; |
161 | 161 |
162 std::unique_ptr<base::trace_event::ConvertableToTraceFormat> AsValue( | 162 std::unique_ptr<base::trace_event::ConvertableToTraceFormat> AsValue( |
163 bool include_items) const; | 163 bool include_items) const; |
164 | 164 |
165 void EmitTraceSnapshot() const; | 165 void EmitTraceSnapshot() const; |
166 | 166 |
167 void GenerateDiscardableImagesMetadata(); | 167 void GenerateDiscardableImagesMetadata(); |
168 void GetDiscardableImagesInRect(const gfx::Rect& rect, | 168 void GetDiscardableImagesInRect(const gfx::Rect& rect, |
169 const gfx::SizeF& raster_scales, | 169 float raster_scale, |
170 std::vector<DrawImage>* images); | 170 std::vector<DrawImage>* images); |
171 Region GetRegionForImage(uint32_t image_id); | 171 Region GetRegionForImage(uint32_t image_id); |
172 | 172 |
173 void SetRetainVisualRectsForTesting(bool retain) { | 173 void SetRetainVisualRectsForTesting(bool retain) { |
174 retain_visual_rects_ = retain; | 174 retain_visual_rects_ = retain; |
175 } | 175 } |
176 | 176 |
177 size_t size() const { return inputs_.items.size(); } | 177 size_t size() const { return inputs_.items.size(); } |
178 | 178 |
179 gfx::Rect VisualRectForTesting(int index) { | 179 gfx::Rect VisualRectForTesting(int index) { |
(...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
235 Inputs inputs_; | 235 Inputs inputs_; |
236 | 236 |
237 friend class base::RefCountedThreadSafe<DisplayItemList>; | 237 friend class base::RefCountedThreadSafe<DisplayItemList>; |
238 FRIEND_TEST_ALL_PREFIXES(DisplayItemListTest, ApproximateMemoryUsage); | 238 FRIEND_TEST_ALL_PREFIXES(DisplayItemListTest, ApproximateMemoryUsage); |
239 DISALLOW_COPY_AND_ASSIGN(DisplayItemList); | 239 DISALLOW_COPY_AND_ASSIGN(DisplayItemList); |
240 }; | 240 }; |
241 | 241 |
242 } // namespace cc | 242 } // namespace cc |
243 | 243 |
244 #endif // CC_PLAYBACK_DISPLAY_ITEM_LIST_H_ | 244 #endif // CC_PLAYBACK_DISPLAY_ITEM_LIST_H_ |
OLD | NEW |