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

Side by Side Diff: cc/layers/layer.cc

Issue 1548883002: Revert of Run smooth scroll animations on the compositor when possible (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: 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
OLDNEW
1 // Copyright 2010 The Chromium Authors. All rights reserved. 1 // Copyright 2010 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/layers/layer.h" 5 #include "cc/layers/layer.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 8
9 #include "base/atomic_sequence_num.h" 9 #include "base/atomic_sequence_num.h"
10 #include "base/location.h" 10 #include "base/location.h"
(...skipping 1857 matching lines...) Expand 10 before | Expand all | Expand 10 after
1868 SetNeedsCommit(); 1868 SetNeedsCommit();
1869 } 1869 }
1870 1870
1871 void Layer::RemoveAnimation(int animation_id, 1871 void Layer::RemoveAnimation(int animation_id,
1872 Animation::TargetProperty property) { 1872 Animation::TargetProperty property) {
1873 DCHECK(layer_animation_controller_); 1873 DCHECK(layer_animation_controller_);
1874 layer_animation_controller_->RemoveAnimation(animation_id, property); 1874 layer_animation_controller_->RemoveAnimation(animation_id, property);
1875 SetNeedsCommit(); 1875 SetNeedsCommit();
1876 } 1876 }
1877 1877
1878 void Layer::AbortAnimation(int animation_id) {
1879 DCHECK(layer_animation_controller_);
1880 layer_animation_controller_->AbortAnimation(animation_id);
1881 SetNeedsCommit();
1882 }
1883
1884 void Layer::SetLayerAnimationControllerForTest( 1878 void Layer::SetLayerAnimationControllerForTest(
1885 scoped_refptr<LayerAnimationController> controller) { 1879 scoped_refptr<LayerAnimationController> controller) {
1886 DCHECK(layer_animation_controller_); 1880 DCHECK(layer_animation_controller_);
1887 layer_animation_controller_->RemoveValueObserver(this); 1881 layer_animation_controller_->RemoveValueObserver(this);
1888 layer_animation_controller_ = controller; 1882 layer_animation_controller_ = controller;
1889 layer_animation_controller_->AddValueObserver(this); 1883 layer_animation_controller_->AddValueObserver(this);
1890 SetNeedsCommit(); 1884 SetNeedsCommit();
1891 } 1885 }
1892 1886
1893 bool Layer::HasActiveAnimation() const { 1887 bool Layer::HasActiveAnimation() const {
(...skipping 148 matching lines...) Expand 10 before | Expand all | Expand 10 after
2042 this, layer_tree_host_->property_trees()->transform_tree); 2036 this, layer_tree_host_->property_trees()->transform_tree);
2043 } 2037 }
2044 2038
2045 gfx::Transform Layer::screen_space_transform() const { 2039 gfx::Transform Layer::screen_space_transform() const {
2046 DCHECK_NE(transform_tree_index_, -1); 2040 DCHECK_NE(transform_tree_index_, -1);
2047 return ScreenSpaceTransformFromPropertyTrees( 2041 return ScreenSpaceTransformFromPropertyTrees(
2048 this, layer_tree_host_->property_trees()->transform_tree); 2042 this, layer_tree_host_->property_trees()->transform_tree);
2049 } 2043 }
2050 2044
2051 } // namespace cc 2045 } // namespace cc
OLDNEW
« no previous file with comments | « cc/layers/layer.h ('k') | third_party/WebKit/LayoutTests/fast/scroll-behavior/smooth-scroll/keyboard-scroll.html » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698