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/debug/trace_event.h" | 7 #include "base/debug/trace_event.h" |
8 #include "base/message_loop.h" | 8 #include "base/message_loop.h" |
9 #include "cc/font_atlas.h" | 9 #include "cc/font_atlas.h" |
10 #include "cc/graphics_context.h" | 10 #include "cc/graphics_context.h" |
(...skipping 231 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
242 // This function commits the LayerTreeHost to an impl tree. When modifying | 242 // This function commits the LayerTreeHost to an impl tree. When modifying |
243 // this function, keep in mind that the function *runs* on the impl thread! Any | 243 // this function, keep in mind that the function *runs* on the impl thread! Any |
244 // code that is logically a main thread operation, e.g. deletion of a Layer, | 244 // code that is logically a main thread operation, e.g. deletion of a Layer, |
245 // should be delayed until the LayerTreeHost::commitComplete, which will run | 245 // should be delayed until the LayerTreeHost::commitComplete, which will run |
246 // after the commit, but on the main thread. | 246 // after the commit, but on the main thread. |
247 void LayerTreeHost::finishCommitOnImplThread(LayerTreeHostImpl* hostImpl) | 247 void LayerTreeHost::finishCommitOnImplThread(LayerTreeHostImpl* hostImpl) |
248 { | 248 { |
249 DCHECK(m_proxy->isImplThread()); | 249 DCHECK(m_proxy->isImplThread()); |
250 | 250 |
251 m_contentsTextureManager->updateBackingsInDrawingImplTree(); | 251 m_contentsTextureManager->updateBackingsInDrawingImplTree(); |
252 ResourceProvider::debugNotifyEnterZone(0xA000000); | |
253 m_contentsTextureManager->reduceMemory(hostImpl->resourceProvider()); | 252 m_contentsTextureManager->reduceMemory(hostImpl->resourceProvider()); |
254 ResourceProvider::debugNotifyLeaveZone(); | |
255 | 253 |
256 hostImpl->setRootLayer(TreeSynchronizer::synchronizeTrees(rootLayer(), hostI
mpl->detachLayerTree(), hostImpl)); | 254 hostImpl->setRootLayer(TreeSynchronizer::synchronizeTrees(rootLayer(), hostI
mpl->detachLayerTree(), hostImpl)); |
257 | 255 |
258 if (m_rootLayer && m_hudLayer) | 256 if (m_rootLayer && m_hudLayer) |
259 hostImpl->setHudLayer(static_cast<HeadsUpDisplayLayerImpl*>(LayerTreeHos
tCommon::findLayerInSubtree(hostImpl->rootLayer(), m_hudLayer->id()))); | 257 hostImpl->setHudLayer(static_cast<HeadsUpDisplayLayerImpl*>(LayerTreeHos
tCommon::findLayerInSubtree(hostImpl->rootLayer(), m_hudLayer->id()))); |
260 else | 258 else |
261 hostImpl->setHudLayer(0); | 259 hostImpl->setHudLayer(0); |
262 | 260 |
263 // We may have added an animation during the tree sync. This will cause both
layer tree hosts | 261 // We may have added an animation during the tree sync. This will cause both
layer tree hosts |
264 // to visit their controllers. | 262 // to visit their controllers. |
(...skipping 573 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
838 else | 836 else |
839 layer->notifyAnimationFinished(wallClockTime.ToDoubleT()); | 837 layer->notifyAnimationFinished(wallClockTime.ToDoubleT()); |
840 } | 838 } |
841 } | 839 } |
842 | 840 |
843 for (size_t childIndex = 0; childIndex < layer->children().size(); ++childIn
dex) | 841 for (size_t childIndex = 0; childIndex < layer->children().size(); ++childIn
dex) |
844 setAnimationEventsRecursive(events, layer->children()[childIndex].get(),
wallClockTime); | 842 setAnimationEventsRecursive(events, layer->children()[childIndex].get(),
wallClockTime); |
845 } | 843 } |
846 | 844 |
847 } // namespace cc | 845 } // namespace cc |
OLD | NEW |