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 86 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
97 | 97 |
98 scoped_refptr<base::trace_event::ConvertableToTraceFormat> AsValue( | 98 scoped_refptr<base::trace_event::ConvertableToTraceFormat> AsValue( |
99 bool include_items) const; | 99 bool include_items) const; |
100 | 100 |
101 void EmitTraceSnapshot() const; | 101 void EmitTraceSnapshot() const; |
102 | 102 |
103 void GenerateDiscardableImagesMetadata(); | 103 void GenerateDiscardableImagesMetadata(); |
104 void GetDiscardableImagesInRect(const gfx::Rect& rect, | 104 void GetDiscardableImagesInRect(const gfx::Rect& rect, |
105 float raster_scale, | 105 float raster_scale, |
106 std::vector<DrawImage>* images); | 106 std::vector<DrawImage>* images); |
| 107 bool MayHaveDiscardableImages() const; |
107 | 108 |
108 bool HasDiscardableImageInRect(const gfx::Rect& layer_rect) const; | 109 bool HasDiscardableImageInRect(const gfx::Rect& layer_rect) const; |
109 | 110 |
110 gfx::Rect VisualRectForTesting(int index) { return visual_rects_[index]; } | 111 gfx::Rect VisualRectForTesting(int index) { return visual_rects_[index]; } |
111 | 112 |
112 private: | 113 private: |
113 DisplayItemList(gfx::Rect layer_rect, | 114 DisplayItemList(gfx::Rect layer_rect, |
114 const DisplayItemListSettings& display_list_settings, | 115 const DisplayItemListSettings& display_list_settings, |
115 bool retain_individual_display_items); | 116 bool retain_individual_display_items); |
116 ~DisplayItemList(); | 117 ~DisplayItemList(); |
(...skipping 24 matching lines...) Expand all Loading... |
141 DiscardableImageMap image_map_; | 142 DiscardableImageMap image_map_; |
142 | 143 |
143 friend class base::RefCountedThreadSafe<DisplayItemList>; | 144 friend class base::RefCountedThreadSafe<DisplayItemList>; |
144 FRIEND_TEST_ALL_PREFIXES(DisplayItemListTest, ApproximateMemoryUsage); | 145 FRIEND_TEST_ALL_PREFIXES(DisplayItemListTest, ApproximateMemoryUsage); |
145 DISALLOW_COPY_AND_ASSIGN(DisplayItemList); | 146 DISALLOW_COPY_AND_ASSIGN(DisplayItemList); |
146 }; | 147 }; |
147 | 148 |
148 } // namespace cc | 149 } // namespace cc |
149 | 150 |
150 #endif // CC_PLAYBACK_DISPLAY_ITEM_LIST_H_ | 151 #endif // CC_PLAYBACK_DISPLAY_ITEM_LIST_H_ |
OLD | NEW |