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

Side by Side Diff: cc/trees/layer_tree_host.cc

Issue 1009233002: CC Animations: Port Impl-only-scrolling to use compositor animation timelines. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@ui
Patch Set: Add unittests. Created 5 years, 8 months 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/trees/layer_tree_host.h ('k') | cc/trees/layer_tree_host_impl.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 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 "cc/trees/layer_tree_host.h" 5 #include "cc/trees/layer_tree_host.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include <stack> 8 #include <stack>
9 #include <string> 9 #include <string>
10 10
(...skipping 1355 matching lines...) Expand 10 before | Expand all | Expand 10 after
1366 1366
1367 void LayerTreeHost::SetLayerScrollOffsetMutated( 1367 void LayerTreeHost::SetLayerScrollOffsetMutated(
1368 int layer_id, 1368 int layer_id,
1369 bool active_tree, 1369 bool active_tree,
1370 const gfx::ScrollOffset& scroll_offset) { 1370 const gfx::ScrollOffset& scroll_offset) {
1371 LayerAnimationValueObserver* layer = LayerById(layer_id); 1371 LayerAnimationValueObserver* layer = LayerById(layer_id);
1372 DCHECK(layer); 1372 DCHECK(layer);
1373 layer->OnScrollOffsetAnimated(scroll_offset); 1373 layer->OnScrollOffsetAnimated(scroll_offset);
1374 } 1374 }
1375 1375
1376 gfx::ScrollOffset LayerTreeHost::GetScrollOffsetForAnimation(
1377 int layer_id) const {
1378 LayerAnimationValueProvider* layer = LayerById(layer_id);
1379 DCHECK(layer);
1380 return layer->ScrollOffsetForAnimation();
1381 }
1382
1376 bool LayerTreeHost::IsAnimatingFilterProperty(const Layer* layer) const { 1383 bool LayerTreeHost::IsAnimatingFilterProperty(const Layer* layer) const {
1377 return animation_host_ 1384 return animation_host_
1378 ? animation_host_->IsAnimatingFilterProperty(layer->id()) 1385 ? animation_host_->IsAnimatingFilterProperty(layer->id())
1379 : false; 1386 : false;
1380 } 1387 }
1381 1388
1382 bool LayerTreeHost::IsAnimatingOpacityProperty(const Layer* layer) const { 1389 bool LayerTreeHost::IsAnimatingOpacityProperty(const Layer* layer) const {
1383 return animation_host_ 1390 return animation_host_
1384 ? animation_host_->IsAnimatingOpacityProperty(layer->id()) 1391 ? animation_host_->IsAnimatingOpacityProperty(layer->id())
1385 : false; 1392 : false;
(...skipping 15 matching lines...) Expand all
1401 return animation_host_ ? animation_host_->HasAnyAnimation(layer->id()) 1408 return animation_host_ ? animation_host_->HasAnyAnimation(layer->id())
1402 : false; 1409 : false;
1403 } 1410 }
1404 1411
1405 bool LayerTreeHost::HasActiveAnimation(const Layer* layer) const { 1412 bool LayerTreeHost::HasActiveAnimation(const Layer* layer) const {
1406 return animation_host_ ? animation_host_->HasActiveAnimation(layer->id()) 1413 return animation_host_ ? animation_host_->HasActiveAnimation(layer->id())
1407 : false; 1414 : false;
1408 } 1415 }
1409 1416
1410 } // namespace cc 1417 } // namespace cc
OLDNEW
« no previous file with comments | « cc/trees/layer_tree_host.h ('k') | cc/trees/layer_tree_host_impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698