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