| OLD | NEW |
| 1 // Copyright 2011 The Chromium Authors. All rights reserved. | 1 // Copyright 2011 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 "webkit/renderer/compositor_bindings/web_layer_impl.h" | 5 #include "webkit/renderer/compositor_bindings/web_layer_impl.h" |
| 6 | 6 |
| 7 #include "base/bind.h" | 7 #include "base/bind.h" |
| 8 #include "base/debug/trace_event_impl.h" | 8 #include "base/debug/trace_event_impl.h" |
| 9 #include "base/lazy_instance.h" | 9 #include "base/lazy_instance.h" |
| 10 #include "base/strings/string_util.h" | 10 #include "base/strings/string_util.h" |
| (...skipping 193 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 204 static_cast<const WebFilterOperationsImpl&>(filters); | 204 static_cast<const WebFilterOperationsImpl&>(filters); |
| 205 layer_->SetFilters(filters_impl.AsFilterOperations()); | 205 layer_->SetFilters(filters_impl.AsFilterOperations()); |
| 206 } | 206 } |
| 207 | 207 |
| 208 void WebLayerImpl::setBackgroundFilters(const WebFilterOperations& filters) { | 208 void WebLayerImpl::setBackgroundFilters(const WebFilterOperations& filters) { |
| 209 const WebFilterOperationsImpl& filters_impl = | 209 const WebFilterOperationsImpl& filters_impl = |
| 210 static_cast<const WebFilterOperationsImpl&>(filters); | 210 static_cast<const WebFilterOperationsImpl&>(filters); |
| 211 layer_->SetBackgroundFilters(filters_impl.AsFilterOperations()); | 211 layer_->SetBackgroundFilters(filters_impl.AsFilterOperations()); |
| 212 } | 212 } |
| 213 | 213 |
| 214 void WebLayerImpl::setHasGpuRasterizationHint(bool has_hint) { |
| 215 layer_->SetHasGpuRasterizationHint(has_hint); |
| 216 } |
| 217 |
| 214 void WebLayerImpl::setAnimationDelegate( | 218 void WebLayerImpl::setAnimationDelegate( |
| 215 blink::WebAnimationDelegate* delegate) { | 219 blink::WebAnimationDelegate* delegate) { |
| 216 animation_delegate_adapter_.reset( | 220 animation_delegate_adapter_.reset( |
| 217 new WebToCCAnimationDelegateAdapter(delegate)); | 221 new WebToCCAnimationDelegateAdapter(delegate)); |
| 218 layer_->set_layer_animation_delegate(animation_delegate_adapter_.get()); | 222 layer_->set_layer_animation_delegate(animation_delegate_adapter_.get()); |
| 219 } | 223 } |
| 220 | 224 |
| 221 bool WebLayerImpl::addAnimation(blink::WebAnimation* animation) { | 225 bool WebLayerImpl::addAnimation(blink::WebAnimation* animation) { |
| 222 bool result = layer_->AddAnimation( | 226 bool result = layer_->AddAnimation( |
| 223 static_cast<WebAnimationImpl*>(animation)->PassAnimation()); | 227 static_cast<WebAnimationImpl*>(animation)->PassAnimation()); |
| (...skipping 214 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 438 void WebLayerImpl::setClipParent(blink::WebLayer* parent) { | 442 void WebLayerImpl::setClipParent(blink::WebLayer* parent) { |
| 439 cc::Layer* clip_parent = NULL; | 443 cc::Layer* clip_parent = NULL; |
| 440 if (parent) | 444 if (parent) |
| 441 clip_parent = static_cast<WebLayerImpl*>(parent)->layer(); | 445 clip_parent = static_cast<WebLayerImpl*>(parent)->layer(); |
| 442 layer_->SetClipParent(clip_parent); | 446 layer_->SetClipParent(clip_parent); |
| 443 } | 447 } |
| 444 | 448 |
| 445 Layer* WebLayerImpl::layer() const { return layer_.get(); } | 449 Layer* WebLayerImpl::layer() const { return layer_.get(); } |
| 446 | 450 |
| 447 } // namespace webkit | 451 } // namespace webkit |
| OLD | NEW |