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

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

Issue 913413005: Constify SkPicture in DrawingDisplayItem (cc side) (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix compile issue. Created 5 years, 10 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 <vector> 7 #include <vector>
8 8
9 #include "cc/blink/web_blend_mode.h" 9 #include "cc/blink/web_blend_mode.h"
10 #include "cc/resources/clip_display_item.h" 10 #include "cc/resources/clip_display_item.h"
(...skipping 15 matching lines...) Expand all
26 26
27 WebDisplayItemListImpl::WebDisplayItemListImpl() 27 WebDisplayItemListImpl::WebDisplayItemListImpl()
28 : display_item_list_(cc::DisplayItemList::Create()) { 28 : display_item_list_(cc::DisplayItemList::Create()) {
29 } 29 }
30 30
31 scoped_refptr<cc::DisplayItemList> WebDisplayItemListImpl::ToDisplayItemList() { 31 scoped_refptr<cc::DisplayItemList> WebDisplayItemListImpl::ToDisplayItemList() {
32 return display_item_list_; 32 return display_item_list_;
33 } 33 }
34 34
35 void WebDisplayItemListImpl::appendDrawingItem( 35 void WebDisplayItemListImpl::appendDrawingItem(
36 const SkPicture* picture,
37 const blink::WebFloatPoint& location) {
38 display_item_list_->AppendItem(
39 cc::DrawingDisplayItem::Create(skia::SharePtr(picture)));
40 }
41
42 void WebDisplayItemListImpl::appendDrawingItem(
36 SkPicture* picture, 43 SkPicture* picture,
37 const blink::WebFloatPoint& location) { 44 const blink::WebFloatPoint& location) {
38 display_item_list_->AppendItem( 45 display_item_list_->AppendItem(
39 cc::DrawingDisplayItem::Create(skia::SharePtr(picture), location)); 46 cc::DrawingDisplayItem::Create(skia::SharePtr(picture)));
40 } 47 }
41 48
42 void WebDisplayItemListImpl::appendClipItem( 49 void WebDisplayItemListImpl::appendClipItem(
43 const blink::WebRect& clip_rect, 50 const blink::WebRect& clip_rect,
44 const blink::WebVector<SkRRect>& rounded_clip_rects) { 51 const blink::WebVector<SkRRect>& rounded_clip_rects) {
45 std::vector<SkRRect> rounded_rects; 52 std::vector<SkRRect> rounded_rects;
46 for (size_t i = 0; i < rounded_clip_rects.size(); ++i) { 53 for (size_t i = 0; i < rounded_clip_rects.size(); ++i) {
47 rounded_rects.push_back(rounded_clip_rects[i]); 54 rounded_rects.push_back(rounded_clip_rects[i]);
48 } 55 }
49 display_item_list_->AppendItem( 56 display_item_list_->AppendItem(
(...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after
103 } 110 }
104 111
105 void WebDisplayItemListImpl::appendEndFilterItem() { 112 void WebDisplayItemListImpl::appendEndFilterItem() {
106 display_item_list_->AppendItem(cc::EndFilterDisplayItem::Create()); 113 display_item_list_->AppendItem(cc::EndFilterDisplayItem::Create());
107 } 114 }
108 115
109 WebDisplayItemListImpl::~WebDisplayItemListImpl() { 116 WebDisplayItemListImpl::~WebDisplayItemListImpl() {
110 } 117 }
111 118
112 } // namespace cc_blink 119 } // namespace cc_blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698