| 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" |
| 11 #include "base/trace_event/trace_event.h" | 11 #include "base/trace_event/trace_event.h" |
| 12 #include "cc/base/cc_export.h" | 12 #include "cc/base/cc_export.h" |
| 13 #include "cc/base/list_container.h" |
| 13 #include "cc/base/scoped_ptr_vector.h" | 14 #include "cc/base/scoped_ptr_vector.h" |
| 14 #include "cc/playback/display_item.h" | 15 #include "cc/playback/display_item.h" |
| 15 #include "cc/playback/pixel_ref_map.h" | 16 #include "cc/playback/pixel_ref_map.h" |
| 16 // TODO(danakj): Move ListContainer out of cc/quads/ | |
| 17 #include "cc/quads/list_container.h" | |
| 18 #include "skia/ext/refptr.h" | 17 #include "skia/ext/refptr.h" |
| 19 #include "third_party/skia/include/core/SkPicture.h" | 18 #include "third_party/skia/include/core/SkPicture.h" |
| 20 #include "ui/gfx/geometry/rect.h" | 19 #include "ui/gfx/geometry/rect.h" |
| 21 | 20 |
| 22 class SkCanvas; | 21 class SkCanvas; |
| 23 class SkPictureRecorder; | 22 class SkPictureRecorder; |
| 24 | 23 |
| 25 namespace cc { | 24 namespace cc { |
| 26 | 25 |
| 26 #if !defined(COMPILER_MSVC) |
| 27 extern template class ListContainer<DisplayItem>; |
| 28 #endif |
| 29 |
| 27 class CC_EXPORT DisplayItemList | 30 class CC_EXPORT DisplayItemList |
| 28 : public base::RefCountedThreadSafe<DisplayItemList> { | 31 : public base::RefCountedThreadSafe<DisplayItemList> { |
| 29 public: | 32 public: |
| 30 static scoped_refptr<DisplayItemList> Create(gfx::Rect layer_rect, | 33 static scoped_refptr<DisplayItemList> Create(gfx::Rect layer_rect, |
| 31 bool use_cached_picture); | 34 bool use_cached_picture); |
| 32 | 35 |
| 33 void Raster(SkCanvas* canvas, | 36 void Raster(SkCanvas* canvas, |
| 34 SkPicture::AbortCallback* callback, | 37 SkPicture::AbortCallback* callback, |
| 35 float contents_scale) const; | 38 float contents_scale) const; |
| 36 | 39 |
| (...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 90 | 93 |
| 91 friend class base::RefCountedThreadSafe<DisplayItemList>; | 94 friend class base::RefCountedThreadSafe<DisplayItemList>; |
| 92 friend class PixelRefMap::Iterator; | 95 friend class PixelRefMap::Iterator; |
| 93 FRIEND_TEST_ALL_PREFIXES(DisplayItemListTest, PictureMemoryUsage); | 96 FRIEND_TEST_ALL_PREFIXES(DisplayItemListTest, PictureMemoryUsage); |
| 94 DISALLOW_COPY_AND_ASSIGN(DisplayItemList); | 97 DISALLOW_COPY_AND_ASSIGN(DisplayItemList); |
| 95 }; | 98 }; |
| 96 | 99 |
| 97 } // namespace cc | 100 } // namespace cc |
| 98 | 101 |
| 99 #endif // CC_PLAYBACK_DISPLAY_ITEM_LIST_H_ | 102 #endif // CC_PLAYBACK_DISPLAY_ITEM_LIST_H_ |
| OLD | NEW |