Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(24)

Side by Side Diff: cc/blink/web_layer_impl.cc

Issue 1534813004: Run smooth scroll animations on the compositor when possible (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: nit Created 5 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « cc/blink/web_layer_impl.h ('k') | cc/layers/layer.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 <utility> 7 #include <utility>
8 #include <vector> 8 #include <vector>
9 9
10 #include "base/bind.h" 10 #include "base/bind.h"
(...skipping 252 matching lines...) Expand 10 before | Expand all | Expand 10 after
263 int animation_id, 263 int animation_id,
264 blink::WebCompositorAnimation::TargetProperty target_property) { 264 blink::WebCompositorAnimation::TargetProperty target_property) {
265 layer_->RemoveAnimation( 265 layer_->RemoveAnimation(
266 animation_id, static_cast<Animation::TargetProperty>(target_property)); 266 animation_id, static_cast<Animation::TargetProperty>(target_property));
267 } 267 }
268 268
269 void WebLayerImpl::pauseAnimation(int animation_id, double time_offset) { 269 void WebLayerImpl::pauseAnimation(int animation_id, double time_offset) {
270 layer_->PauseAnimation(animation_id, time_offset); 270 layer_->PauseAnimation(animation_id, time_offset);
271 } 271 }
272 272
273 void WebLayerImpl::abortAnimation(int animation_id) {
274 layer_->AbortAnimation(animation_id);
275 }
276
273 bool WebLayerImpl::hasActiveAnimation() { 277 bool WebLayerImpl::hasActiveAnimation() {
274 return layer_->HasActiveAnimation(); 278 return layer_->HasActiveAnimation();
275 } 279 }
276 280
277 void WebLayerImpl::setForceRenderSurface(bool force_render_surface) { 281 void WebLayerImpl::setForceRenderSurface(bool force_render_surface) {
278 layer_->SetForceRenderSurface(force_render_surface); 282 layer_->SetForceRenderSurface(force_render_surface);
279 } 283 }
280 284
281 void WebLayerImpl::setScrollPositionDouble(blink::WebDoublePoint position) { 285 void WebLayerImpl::setScrollPositionDouble(blink::WebDoublePoint position) {
282 layer_->SetScrollOffset(gfx::ScrollOffset(position.x, position.y)); 286 layer_->SetScrollOffset(gfx::ScrollOffset(position.x, position.y));
(...skipping 274 matching lines...) Expand 10 before | Expand all | Expand 10 after
557 561
558 Layer* WebLayerImpl::layer() const { 562 Layer* WebLayerImpl::layer() const {
559 return layer_.get(); 563 return layer_.get();
560 } 564 }
561 565
562 void WebLayerImpl::SetContentsOpaqueIsFixed(bool fixed) { 566 void WebLayerImpl::SetContentsOpaqueIsFixed(bool fixed) {
563 contents_opaque_is_fixed_ = fixed; 567 contents_opaque_is_fixed_ = fixed;
564 } 568 }
565 569
566 } // namespace cc_blink 570 } // namespace cc_blink
OLDNEW
« no previous file with comments | « cc/blink/web_layer_impl.h ('k') | cc/layers/layer.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698