OLD | NEW |
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 1503 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1514 DCHECK(layer_animation_controller_); | 1514 DCHECK(layer_animation_controller_); |
1515 layer_animation_controller_->AddEventObserver(animation_observer); | 1515 layer_animation_controller_->AddEventObserver(animation_observer); |
1516 } | 1516 } |
1517 | 1517 |
1518 void Layer::RemoveLayerAnimationEventObserver( | 1518 void Layer::RemoveLayerAnimationEventObserver( |
1519 LayerAnimationEventObserver* animation_observer) { | 1519 LayerAnimationEventObserver* animation_observer) { |
1520 DCHECK(layer_animation_controller_); | 1520 DCHECK(layer_animation_controller_); |
1521 layer_animation_controller_->RemoveEventObserver(animation_observer); | 1521 layer_animation_controller_->RemoveEventObserver(animation_observer); |
1522 } | 1522 } |
1523 | 1523 |
1524 SimpleEnclosedRegion Layer::VisibleContentOpaqueRegion() const { | |
1525 if (contents_opaque()) | |
1526 return SimpleEnclosedRegion(visible_content_rect()); | |
1527 return SimpleEnclosedRegion(); | |
1528 } | |
1529 | |
1530 ScrollbarLayerInterface* Layer::ToScrollbarLayer() { | 1524 ScrollbarLayerInterface* Layer::ToScrollbarLayer() { |
1531 return nullptr; | 1525 return nullptr; |
1532 } | 1526 } |
1533 | 1527 |
1534 RenderingStatsInstrumentation* Layer::rendering_stats_instrumentation() const { | 1528 RenderingStatsInstrumentation* Layer::rendering_stats_instrumentation() const { |
1535 return layer_tree_host_->rendering_stats_instrumentation(); | 1529 return layer_tree_host_->rendering_stats_instrumentation(); |
1536 } | 1530 } |
1537 | 1531 |
1538 void Layer::RemoveFromScrollTree() { | 1532 void Layer::RemoveFromScrollTree() { |
1539 if (scroll_children_.get()) { | 1533 if (scroll_children_.get()) { |
(...skipping 83 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1623 ? layer_tree_host()->meta_information_sequence_number() | 1617 ? layer_tree_host()->meta_information_sequence_number() |
1624 : 0; | 1618 : 0; |
1625 } | 1619 } |
1626 | 1620 |
1627 bool Layer::sorted_for_recursion() { | 1621 bool Layer::sorted_for_recursion() { |
1628 return sorted_for_recursion_tracker_ == | 1622 return sorted_for_recursion_tracker_ == |
1629 layer_tree_host()->meta_information_sequence_number(); | 1623 layer_tree_host()->meta_information_sequence_number(); |
1630 } | 1624 } |
1631 | 1625 |
1632 } // namespace cc | 1626 } // namespace cc |
OLD | NEW |