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/blink/web_filter_operations_impl.h" | 10 #include "cc/blink/web_filter_operations_impl.h" |
(...skipping 83 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
94 } | 94 } |
95 | 95 |
96 void WebDisplayItemListImpl::appendEndTransformItem() { | 96 void WebDisplayItemListImpl::appendEndTransformItem() { |
97 display_item_list_->AppendItem(cc::EndTransformDisplayItem::Create()); | 97 display_item_list_->AppendItem(cc::EndTransformDisplayItem::Create()); |
98 } | 98 } |
99 | 99 |
100 void WebDisplayItemListImpl::appendEndTransparencyItem() { | 100 void WebDisplayItemListImpl::appendEndTransparencyItem() { |
101 display_item_list_->AppendItem(cc::EndTransparencyDisplayItem::Create()); | 101 display_item_list_->AppendItem(cc::EndTransparencyDisplayItem::Create()); |
102 } | 102 } |
103 | 103 |
104 #if FILTER_DISPLAY_ITEM_USES_FILTER_OPERATIONS | |
105 void WebDisplayItemListImpl::appendFilterItem( | 104 void WebDisplayItemListImpl::appendFilterItem( |
106 const blink::WebFilterOperations& filters, | 105 const blink::WebFilterOperations& filters, |
107 const blink::WebFloatRect& bounds) { | 106 const blink::WebFloatRect& bounds) { |
108 const WebFilterOperationsImpl& filters_impl = | 107 const WebFilterOperationsImpl& filters_impl = |
109 static_cast<const WebFilterOperationsImpl&>(filters); | 108 static_cast<const WebFilterOperationsImpl&>(filters); |
110 display_item_list_->AppendItem( | 109 display_item_list_->AppendItem( |
111 cc::FilterDisplayItem::Create(filters_impl.AsFilterOperations(), bounds)); | 110 cc::FilterDisplayItem::Create(filters_impl.AsFilterOperations(), bounds)); |
112 } | 111 } |
113 #else | |
114 void WebDisplayItemListImpl::appendFilterItem( | |
115 SkImageFilter* filter, | |
116 const blink::WebFloatRect& bounds) { | |
117 cc::FilterOperations filter_operations; | |
118 filter_operations.Append( | |
119 cc::FilterOperation::CreateReferenceFilter(skia::SharePtr(filter))); | |
120 display_item_list_->AppendItem( | |
121 cc::FilterDisplayItem::Create(filter_operations, bounds)); | |
122 } | |
123 #endif | |
124 | 112 |
125 void WebDisplayItemListImpl::appendEndFilterItem() { | 113 void WebDisplayItemListImpl::appendEndFilterItem() { |
126 display_item_list_->AppendItem(cc::EndFilterDisplayItem::Create()); | 114 display_item_list_->AppendItem(cc::EndFilterDisplayItem::Create()); |
127 } | 115 } |
128 | 116 |
129 WebDisplayItemListImpl::~WebDisplayItemListImpl() { | 117 WebDisplayItemListImpl::~WebDisplayItemListImpl() { |
130 } | 118 } |
131 | 119 |
132 } // namespace cc_blink | 120 } // namespace cc_blink |
OLD | NEW |