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 "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 Loading... |
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 Loading... |
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 |
OLD | NEW |