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_impl.h" | 5 #include "cc/trees/layer_tree_impl.h" |
6 | 6 |
7 #include <algorithm> | 7 #include <algorithm> |
8 #include <limits> | 8 #include <limits> |
9 #include <set> | 9 #include <set> |
10 | 10 |
(...skipping 1412 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1423 ((!data_for_recursion->closest_match || | 1423 ((!data_for_recursion->closest_match || |
1424 distance_to_intersection > data_for_recursion->closest_distance))) { | 1424 distance_to_intersection > data_for_recursion->closest_distance))) { |
1425 data_for_recursion->closest_distance = distance_to_intersection; | 1425 data_for_recursion->closest_distance = distance_to_intersection; |
1426 data_for_recursion->closest_match = layer; | 1426 data_for_recursion->closest_match = layer; |
1427 } | 1427 } |
1428 } | 1428 } |
1429 | 1429 |
1430 static bool ScrollsAnyDrawnRenderSurfaceLayerListMember(LayerImpl* layer) { | 1430 static bool ScrollsAnyDrawnRenderSurfaceLayerListMember(LayerImpl* layer) { |
1431 if (!layer->scrollable()) | 1431 if (!layer->scrollable()) |
1432 return false; | 1432 return false; |
1433 if (layer->IsDrawnRenderSurfaceLayerListMember()) | 1433 if (layer->draw_properties().layer_or_descendant_is_drawn) |
1434 return true; | 1434 return true; |
| 1435 |
1435 if (!layer->scroll_children()) | 1436 if (!layer->scroll_children()) |
1436 return false; | 1437 return false; |
1437 for (std::set<LayerImpl*>::const_iterator it = | 1438 for (std::set<LayerImpl*>::const_iterator it = |
1438 layer->scroll_children()->begin(); | 1439 layer->scroll_children()->begin(); |
1439 it != layer->scroll_children()->end(); | 1440 it != layer->scroll_children()->end(); |
1440 ++it) { | 1441 ++it) { |
1441 if ((*it)->IsDrawnRenderSurfaceLayerListMember()) | 1442 if ((*it)->draw_properties().layer_or_descendant_is_drawn) |
1442 return true; | 1443 return true; |
1443 } | 1444 } |
1444 return false; | 1445 return false; |
1445 } | 1446 } |
1446 | 1447 |
1447 struct FindScrollingLayerFunctor { | 1448 struct FindScrollingLayerFunctor { |
1448 bool operator()(LayerImpl* layer) const { | 1449 bool operator()(LayerImpl* layer) const { |
1449 return ScrollsAnyDrawnRenderSurfaceLayerListMember(layer); | 1450 return ScrollsAnyDrawnRenderSurfaceLayerListMember(layer); |
1450 } | 1451 } |
1451 }; | 1452 }; |
(...skipping 184 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1636 scoped_ptr<PendingPageScaleAnimation> pending_animation) { | 1637 scoped_ptr<PendingPageScaleAnimation> pending_animation) { |
1637 pending_page_scale_animation_ = pending_animation.Pass(); | 1638 pending_page_scale_animation_ = pending_animation.Pass(); |
1638 } | 1639 } |
1639 | 1640 |
1640 scoped_ptr<PendingPageScaleAnimation> | 1641 scoped_ptr<PendingPageScaleAnimation> |
1641 LayerTreeImpl::TakePendingPageScaleAnimation() { | 1642 LayerTreeImpl::TakePendingPageScaleAnimation() { |
1642 return pending_page_scale_animation_.Pass(); | 1643 return pending_page_scale_animation_.Pass(); |
1643 } | 1644 } |
1644 | 1645 |
1645 } // namespace cc | 1646 } // namespace cc |
OLD | NEW |