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

Side by Side Diff: cc/blink/web_display_item_list_impl.cc

Issue 1819683002: Use sk_sp-based picture recording APIs (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 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
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 #include "cc/blink/web_display_item_list_impl.h" 5 #include "cc/blink/web_display_item_list_impl.h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 #include <stdint.h> 8 #include <stdint.h>
9 9
10 #include <vector> 10 #include <vector>
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after
43 : display_item_list_(CreateUncachedDisplayItemListForBlink()) { 43 : display_item_list_(CreateUncachedDisplayItemListForBlink()) {
44 } 44 }
45 45
46 WebDisplayItemListImpl::WebDisplayItemListImpl( 46 WebDisplayItemListImpl::WebDisplayItemListImpl(
47 cc::DisplayItemList* display_list) 47 cc::DisplayItemList* display_list)
48 : display_item_list_(display_list) { 48 : display_item_list_(display_list) {
49 } 49 }
50 50
51 void WebDisplayItemListImpl::appendDrawingItem( 51 void WebDisplayItemListImpl::appendDrawingItem(
52 const blink::WebRect& visual_rect, 52 const blink::WebRect& visual_rect,
53 const SkPicture* picture) { 53 sk_sp<const SkPicture> picture) {
54 if (display_item_list_->RetainsIndividualDisplayItems()) { 54 if (display_item_list_->RetainsIndividualDisplayItems()) {
55 display_item_list_->CreateAndAppendItem<cc::DrawingDisplayItem>( 55 display_item_list_->CreateAndAppendItem<cc::DrawingDisplayItem>(
56 visual_rect, skia::SharePtr(picture)); 56 visual_rect, std::move(picture));
57 } else { 57 } else {
58 cc::DrawingDisplayItem item(skia::SharePtr(picture)); 58 cc::DrawingDisplayItem item(std::move(picture));
59 display_item_list_->RasterIntoCanvas(item); 59 display_item_list_->RasterIntoCanvas(item);
60 } 60 }
61 } 61 }
62 62
63 void WebDisplayItemListImpl::appendClipItem( 63 void WebDisplayItemListImpl::appendClipItem(
64 const blink::WebRect& visual_rect, 64 const blink::WebRect& visual_rect,
65 const blink::WebRect& clip_rect, 65 const blink::WebRect& clip_rect,
66 const blink::WebVector<SkRRect>& rounded_clip_rects) { 66 const blink::WebVector<SkRRect>& rounded_clip_rects) {
67 std::vector<SkRRect> rounded_rects; 67 std::vector<SkRRect> rounded_rects;
68 for (size_t i = 0; i < rounded_clip_rects.size(); ++i) { 68 for (size_t i = 0; i < rounded_clip_rects.size(); ++i) {
(...skipping 159 matching lines...) Expand 10 before | Expand all | Expand 10 after
228 228
229 void WebDisplayItemListImpl::appendEndScrollItem( 229 void WebDisplayItemListImpl::appendEndScrollItem(
230 const blink::WebRect& visual_rect) { 230 const blink::WebRect& visual_rect) {
231 appendEndTransformItem(visual_rect); 231 appendEndTransformItem(visual_rect);
232 } 232 }
233 233
234 WebDisplayItemListImpl::~WebDisplayItemListImpl() { 234 WebDisplayItemListImpl::~WebDisplayItemListImpl() {
235 } 235 }
236 236
237 } // namespace cc_blink 237 } // namespace cc_blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698