| 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 819 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 830 setNeedsCommit(); | 830 setNeedsCommit(); |
| 831 } | 831 } |
| 832 | 832 |
| 833 bool LayerTreeHost::blocksPendingCommit() const | 833 bool LayerTreeHost::blocksPendingCommit() const |
| 834 { | 834 { |
| 835 if (!m_rootLayer) | 835 if (!m_rootLayer) |
| 836 return false; | 836 return false; |
| 837 return m_rootLayer->blocksPendingCommitRecursive(); | 837 return m_rootLayer->blocksPendingCommitRecursive(); |
| 838 } | 838 } |
| 839 | 839 |
| 840 scoped_ptr<base::Value> LayerTreeHost::asValue() const |
| 841 { |
| 842 scoped_ptr<base::DictionaryValue> state(new base::DictionaryValue()); |
| 843 state->Set("proxy", m_proxy->asValue().release()); |
| 844 return state.PassAs<base::Value>(); |
| 845 } |
| 846 |
| 840 void LayerTreeHost::animateLayers(base::TimeTicks time) | 847 void LayerTreeHost::animateLayers(base::TimeTicks time) |
| 841 { | 848 { |
| 842 if (!m_settings.acceleratedAnimationEnabled || m_animationRegistrar->active_
animation_controllers().empty()) | 849 if (!m_settings.acceleratedAnimationEnabled || m_animationRegistrar->active_
animation_controllers().empty()) |
| 843 return; | 850 return; |
| 844 | 851 |
| 845 TRACE_EVENT0("cc", "LayerTreeHostImpl::animateLayers"); | 852 TRACE_EVENT0("cc", "LayerTreeHostImpl::animateLayers"); |
| 846 | 853 |
| 847 double monotonicTime = (time - base::TimeTicks()).InSecondsF(); | 854 double monotonicTime = (time - base::TimeTicks()).InSecondsF(); |
| 848 | 855 |
| 849 AnimationRegistrar::AnimationControllerMap copy = m_animationRegistrar->acti
ve_animation_controllers(); | 856 AnimationRegistrar::AnimationControllerMap copy = m_animationRegistrar->acti
ve_animation_controllers(); |
| (...skipping 20 matching lines...) Expand all Loading... |
| 870 for (size_t childIndex = 0; childIndex < layer->children().size(); ++childIn
dex) | 877 for (size_t childIndex = 0; childIndex < layer->children().size(); ++childIn
dex) |
| 871 setAnimationEventsRecursive(events, layer->children()[childIndex].get(),
wallClockTime); | 878 setAnimationEventsRecursive(events, layer->children()[childIndex].get(),
wallClockTime); |
| 872 } | 879 } |
| 873 | 880 |
| 874 skia::RefPtr<SkPicture> LayerTreeHost::capturePicture() | 881 skia::RefPtr<SkPicture> LayerTreeHost::capturePicture() |
| 875 { | 882 { |
| 876 return m_proxy->capturePicture(); | 883 return m_proxy->capturePicture(); |
| 877 } | 884 } |
| 878 | 885 |
| 879 } // namespace cc | 886 } // namespace cc |
| OLD | NEW |