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 contents_scale, |
170 std::vector<DrawImage>* images); | 170 std::vector<DrawImage>* images); |
171 | 171 |
172 void SetRetainVisualRectsForTesting(bool retain) { | 172 void SetRetainVisualRectsForTesting(bool retain) { |
173 retain_visual_rects_ = retain; | 173 retain_visual_rects_ = retain; |
174 } | 174 } |
175 | 175 |
176 size_t size() const { return inputs_.items.size(); } | 176 size_t size() const { return inputs_.items.size(); } |
177 | 177 |
178 gfx::Rect VisualRectForTesting(int index) { | 178 gfx::Rect VisualRectForTesting(int index) { |
179 return inputs_.visual_rects[index]; | 179 return inputs_.visual_rects[index]; |
(...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
234 Inputs inputs_; | 234 Inputs inputs_; |
235 | 235 |
236 friend class base::RefCountedThreadSafe<DisplayItemList>; | 236 friend class base::RefCountedThreadSafe<DisplayItemList>; |
237 FRIEND_TEST_ALL_PREFIXES(DisplayItemListTest, ApproximateMemoryUsage); | 237 FRIEND_TEST_ALL_PREFIXES(DisplayItemListTest, ApproximateMemoryUsage); |
238 DISALLOW_COPY_AND_ASSIGN(DisplayItemList); | 238 DISALLOW_COPY_AND_ASSIGN(DisplayItemList); |
239 }; | 239 }; |
240 | 240 |
241 } // namespace cc | 241 } // namespace cc |
242 | 242 |
243 #endif // CC_PLAYBACK_DISPLAY_ITEM_LIST_H_ | 243 #endif // CC_PLAYBACK_DISPLAY_ITEM_LIST_H_ |
OLD | NEW |