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/layer_tree_host.h" | 5 #include "cc/layer_tree_host.h" |
6 | 6 |
7 #include "base/command_line.h" | 7 #include "base/command_line.h" |
8 #include "base/debug/trace_event.h" | 8 #include "base/debug/trace_event.h" |
9 #include "base/message_loop.h" | 9 #include "base/message_loop.h" |
10 #include "base/stl_util.h" | 10 #include "base/stl_util.h" |
(...skipping 839 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
850 | 850 |
851 void LayerTreeHost::setDeviceScaleFactor(float deviceScaleFactor) | 851 void LayerTreeHost::setDeviceScaleFactor(float deviceScaleFactor) |
852 { | 852 { |
853 if (deviceScaleFactor == m_deviceScaleFactor) | 853 if (deviceScaleFactor == m_deviceScaleFactor) |
854 return; | 854 return; |
855 m_deviceScaleFactor = deviceScaleFactor; | 855 m_deviceScaleFactor = deviceScaleFactor; |
856 | 856 |
857 setNeedsCommit(); | 857 setNeedsCommit(); |
858 } | 858 } |
859 | 859 |
| 860 bool LayerTreeHost::blocksPendingCommit() const |
| 861 { |
| 862 if (!m_rootLayer) |
| 863 return false; |
| 864 return m_rootLayer->blocksPendingCommitRecursive(); |
| 865 } |
| 866 |
860 void LayerTreeHost::animateLayers(base::TimeTicks time) | 867 void LayerTreeHost::animateLayers(base::TimeTicks time) |
861 { | 868 { |
862 if (!m_settings.acceleratedAnimationEnabled || m_animationRegistrar->active_
animation_controllers().empty()) | 869 if (!m_settings.acceleratedAnimationEnabled || m_animationRegistrar->active_
animation_controllers().empty()) |
863 return; | 870 return; |
864 | 871 |
865 TRACE_EVENT0("cc", "LayerTreeHostImpl::animateLayers"); | 872 TRACE_EVENT0("cc", "LayerTreeHostImpl::animateLayers"); |
866 | 873 |
867 double monotonicTime = (time - base::TimeTicks()).InSecondsF(); | 874 double monotonicTime = (time - base::TimeTicks()).InSecondsF(); |
868 | 875 |
869 AnimationRegistrar::AnimationControllerMap copy = m_animationRegistrar->acti
ve_animation_controllers(); | 876 AnimationRegistrar::AnimationControllerMap copy = m_animationRegistrar->acti
ve_animation_controllers(); |
(...skipping 13 matching lines...) Expand all Loading... |
883 else | 890 else |
884 layer->notifyAnimationFinished(wallClockTime.ToDoubleT()); | 891 layer->notifyAnimationFinished(wallClockTime.ToDoubleT()); |
885 } | 892 } |
886 } | 893 } |
887 | 894 |
888 for (size_t childIndex = 0; childIndex < layer->children().size(); ++childIn
dex) | 895 for (size_t childIndex = 0; childIndex < layer->children().size(); ++childIn
dex) |
889 setAnimationEventsRecursive(events, layer->children()[childIndex].get(),
wallClockTime); | 896 setAnimationEventsRecursive(events, layer->children()[childIndex].get(),
wallClockTime); |
890 } | 897 } |
891 | 898 |
892 } // namespace cc | 899 } // namespace cc |
OLD | NEW |