| 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> |
| 11 #include <utility> | 11 #include <utility> |
| 12 | 12 |
| 13 #include "base/gtest_prod_util.h" | 13 #include "base/gtest_prod_util.h" |
| 14 #include "base/macros.h" | 14 #include "base/macros.h" |
| 15 #include "base/memory/ref_counted.h" | 15 #include "base/memory/ref_counted.h" |
| 16 #include "base/trace_event/trace_event.h" | 16 #include "base/trace_event/trace_event.h" |
| 17 #include "cc/base/cc_export.h" | 17 #include "cc/base/cc_export.h" |
| 18 #include "cc/base/contiguous_container.h" | 18 #include "cc/base/contiguous_container.h" |
| 19 #include "cc/base/rtree.h" | 19 #include "cc/base/rtree.h" |
| 20 #include "cc/playback/discardable_image_map.h" | 20 #include "cc/playback/discardable_image_map.h" |
| 21 #include "cc/playback/display_item.h" | 21 #include "cc/playback/display_item.h" |
| 22 #include "cc/playback/image_id.h" |
| 22 #include "third_party/skia/include/core/SkPicture.h" | 23 #include "third_party/skia/include/core/SkPicture.h" |
| 23 #include "ui/gfx/color_space.h" | 24 #include "ui/gfx/color_space.h" |
| 24 #include "ui/gfx/geometry/rect.h" | 25 #include "ui/gfx/geometry/rect.h" |
| 25 #include "ui/gfx/geometry/rect_conversions.h" | 26 #include "ui/gfx/geometry/rect_conversions.h" |
| 26 | 27 |
| 27 class SkCanvas; | 28 class SkCanvas; |
| 28 | 29 |
| 29 namespace cc { | 30 namespace cc { |
| 30 class DisplayItem; | 31 class DisplayItem; |
| 31 | 32 |
| (...skipping 110 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 142 | 143 |
| 143 std::unique_ptr<base::trace_event::ConvertableToTraceFormat> AsValue( | 144 std::unique_ptr<base::trace_event::ConvertableToTraceFormat> AsValue( |
| 144 bool include_items) const; | 145 bool include_items) const; |
| 145 | 146 |
| 146 void EmitTraceSnapshot() const; | 147 void EmitTraceSnapshot() const; |
| 147 | 148 |
| 148 void GenerateDiscardableImagesMetadata(); | 149 void GenerateDiscardableImagesMetadata(); |
| 149 void GetDiscardableImagesInRect(const gfx::Rect& rect, | 150 void GetDiscardableImagesInRect(const gfx::Rect& rect, |
| 150 float contents_scale, | 151 float contents_scale, |
| 151 std::vector<DrawImage>* images); | 152 std::vector<DrawImage>* images); |
| 153 gfx::Rect GetRectForImage(ImageId image_id) const; |
| 152 | 154 |
| 153 void SetRetainVisualRectsForTesting(bool retain) { | 155 void SetRetainVisualRectsForTesting(bool retain) { |
| 154 retain_visual_rects_ = retain; | 156 retain_visual_rects_ = retain; |
| 155 } | 157 } |
| 156 | 158 |
| 157 size_t size() const { return inputs_.items.size(); } | 159 size_t size() const { return inputs_.items.size(); } |
| 158 | 160 |
| 159 gfx::Rect VisualRectForTesting(int index) { | 161 gfx::Rect VisualRectForTesting(int index) { |
| 160 return inputs_.visual_rects[index]; | 162 return inputs_.visual_rects[index]; |
| 161 } | 163 } |
| (...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 212 Inputs inputs_; | 214 Inputs inputs_; |
| 213 | 215 |
| 214 friend class base::RefCountedThreadSafe<DisplayItemList>; | 216 friend class base::RefCountedThreadSafe<DisplayItemList>; |
| 215 FRIEND_TEST_ALL_PREFIXES(DisplayItemListTest, ApproximateMemoryUsage); | 217 FRIEND_TEST_ALL_PREFIXES(DisplayItemListTest, ApproximateMemoryUsage); |
| 216 DISALLOW_COPY_AND_ASSIGN(DisplayItemList); | 218 DISALLOW_COPY_AND_ASSIGN(DisplayItemList); |
| 217 }; | 219 }; |
| 218 | 220 |
| 219 } // namespace cc | 221 } // namespace cc |
| 220 | 222 |
| 221 #endif // CC_PLAYBACK_DISPLAY_ITEM_LIST_H_ | 223 #endif // CC_PLAYBACK_DISPLAY_ITEM_LIST_H_ |
| OLD | NEW |