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

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

Issue 2523673004: [NOT FOR COMMIT] Fully replace SkCanvas uses.
Patch Set: Support Android build. Created 4 years 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.cc ('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 36 matching lines...) Expand 10 before | Expand all | Expand 10 after
47 // (crbug.com/548434). 47 // (crbug.com/548434).
48 static scoped_refptr<DisplayItemList> CreateFromProto( 48 static scoped_refptr<DisplayItemList> CreateFromProto(
49 const proto::DisplayItemList& proto, 49 const proto::DisplayItemList& proto,
50 ClientPictureCache* client_picture_cache, 50 ClientPictureCache* client_picture_cache,
51 std::vector<uint32_t>* used_engine_picture_ids); 51 std::vector<uint32_t>* used_engine_picture_ids);
52 52
53 // Creates a Protobuf representing the state of this DisplayItemList. 53 // Creates a Protobuf representing the state of this DisplayItemList.
54 void ToProtobuf(proto::DisplayItemList* proto); 54 void ToProtobuf(proto::DisplayItemList* proto);
55 55
56 // TODO(trchen): Deprecated. Apply clip and scale on the canvas instead. 56 // TODO(trchen): Deprecated. Apply clip and scale on the canvas instead.
57 void Raster(SkCanvas* canvas, 57 void Raster(CdlCanvas* canvas,
58 SkPicture::AbortCallback* callback, 58 SkPicture::AbortCallback* callback,
59 const gfx::Rect& canvas_target_playback_rect, 59 const gfx::Rect& canvas_target_playback_rect,
60 float contents_scale) const; 60 float contents_scale) const;
61 61
62 void Raster(SkCanvas* canvas, SkPicture::AbortCallback* callback) const; 62 void Raster(CdlCanvas* canvas, SkPicture::AbortCallback* callback) const;
63
64 63
65 // Because processing happens in these CreateAndAppend functions, all the set 64 // Because processing happens in these CreateAndAppend functions, all the set
66 // up for the item should be done via the args, which is why the return type 65 // up for the item should be done via the args, which is why the return type
67 // needs to be const, to prevent set-after-processing mistakes. 66 // needs to be const, to prevent set-after-processing mistakes.
68 67
69 // Most paired begin item types default to an empty visual rect, which will 68 // Most paired begin item types default to an empty visual rect, which will
70 // subsequently be grown as needed to encompass any contained items that draw 69 // subsequently be grown as needed to encompass any contained items that draw
71 // content, such as drawing or filter items. 70 // content, such as drawing or filter items.
72 template <typename DisplayItemType, typename... Args> 71 template <typename DisplayItemType, typename... Args>
73 const DisplayItemType& CreateAndAppendPairedBeginItem(Args&&... args) { 72 const DisplayItemType& CreateAndAppendPairedBeginItem(Args&&... args) {
(...skipping 160 matching lines...) Expand 10 before | Expand all | Expand 10 after
234 Inputs inputs_; 233 Inputs inputs_;
235 234
236 friend class base::RefCountedThreadSafe<DisplayItemList>; 235 friend class base::RefCountedThreadSafe<DisplayItemList>;
237 FRIEND_TEST_ALL_PREFIXES(DisplayItemListTest, ApproximateMemoryUsage); 236 FRIEND_TEST_ALL_PREFIXES(DisplayItemListTest, ApproximateMemoryUsage);
238 DISALLOW_COPY_AND_ASSIGN(DisplayItemList); 237 DISALLOW_COPY_AND_ASSIGN(DisplayItemList);
239 }; 238 };
240 239
241 } // namespace cc 240 } // namespace cc
242 241
243 #endif // CC_PLAYBACK_DISPLAY_ITEM_LIST_H_ 242 #endif // CC_PLAYBACK_DISPLAY_ITEM_LIST_H_
OLDNEW
« no previous file with comments | « cc/playback/display_item.cc ('k') | cc/playback/display_item_list.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698