Chromium Code Reviews| 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_layer_impl.h" | 5 #include "cc/blink/web_layer_impl.h" |
| 6 | 6 |
| 7 #include <stddef.h> | 7 #include <stddef.h> |
| 8 #include <stdint.h> | 8 #include <stdint.h> |
| 9 | 9 |
| 10 #include <utility> | 10 #include <utility> |
| 11 #include <vector> | 11 #include <vector> |
| 12 | 12 |
| 13 #include "base/bind.h" | 13 #include "base/bind.h" |
| 14 #include "base/lazy_instance.h" | 14 #include "base/lazy_instance.h" |
| 15 #include "base/strings/string_util.h" | 15 #include "base/strings/string_util.h" |
| 16 #include "base/threading/thread_checker.h" | 16 #include "base/threading/thread_checker.h" |
| 17 #include "base/trace_event/trace_event_impl.h" | 17 #include "base/trace_event/trace_event_impl.h" |
| 18 #include "cc/animation/animation.h" | 18 #include "cc/animation/animation.h" |
| 19 #include "cc/animation/mutable_properties.h" | 19 #include "cc/animation/mutable_properties.h" |
| 20 #include "cc/base/region.h" | 20 #include "cc/base/region.h" |
| 21 #include "cc/base/switches.h" | 21 #include "cc/base/switches.h" |
| 22 #include "cc/blink/web_animation_impl.h" | 22 #include "cc/blink/web_animation_impl.h" |
| 23 #include "cc/blink/web_blend_mode.h" | 23 #include "cc/blink/web_blend_mode.h" |
| 24 #include "cc/blink/web_filter_operations_impl.h" | |
| 25 #include "cc/blink/web_to_cc_animation_delegate_adapter.h" | 24 #include "cc/blink/web_to_cc_animation_delegate_adapter.h" |
| 26 #include "cc/layers/layer.h" | 25 #include "cc/layers/layer.h" |
| 27 #include "cc/layers/layer_position_constraint.h" | 26 #include "cc/layers/layer_position_constraint.h" |
| 28 #include "cc/layers/layer_settings.h" | 27 #include "cc/layers/layer_settings.h" |
| 29 #include "cc/trees/layer_tree_host.h" | 28 #include "cc/trees/layer_tree_host.h" |
| 29 #include "third_party/WebKit/Source/platform/animation/WebFilterOperations.h" | |
|
loyso (OOO)
2016/01/21 03:59:22
WIP
| |
| 30 #include "third_party/WebKit/public/platform/WebCompositorMutableProperties.h" | 30 #include "third_party/WebKit/public/platform/WebCompositorMutableProperties.h" |
| 31 #include "third_party/WebKit/public/platform/WebFloatPoint.h" | 31 #include "third_party/WebKit/public/platform/WebFloatPoint.h" |
| 32 #include "third_party/WebKit/public/platform/WebFloatRect.h" | 32 #include "third_party/WebKit/public/platform/WebFloatRect.h" |
| 33 #include "third_party/WebKit/public/platform/WebLayerPositionConstraint.h" | 33 #include "third_party/WebKit/public/platform/WebLayerPositionConstraint.h" |
| 34 #include "third_party/WebKit/public/platform/WebLayerScrollClient.h" | 34 #include "third_party/WebKit/public/platform/WebLayerScrollClient.h" |
| 35 #include "third_party/WebKit/public/platform/WebSize.h" | 35 #include "third_party/WebKit/public/platform/WebSize.h" |
| 36 #include "third_party/skia/include/utils/SkMatrix44.h" | 36 #include "third_party/skia/include/utils/SkMatrix44.h" |
| 37 #include "ui/gfx/geometry/rect_conversions.h" | 37 #include "ui/gfx/geometry/rect_conversions.h" |
| 38 #include "ui/gfx/geometry/vector2d_conversions.h" | 38 #include "ui/gfx/geometry/vector2d_conversions.h" |
| 39 | 39 |
| (...skipping 186 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 226 | 226 |
| 227 void WebLayerImpl::setBackgroundColor(WebColor color) { | 227 void WebLayerImpl::setBackgroundColor(WebColor color) { |
| 228 layer_->SetBackgroundColor(color); | 228 layer_->SetBackgroundColor(color); |
| 229 } | 229 } |
| 230 | 230 |
| 231 WebColor WebLayerImpl::backgroundColor() const { | 231 WebColor WebLayerImpl::backgroundColor() const { |
| 232 return layer_->background_color(); | 232 return layer_->background_color(); |
| 233 } | 233 } |
| 234 | 234 |
| 235 void WebLayerImpl::setFilters(const WebFilterOperations& filters) { | 235 void WebLayerImpl::setFilters(const WebFilterOperations& filters) { |
| 236 const WebFilterOperationsImpl& filters_impl = | 236 const WebFilterOperations& filters_impl = |
| 237 static_cast<const WebFilterOperationsImpl&>(filters); | 237 static_cast<const WebFilterOperations&>(filters); |
| 238 layer_->SetFilters(filters_impl.AsFilterOperations()); | 238 layer_->SetFilters(filters_impl.AsFilterOperations()); |
| 239 } | 239 } |
| 240 | 240 |
| 241 void WebLayerImpl::setBackgroundFilters(const WebFilterOperations& filters) { | 241 void WebLayerImpl::setBackgroundFilters(const WebFilterOperations& filters) { |
| 242 const WebFilterOperationsImpl& filters_impl = | 242 const WebFilterOperations& filters_impl = |
| 243 static_cast<const WebFilterOperationsImpl&>(filters); | 243 static_cast<const WebFilterOperations&>(filters); |
| 244 layer_->SetBackgroundFilters(filters_impl.AsFilterOperations()); | 244 layer_->SetBackgroundFilters(filters_impl.AsFilterOperations()); |
| 245 } | 245 } |
| 246 | 246 |
| 247 void WebLayerImpl::setAnimationDelegate( | 247 void WebLayerImpl::setAnimationDelegate( |
| 248 blink::WebCompositorAnimationDelegate* delegate) { | 248 blink::WebCompositorAnimationDelegate* delegate) { |
| 249 if (!delegate) { | 249 if (!delegate) { |
| 250 animation_delegate_adapter_.reset(); | 250 animation_delegate_adapter_.reset(); |
| 251 layer_->set_layer_animation_delegate(nullptr); | 251 layer_->set_layer_animation_delegate(nullptr); |
| 252 return; | 252 return; |
| 253 } | 253 } |
| (...skipping 315 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 569 | 569 |
| 570 Layer* WebLayerImpl::layer() const { | 570 Layer* WebLayerImpl::layer() const { |
| 571 return layer_.get(); | 571 return layer_.get(); |
| 572 } | 572 } |
| 573 | 573 |
| 574 void WebLayerImpl::SetContentsOpaqueIsFixed(bool fixed) { | 574 void WebLayerImpl::SetContentsOpaqueIsFixed(bool fixed) { |
| 575 contents_opaque_is_fixed_ = fixed; | 575 contents_opaque_is_fixed_ = fixed; |
| 576 } | 576 } |
| 577 | 577 |
| 578 } // namespace cc_blink | 578 } // namespace cc_blink |
| OLD | NEW |