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 72 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
83 , m_debugState(settings.initialDebugState) | 83 , m_debugState(settings.initialDebugState) |
84 , m_deviceScaleFactor(1) | 84 , m_deviceScaleFactor(1) |
85 , m_visible(true) | 85 , m_visible(true) |
86 , m_pageScaleFactor(1) | 86 , m_pageScaleFactor(1) |
87 , m_minPageScaleFactor(1) | 87 , m_minPageScaleFactor(1) |
88 , m_maxPageScaleFactor(1) | 88 , m_maxPageScaleFactor(1) |
89 , m_triggerIdleUpdates(true) | 89 , m_triggerIdleUpdates(true) |
90 , m_backgroundColor(SK_ColorWHITE) | 90 , m_backgroundColor(SK_ColorWHITE) |
91 , m_hasTransparentBackground(false) | 91 , m_hasTransparentBackground(false) |
92 , m_partialTextureUpdateRequests(0) | 92 , m_partialTextureUpdateRequests(0) |
93 , m_animationRegistrar(AnimationRegistrar::create()) | |
94 { | 93 { |
| 94 if (m_settings.acceleratedAnimationEnabled) |
| 95 m_animationRegistrar = AnimationRegistrar::create(); |
95 numLayerTreeInstances++; | 96 numLayerTreeInstances++; |
96 } | 97 } |
97 | 98 |
98 bool LayerTreeHost::initialize(scoped_ptr<Thread> implThread) | 99 bool LayerTreeHost::initialize(scoped_ptr<Thread> implThread) |
99 { | 100 { |
100 if (implThread) | 101 if (implThread) |
101 return initializeProxy(ThreadProxy::create(this, implThread.Pass())); | 102 return initializeProxy(ThreadProxy::create(this, implThread.Pass())); |
102 else | 103 else |
103 return initializeProxy(SingleThreadProxy::create(this)); | 104 return initializeProxy(SingleThreadProxy::create(this)); |
104 } | 105 } |
(...skipping 773 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
878 for (size_t childIndex = 0; childIndex < layer->children().size(); ++childIn
dex) | 879 for (size_t childIndex = 0; childIndex < layer->children().size(); ++childIn
dex) |
879 setAnimationEventsRecursive(events, layer->children()[childIndex].get(),
wallClockTime); | 880 setAnimationEventsRecursive(events, layer->children()[childIndex].get(),
wallClockTime); |
880 } | 881 } |
881 | 882 |
882 skia::RefPtr<SkPicture> LayerTreeHost::capturePicture() | 883 skia::RefPtr<SkPicture> LayerTreeHost::capturePicture() |
883 { | 884 { |
884 return m_proxy->capturePicture(); | 885 return m_proxy->capturePicture(); |
885 } | 886 } |
886 | 887 |
887 } // namespace cc | 888 } // namespace cc |
OLD | NEW |