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

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

Issue 2751833007: cc: Move DisplayItem::Raster up to DisplayItemList (Closed)
Patch Set: virtualraster: . Created 3 years, 9 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 <stddef.h> 8 #include <stddef.h>
9 9
10 #include <memory> 10 #include <memory>
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after
42 DisplayItemList(); 42 DisplayItemList();
43 43
44 // TODO(trchen): Deprecated. Apply clip and scale on the canvas instead. 44 // TODO(trchen): Deprecated. Apply clip and scale on the canvas instead.
45 void Raster(SkCanvas* canvas, 45 void Raster(SkCanvas* canvas,
46 SkPicture::AbortCallback* callback, 46 SkPicture::AbortCallback* callback,
47 const gfx::Rect& canvas_target_playback_rect, 47 const gfx::Rect& canvas_target_playback_rect,
48 float contents_scale) const; 48 float contents_scale) const;
49 49
50 void Raster(SkCanvas* canvas, SkPicture::AbortCallback* callback) const; 50 void Raster(SkCanvas* canvas, SkPicture::AbortCallback* callback) const;
51 51
52
53 // Because processing happens in these CreateAndAppend functions, all the set 52 // Because processing happens in these CreateAndAppend functions, all the set
54 // up for the item should be done via the args, which is why the return type 53 // up for the item should be done via the args, which is why the return type
55 // needs to be const, to prevent set-after-processing mistakes. 54 // needs to be const, to prevent set-after-processing mistakes.
56 55
57 // Most paired begin item types default to an empty visual rect, which will 56 // Most paired begin item types default to an empty visual rect, which will
58 // subsequently be grown as needed to encompass any contained items that draw 57 // subsequently be grown as needed to encompass any contained items that draw
59 // content, such as drawing or filter items. 58 // content, such as drawing or filter items.
60 template <typename DisplayItemType, typename... Args> 59 template <typename DisplayItemType, typename... Args>
61 const DisplayItemType& CreateAndAppendPairedBeginItem(Args&&... args) { 60 const DisplayItemType& CreateAndAppendPairedBeginItem(Args&&... args) {
62 return CreateAndAppendPairedBeginItemWithVisualRect<DisplayItemType>( 61 return CreateAndAppendPairedBeginItemWithVisualRect<DisplayItemType>(
(...skipping 147 matching lines...) Expand 10 before | Expand all | Expand 10 after
210 Inputs inputs_; 209 Inputs inputs_;
211 210
212 friend class base::RefCountedThreadSafe<DisplayItemList>; 211 friend class base::RefCountedThreadSafe<DisplayItemList>;
213 FRIEND_TEST_ALL_PREFIXES(DisplayItemListTest, ApproximateMemoryUsage); 212 FRIEND_TEST_ALL_PREFIXES(DisplayItemListTest, ApproximateMemoryUsage);
214 DISALLOW_COPY_AND_ASSIGN(DisplayItemList); 213 DISALLOW_COPY_AND_ASSIGN(DisplayItemList);
215 }; 214 };
216 215
217 } // namespace cc 216 } // namespace cc
218 217
219 #endif // CC_PLAYBACK_DISPLAY_ITEM_LIST_H_ 218 #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