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/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 195 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
206 } | 206 } |
207 | 207 |
208 void WebLayerImpl::resumeAnimations(double monotonic_time) { | 208 void WebLayerImpl::resumeAnimations(double monotonic_time) { |
209 layer_->ResumeAnimations(monotonic_time); | 209 layer_->ResumeAnimations(monotonic_time); |
210 } | 210 } |
211 | 211 |
212 bool WebLayerImpl::hasActiveAnimation() { return layer_->HasActiveAnimation(); } | 212 bool WebLayerImpl::hasActiveAnimation() { return layer_->HasActiveAnimation(); } |
213 | 213 |
214 void WebLayerImpl::transferAnimationsTo(WebLayer* other) { | 214 void WebLayerImpl::transferAnimationsTo(WebLayer* other) { |
215 DCHECK(other); | 215 DCHECK(other); |
216 layer_->TransferAnimationsTo(static_cast<WebLayerImpl*>(other)->layer_); | 216 layer_->TransferAnimationsTo(static_cast<WebLayerImpl*>(other)->layer_.get()); |
217 } | 217 } |
218 | 218 |
219 void WebLayerImpl::setForceRenderSurface(bool force_render_surface) { | 219 void WebLayerImpl::setForceRenderSurface(bool force_render_surface) { |
220 layer_->SetForceRenderSurface(force_render_surface); | 220 layer_->SetForceRenderSurface(force_render_surface); |
221 } | 221 } |
222 | 222 |
223 void WebLayerImpl::setScrollPosition(WebKit::WebPoint position) { | 223 void WebLayerImpl::setScrollPosition(WebKit::WebPoint position) { |
224 layer_->SetScrollOffset(gfx::Point(position).OffsetFromOrigin()); | 224 layer_->SetScrollOffset(gfx::Point(position).OffsetFromOrigin()); |
225 } | 225 } |
226 | 226 |
(...skipping 120 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
347 void WebLayerImpl::setScrollClient( | 347 void WebLayerImpl::setScrollClient( |
348 WebKit::WebLayerScrollClient* scroll_client) { | 348 WebKit::WebLayerScrollClient* scroll_client) { |
349 layer_->set_layer_scroll_client(scroll_client); | 349 layer_->set_layer_scroll_client(scroll_client); |
350 } | 350 } |
351 | 351 |
352 bool WebLayerImpl::isOrphan() const { return !layer_->layer_tree_host(); } | 352 bool WebLayerImpl::isOrphan() const { return !layer_->layer_tree_host(); } |
353 | 353 |
354 Layer* WebLayerImpl::layer() const { return layer_.get(); } | 354 Layer* WebLayerImpl::layer() const { return layer_.get(); } |
355 | 355 |
356 } // namespace WebKit | 356 } // namespace WebKit |
OLD | NEW |