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" |
11 #include "cc/resources/clip_display_item.h" | 11 #include "cc/resources/clip_display_item.h" |
12 #include "cc/resources/clip_path_display_item.h" | 12 #include "cc/resources/clip_path_display_item.h" |
13 #include "cc/resources/compositing_display_item.h" | 13 #include "cc/resources/compositing_display_item.h" |
14 #include "cc/resources/drawing_display_item.h" | 14 #include "cc/resources/drawing_display_item.h" |
15 #include "cc/resources/filter_display_item.h" | 15 #include "cc/resources/filter_display_item.h" |
16 #include "cc/resources/float_clip_display_item.h" | 16 #include "cc/resources/float_clip_display_item.h" |
17 #include "cc/resources/transform_display_item.h" | 17 #include "cc/resources/transform_display_item.h" |
18 #include "cc/resources/transparency_display_item.h" | |
19 #include "skia/ext/refptr.h" | 18 #include "skia/ext/refptr.h" |
20 #include "third_party/WebKit/public/platform/WebFloatRect.h" | 19 #include "third_party/WebKit/public/platform/WebFloatRect.h" |
21 #include "third_party/WebKit/public/platform/WebRect.h" | 20 #include "third_party/WebKit/public/platform/WebRect.h" |
22 #include "third_party/skia/include/core/SkColorFilter.h" | 21 #include "third_party/skia/include/core/SkColorFilter.h" |
23 #include "third_party/skia/include/core/SkImageFilter.h" | 22 #include "third_party/skia/include/core/SkImageFilter.h" |
24 #include "third_party/skia/include/core/SkPicture.h" | 23 #include "third_party/skia/include/core/SkPicture.h" |
25 #include "third_party/skia/include/utils/SkMatrix44.h" | 24 #include "third_party/skia/include/utils/SkMatrix44.h" |
26 #include "ui/gfx/transform.h" | 25 #include "ui/gfx/transform.h" |
27 | 26 |
28 namespace cc_blink { | 27 namespace cc_blink { |
(...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
78 void WebDisplayItemListImpl::appendTransformItem(const SkMatrix44& matrix) { | 77 void WebDisplayItemListImpl::appendTransformItem(const SkMatrix44& matrix) { |
79 gfx::Transform transform; | 78 gfx::Transform transform; |
80 transform.matrix() = matrix; | 79 transform.matrix() = matrix; |
81 display_item_list_->AppendItem(cc::TransformDisplayItem::Create(transform)); | 80 display_item_list_->AppendItem(cc::TransformDisplayItem::Create(transform)); |
82 } | 81 } |
83 | 82 |
84 void WebDisplayItemListImpl::appendEndTransformItem() { | 83 void WebDisplayItemListImpl::appendEndTransformItem() { |
85 display_item_list_->AppendItem(cc::EndTransformDisplayItem::Create()); | 84 display_item_list_->AppendItem(cc::EndTransformDisplayItem::Create()); |
86 } | 85 } |
87 | 86 |
88 // TODO(pdr): Remove once there are no more callers. | |
89 void WebDisplayItemListImpl::appendTransparencyItem( | |
90 float opacity, | |
91 blink::WebBlendMode blend_mode) { | |
92 display_item_list_->AppendItem(cc::TransparencyDisplayItem::Create( | |
93 opacity, BlendModeToSkia(blend_mode))); | |
94 } | |
95 | |
96 // TODO(pdr): Remove once there are no more callers. | |
97 void WebDisplayItemListImpl::appendEndTransparencyItem() { | |
98 display_item_list_->AppendItem(cc::EndTransparencyDisplayItem::Create()); | |
99 } | |
100 | |
101 // TODO(pdr): Remove this once the blink-side callers have been removed. | 87 // TODO(pdr): Remove this once the blink-side callers have been removed. |
102 void WebDisplayItemListImpl::appendCompositingItem( | 88 void WebDisplayItemListImpl::appendCompositingItem( |
103 float opacity, | 89 float opacity, |
104 SkXfermode::Mode xfermode, | 90 SkXfermode::Mode xfermode, |
105 SkColorFilter* color_filter) { | 91 SkColorFilter* color_filter) { |
106 appendCompositingItem(opacity, xfermode, nullptr, color_filter); | 92 appendCompositingItem(opacity, xfermode, nullptr, color_filter); |
107 } | 93 } |
108 | 94 |
109 void WebDisplayItemListImpl::appendCompositingItem( | 95 void WebDisplayItemListImpl::appendCompositingItem( |
110 float opacity, | 96 float opacity, |
(...skipping 30 matching lines...) Expand all Loading... |
141 } | 127 } |
142 | 128 |
143 void WebDisplayItemListImpl::appendEndScrollItem() { | 129 void WebDisplayItemListImpl::appendEndScrollItem() { |
144 appendEndTransformItem(); | 130 appendEndTransformItem(); |
145 } | 131 } |
146 | 132 |
147 WebDisplayItemListImpl::~WebDisplayItemListImpl() { | 133 WebDisplayItemListImpl::~WebDisplayItemListImpl() { |
148 } | 134 } |
149 | 135 |
150 } // namespace cc_blink | 136 } // namespace cc_blink |
OLD | NEW |