Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(705)

Side by Side Diff: cc/playback/display_item_list.h

Issue 1138923005: Remove SK_LEGACY_DRAWPICTURECALLBACK (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: analysis_canvas_unittest fix Created 5 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « cc/playback/display_item.h ('k') | cc/playback/display_item_list.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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/scoped_ptr_vector.h" 13 #include "cc/base/scoped_ptr_vector.h"
14 #include "cc/playback/display_item.h" 14 #include "cc/playback/display_item.h"
15 #include "cc/playback/pixel_ref_map.h" 15 #include "cc/playback/pixel_ref_map.h"
16 // TODO(danakj): Move ListContainer out of cc/quads/ 16 // TODO(danakj): Move ListContainer out of cc/quads/
17 #include "cc/quads/list_container.h" 17 #include "cc/quads/list_container.h"
18 #include "skia/ext/refptr.h" 18 #include "skia/ext/refptr.h"
19 #include "third_party/skia/include/core/SkPicture.h" 19 #include "third_party/skia/include/core/SkPicture.h"
20 #include "ui/gfx/geometry/rect.h" 20 #include "ui/gfx/geometry/rect.h"
21 21
22 class SkCanvas; 22 class SkCanvas;
23 class SkDrawPictureCallback;
24 class SkPictureRecorder; 23 class SkPictureRecorder;
25 24
26 namespace cc { 25 namespace cc {
27 26
28 class CC_EXPORT DisplayItemList 27 class CC_EXPORT DisplayItemList
29 : public base::RefCountedThreadSafe<DisplayItemList> { 28 : public base::RefCountedThreadSafe<DisplayItemList> {
30 public: 29 public:
31 static scoped_refptr<DisplayItemList> Create(gfx::Rect layer_rect, 30 static scoped_refptr<DisplayItemList> Create(gfx::Rect layer_rect,
32 bool use_cached_picture); 31 bool use_cached_picture);
33 32
34 void Raster(SkCanvas* canvas, 33 void Raster(SkCanvas* canvas,
35 SkDrawPictureCallback* callback, 34 SkPicture::AbortCallback* callback,
36 float contents_scale) const; 35 float contents_scale) const;
37 36
38 template <typename DisplayItemType> 37 template <typename DisplayItemType>
39 DisplayItemType* CreateAndAppendItem() { 38 DisplayItemType* CreateAndAppendItem() {
40 #if DCHECK_IS_ON() 39 #if DCHECK_IS_ON()
41 needs_process_ = true; 40 needs_process_ = true;
42 #endif 41 #endif
43 ProcessAppendedItemsOnTheFly(); 42 ProcessAppendedItemsOnTheFly();
44 return items_.AllocateAndConstruct<DisplayItemType>(); 43 return items_.AllocateAndConstruct<DisplayItemType>();
45 } 44 }
(...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after
91 90
92 friend class base::RefCountedThreadSafe<DisplayItemList>; 91 friend class base::RefCountedThreadSafe<DisplayItemList>;
93 friend class PixelRefMap::Iterator; 92 friend class PixelRefMap::Iterator;
94 FRIEND_TEST_ALL_PREFIXES(DisplayItemListTest, PictureMemoryUsage); 93 FRIEND_TEST_ALL_PREFIXES(DisplayItemListTest, PictureMemoryUsage);
95 DISALLOW_COPY_AND_ASSIGN(DisplayItemList); 94 DISALLOW_COPY_AND_ASSIGN(DisplayItemList);
96 }; 95 };
97 96
98 } // namespace cc 97 } // namespace cc
99 98
100 #endif // CC_PLAYBACK_DISPLAY_ITEM_LIST_H_ 99 #endif // CC_PLAYBACK_DISPLAY_ITEM_LIST_H_
OLDNEW
« no previous file with comments | « cc/playback/display_item.h ('k') | cc/playback/display_item_list.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698