| 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" | |
| 10 #include "cc/blink/web_filter_operations_impl.h" | 9 #include "cc/blink/web_filter_operations_impl.h" |
| 11 #include "cc/resources/clip_display_item.h" | 10 #include "cc/resources/clip_display_item.h" |
| 12 #include "cc/resources/clip_path_display_item.h" | 11 #include "cc/resources/clip_path_display_item.h" |
| 13 #include "cc/resources/compositing_display_item.h" | 12 #include "cc/resources/compositing_display_item.h" |
| 14 #include "cc/resources/drawing_display_item.h" | 13 #include "cc/resources/drawing_display_item.h" |
| 15 #include "cc/resources/filter_display_item.h" | 14 #include "cc/resources/filter_display_item.h" |
| 16 #include "cc/resources/float_clip_display_item.h" | 15 #include "cc/resources/float_clip_display_item.h" |
| 17 #include "cc/resources/transform_display_item.h" | 16 #include "cc/resources/transform_display_item.h" |
| 18 #include "skia/ext/refptr.h" | 17 #include "skia/ext/refptr.h" |
| 19 #include "third_party/WebKit/public/platform/WebFloatRect.h" | 18 #include "third_party/WebKit/public/platform/WebFloatRect.h" |
| 20 #include "third_party/WebKit/public/platform/WebRect.h" | 19 #include "third_party/WebKit/public/platform/WebRect.h" |
| 21 #include "third_party/skia/include/core/SkColorFilter.h" | 20 #include "third_party/skia/include/core/SkColorFilter.h" |
| 22 #include "third_party/skia/include/core/SkImageFilter.h" | |
| 23 #include "third_party/skia/include/core/SkPicture.h" | 21 #include "third_party/skia/include/core/SkPicture.h" |
| 24 #include "third_party/skia/include/utils/SkMatrix44.h" | 22 #include "third_party/skia/include/utils/SkMatrix44.h" |
| 25 #include "ui/gfx/transform.h" | 23 #include "ui/gfx/transform.h" |
| 26 | 24 |
| 27 namespace cc_blink { | 25 namespace cc_blink { |
| 28 | 26 |
| 29 WebDisplayItemListImpl::WebDisplayItemListImpl() | 27 WebDisplayItemListImpl::WebDisplayItemListImpl() |
| 30 : display_item_list_(cc::DisplayItemList::Create()) { | 28 : display_item_list_(cc::DisplayItemList::Create()) { |
| 31 } | 29 } |
| 32 | 30 |
| (...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 77 void WebDisplayItemListImpl::appendTransformItem(const SkMatrix44& matrix) { | 75 void WebDisplayItemListImpl::appendTransformItem(const SkMatrix44& matrix) { |
| 78 gfx::Transform transform; | 76 gfx::Transform transform; |
| 79 transform.matrix() = matrix; | 77 transform.matrix() = matrix; |
| 80 display_item_list_->AppendItem(cc::TransformDisplayItem::Create(transform)); | 78 display_item_list_->AppendItem(cc::TransformDisplayItem::Create(transform)); |
| 81 } | 79 } |
| 82 | 80 |
| 83 void WebDisplayItemListImpl::appendEndTransformItem() { | 81 void WebDisplayItemListImpl::appendEndTransformItem() { |
| 84 display_item_list_->AppendItem(cc::EndTransformDisplayItem::Create()); | 82 display_item_list_->AppendItem(cc::EndTransformDisplayItem::Create()); |
| 85 } | 83 } |
| 86 | 84 |
| 87 // TODO(pdr): Remove this once the blink-side callers have been removed. | |
| 88 void WebDisplayItemListImpl::appendCompositingItem( | |
| 89 float opacity, | |
| 90 SkXfermode::Mode xfermode, | |
| 91 SkColorFilter* color_filter) { | |
| 92 appendCompositingItem(opacity, xfermode, nullptr, color_filter); | |
| 93 } | |
| 94 | |
| 95 void WebDisplayItemListImpl::appendCompositingItem( | 85 void WebDisplayItemListImpl::appendCompositingItem( |
| 96 float opacity, | 86 float opacity, |
| 97 SkXfermode::Mode xfermode, | 87 SkXfermode::Mode xfermode, |
| 98 SkRect* bounds, | 88 SkRect* bounds, |
| 99 SkColorFilter* color_filter) { | 89 SkColorFilter* color_filter) { |
| 100 display_item_list_->AppendItem(cc::CompositingDisplayItem::Create( | 90 display_item_list_->AppendItem(cc::CompositingDisplayItem::Create( |
| 101 opacity, xfermode, bounds, skia::SharePtr(color_filter))); | 91 opacity, xfermode, bounds, skia::SharePtr(color_filter))); |
| 102 } | 92 } |
| 103 | 93 |
| 104 void WebDisplayItemListImpl::appendEndCompositingItem() { | 94 void WebDisplayItemListImpl::appendEndCompositingItem() { |
| (...skipping 22 matching lines...) Expand all Loading... |
| 127 } | 117 } |
| 128 | 118 |
| 129 void WebDisplayItemListImpl::appendEndScrollItem() { | 119 void WebDisplayItemListImpl::appendEndScrollItem() { |
| 130 appendEndTransformItem(); | 120 appendEndTransformItem(); |
| 131 } | 121 } |
| 132 | 122 |
| 133 WebDisplayItemListImpl::~WebDisplayItemListImpl() { | 123 WebDisplayItemListImpl::~WebDisplayItemListImpl() { |
| 134 } | 124 } |
| 135 | 125 |
| 136 } // namespace cc_blink | 126 } // namespace cc_blink |
| OLD | NEW |