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 "base/gtest_prod_util.h" | 8 #include "base/gtest_prod_util.h" |
9 #include "base/memory/ref_counted.h" | 9 #include "base/memory/ref_counted.h" |
10 #include "base/memory/scoped_ptr.h" | 10 #include "base/memory/scoped_ptr.h" |
(...skipping 77 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
88 | 88 |
89 scoped_refptr<base::trace_event::ConvertableToTraceFormat> AsValue( | 89 scoped_refptr<base::trace_event::ConvertableToTraceFormat> AsValue( |
90 bool include_items) const; | 90 bool include_items) const; |
91 | 91 |
92 void EmitTraceSnapshot() const; | 92 void EmitTraceSnapshot() const; |
93 | 93 |
94 void GenerateDiscardableImagesMetadata(); | 94 void GenerateDiscardableImagesMetadata(); |
95 void GetDiscardableImagesInRect(const gfx::Rect& rect, | 95 void GetDiscardableImagesInRect(const gfx::Rect& rect, |
96 float raster_scale, | 96 float raster_scale, |
97 std::vector<DrawImage>* images); | 97 std::vector<DrawImage>* images); |
| 98 bool MayHaveDiscardableImages() const; |
98 | 99 |
99 gfx::Rect VisualRectForTesting(int index) { return visual_rects_[index]; } | 100 gfx::Rect VisualRectForTesting(int index) { return visual_rects_[index]; } |
100 | 101 |
101 private: | 102 private: |
102 DisplayItemList(gfx::Rect layer_rect, | 103 DisplayItemList(gfx::Rect layer_rect, |
103 const DisplayItemListSettings& display_list_settings, | 104 const DisplayItemListSettings& display_list_settings, |
104 bool retain_individual_display_items); | 105 bool retain_individual_display_items); |
105 ~DisplayItemList(); | 106 ~DisplayItemList(); |
106 | 107 |
107 // While appending new items, if they are not being retained, this can process | 108 // While appending new items, if they are not being retained, this can process |
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
142 DiscardableImageMap image_map_; | 143 DiscardableImageMap image_map_; |
143 | 144 |
144 friend class base::RefCountedThreadSafe<DisplayItemList>; | 145 friend class base::RefCountedThreadSafe<DisplayItemList>; |
145 FRIEND_TEST_ALL_PREFIXES(DisplayItemListTest, ApproximateMemoryUsage); | 146 FRIEND_TEST_ALL_PREFIXES(DisplayItemListTest, ApproximateMemoryUsage); |
146 DISALLOW_COPY_AND_ASSIGN(DisplayItemList); | 147 DISALLOW_COPY_AND_ASSIGN(DisplayItemList); |
147 }; | 148 }; |
148 | 149 |
149 } // namespace cc | 150 } // namespace cc |
150 | 151 |
151 #endif // CC_PLAYBACK_DISPLAY_ITEM_LIST_H_ | 152 #endif // CC_PLAYBACK_DISPLAY_ITEM_LIST_H_ |
OLD | NEW |