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/compositor_bindings/web_layer_impl.h" | 5 #include "webkit/compositor_bindings/web_layer_impl.h" |
6 | 6 |
7 #include "base/string_util.h" | 7 #include "base/string_util.h" |
8 #include "cc/animation/animation.h" | 8 #include "cc/animation/animation.h" |
9 #include "cc/base/region.h" | 9 #include "cc/base/region.h" |
10 #include "cc/layers/layer.h" | 10 #include "cc/layers/layer.h" |
(...skipping 189 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
200 } | 200 } |
201 | 201 |
202 void WebLayerImpl::resumeAnimations(double monotonic_time) { | 202 void WebLayerImpl::resumeAnimations(double monotonic_time) { |
203 layer_->ResumeAnimations(monotonic_time); | 203 layer_->ResumeAnimations(monotonic_time); |
204 } | 204 } |
205 | 205 |
206 bool WebLayerImpl::hasActiveAnimation() { return layer_->HasActiveAnimation(); } | 206 bool WebLayerImpl::hasActiveAnimation() { return layer_->HasActiveAnimation(); } |
207 | 207 |
208 void WebLayerImpl::transferAnimationsTo(WebLayer* other) { | 208 void WebLayerImpl::transferAnimationsTo(WebLayer* other) { |
209 DCHECK(other); | 209 DCHECK(other); |
210 static_cast<WebLayerImpl*>(other)->layer_->SetLayerAnimationController( | 210 layer_->TransferAnimationsTo(static_cast<WebLayerImpl*>(other)->layer_); |
211 layer_->ReleaseLayerAnimationController()); | |
212 } | 211 } |
213 | 212 |
214 void WebLayerImpl::setForceRenderSurface(bool force_render_surface) { | 213 void WebLayerImpl::setForceRenderSurface(bool force_render_surface) { |
215 layer_->SetForceRenderSurface(force_render_surface); | 214 layer_->SetForceRenderSurface(force_render_surface); |
216 } | 215 } |
217 | 216 |
218 void WebLayerImpl::setScrollPosition(WebKit::WebPoint position) { | 217 void WebLayerImpl::setScrollPosition(WebKit::WebPoint position) { |
219 layer_->SetScrollOffset(gfx::Point(position).OffsetFromOrigin()); | 218 layer_->SetScrollOffset(gfx::Point(position).OffsetFromOrigin()); |
220 } | 219 } |
221 | 220 |
(...skipping 101 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
323 void WebLayerImpl::setScrollClient( | 322 void WebLayerImpl::setScrollClient( |
324 WebKit::WebLayerScrollClient* scroll_client) { | 323 WebKit::WebLayerScrollClient* scroll_client) { |
325 layer_->set_layer_scroll_client(scroll_client); | 324 layer_->set_layer_scroll_client(scroll_client); |
326 } | 325 } |
327 | 326 |
328 bool WebLayerImpl::isOrphan() const { return !layer_->layer_tree_host(); } | 327 bool WebLayerImpl::isOrphan() const { return !layer_->layer_tree_host(); } |
329 | 328 |
330 Layer* WebLayerImpl::layer() const { return layer_.get(); } | 329 Layer* WebLayerImpl::layer() const { return layer_.get(); } |
331 | 330 |
332 } // namespace WebKit | 331 } // namespace WebKit |
OLD | NEW |