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

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

Issue 940463005: Remove #ifs from WebDisplayItemListImpl (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: 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
« no previous file with comments | « cc/blink/web_display_item_list_impl.h ('k') | no next file » | 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 #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
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
OLDNEW
« no previous file with comments | « cc/blink/web_display_item_list_impl.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698