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 850 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
861 | 861 |
862 void LayerTreeHost::setDeviceScaleFactor(float deviceScaleFactor) | 862 void LayerTreeHost::setDeviceScaleFactor(float deviceScaleFactor) |
863 { | 863 { |
864 if (deviceScaleFactor == m_deviceScaleFactor) | 864 if (deviceScaleFactor == m_deviceScaleFactor) |
865 return; | 865 return; |
866 m_deviceScaleFactor = deviceScaleFactor; | 866 m_deviceScaleFactor = deviceScaleFactor; |
867 | 867 |
868 setNeedsCommit(); | 868 setNeedsCommit(); |
869 } | 869 } |
870 | 870 |
| 871 bool LayerTreeHost::blocksPendingCommit() const |
| 872 { |
| 873 if (!m_rootLayer) |
| 874 return false; |
| 875 return m_rootLayer->blocksPendingCommitRecursive(); |
| 876 } |
| 877 |
871 void LayerTreeHost::animateLayers(base::TimeTicks time) | 878 void LayerTreeHost::animateLayers(base::TimeTicks time) |
872 { | 879 { |
873 if (!m_settings.acceleratedAnimationEnabled || m_animationRegistrar->active_
animation_controllers().empty()) | 880 if (!m_settings.acceleratedAnimationEnabled || m_animationRegistrar->active_
animation_controllers().empty()) |
874 return; | 881 return; |
875 | 882 |
876 TRACE_EVENT0("cc", "LayerTreeHostImpl::animateLayers"); | 883 TRACE_EVENT0("cc", "LayerTreeHostImpl::animateLayers"); |
877 | 884 |
878 double monotonicTime = (time - base::TimeTicks()).InSecondsF(); | 885 double monotonicTime = (time - base::TimeTicks()).InSecondsF(); |
879 | 886 |
880 AnimationRegistrar::AnimationControllerMap copy = m_animationRegistrar->acti
ve_animation_controllers(); | 887 AnimationRegistrar::AnimationControllerMap copy = m_animationRegistrar->acti
ve_animation_controllers(); |
(...skipping 13 matching lines...) Expand all Loading... |
894 else | 901 else |
895 layer->notifyAnimationFinished(wallClockTime.ToDoubleT()); | 902 layer->notifyAnimationFinished(wallClockTime.ToDoubleT()); |
896 } | 903 } |
897 } | 904 } |
898 | 905 |
899 for (size_t childIndex = 0; childIndex < layer->children().size(); ++childIn
dex) | 906 for (size_t childIndex = 0; childIndex < layer->children().size(); ++childIn
dex) |
900 setAnimationEventsRecursive(events, layer->children()[childIndex].get(),
wallClockTime); | 907 setAnimationEventsRecursive(events, layer->children()[childIndex].get(),
wallClockTime); |
901 } | 908 } |
902 | 909 |
903 } // namespace cc | 910 } // namespace cc |
OLD | NEW |