OLD | NEW |
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 Loading... |
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 SkPicture* picture, | 36 const SkPicture* picture, |
37 const blink::WebFloatPoint& location) { | 37 const blink::WebFloatPoint& location) { |
38 display_item_list_->AppendItem( | 38 display_item_list_->AppendItem( |
39 cc::DrawingDisplayItem::Create(skia::SharePtr(picture), location)); | 39 cc::DrawingDisplayItem::Create(skia::SharePtr(picture))); |
40 } | 40 } |
41 | 41 |
42 void WebDisplayItemListImpl::appendClipItem( | 42 void WebDisplayItemListImpl::appendClipItem( |
43 const blink::WebRect& clip_rect, | 43 const blink::WebRect& clip_rect, |
44 const blink::WebVector<SkRRect>& rounded_clip_rects) { | 44 const blink::WebVector<SkRRect>& rounded_clip_rects) { |
45 std::vector<SkRRect> rounded_rects; | 45 std::vector<SkRRect> rounded_rects; |
46 for (size_t i = 0; i < rounded_clip_rects.size(); ++i) { | 46 for (size_t i = 0; i < rounded_clip_rects.size(); ++i) { |
47 rounded_rects.push_back(rounded_clip_rects[i]); | 47 rounded_rects.push_back(rounded_clip_rects[i]); |
48 } | 48 } |
49 display_item_list_->AppendItem( | 49 display_item_list_->AppendItem( |
(...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
103 } | 103 } |
104 | 104 |
105 void WebDisplayItemListImpl::appendEndFilterItem() { | 105 void WebDisplayItemListImpl::appendEndFilterItem() { |
106 display_item_list_->AppendItem(cc::EndFilterDisplayItem::Create()); | 106 display_item_list_->AppendItem(cc::EndFilterDisplayItem::Create()); |
107 } | 107 } |
108 | 108 |
109 WebDisplayItemListImpl::~WebDisplayItemListImpl() { | 109 WebDisplayItemListImpl::~WebDisplayItemListImpl() { |
110 } | 110 } |
111 | 111 |
112 } // namespace cc_blink | 112 } // namespace cc_blink |
OLD | NEW |