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/string_number_conversions.h" | 10 #include "base/string_number_conversions.h" |
(...skipping 365 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
376 | 376 |
377 if (m_needsFullTreeSync) { | 377 if (m_needsFullTreeSync) { |
378 hostImpl->setRootLayer(TreeSynchronizer::synchronizeTrees(rootLayer(), h
ostImpl->detachLayerTree(), hostImpl)); | 378 hostImpl->setRootLayer(TreeSynchronizer::synchronizeTrees(rootLayer(), h
ostImpl->detachLayerTree(), hostImpl)); |
379 } else { | 379 } else { |
380 TRACE_EVENT0("cc", "LayerTreeHost::pushPropertiesRecursive"); | 380 TRACE_EVENT0("cc", "LayerTreeHost::pushPropertiesRecursive"); |
381 pushPropertiesRecursive(rootLayer(), hostImpl->rootLayer()); | 381 pushPropertiesRecursive(rootLayer(), hostImpl->rootLayer()); |
382 } | 382 } |
383 m_needsFullTreeSync = false; | 383 m_needsFullTreeSync = false; |
384 | 384 |
385 if (m_rootLayer && m_hudLayer) | 385 if (m_rootLayer && m_hudLayer) |
386 hostImpl->setHudLayer(static_cast<HeadsUpDisplayLayerImpl*>(LayerTreeHos
tCommon::findLayerInSubtree(hostImpl->rootLayer(), m_hudLayer->id()))); | 386 hostImpl->activeTree()->set_hud_layer(static_cast<HeadsUpDisplayLayerImp
l*>(LayerTreeHostCommon::findLayerInSubtree(hostImpl->rootLayer(), m_hudLayer->i
d()))); |
387 else | 387 else |
388 hostImpl->setHudLayer(0); | 388 hostImpl->activeTree()->set_hud_layer(0); |
389 | 389 |
390 // We may have added an animation during the tree sync. This will cause both
layer tree hosts | 390 // We may have added an animation during the tree sync. This will cause both
layer tree hosts |
391 // to visit their controllers. | 391 // to visit their controllers. |
392 if (rootLayer() && m_needsAnimateLayers) | 392 if (rootLayer() && m_needsAnimateLayers) |
393 hostImpl->setNeedsAnimateLayers(); | 393 hostImpl->setNeedsAnimateLayers(); |
394 | 394 |
395 hostImpl->setSourceFrameNumber(commitNumber()); | 395 hostImpl->activeTree()->set_source_frame_number(commitNumber()); |
396 hostImpl->setViewportSize(layoutViewportSize(), deviceViewportSize()); | 396 hostImpl->setViewportSize(layoutViewportSize(), deviceViewportSize()); |
397 hostImpl->setDeviceScaleFactor(deviceScaleFactor()); | 397 hostImpl->setDeviceScaleFactor(deviceScaleFactor()); |
398 hostImpl->setPageScaleFactorAndLimits(m_pageScaleFactor, m_minPageScaleFacto
r, m_maxPageScaleFactor); | 398 hostImpl->setPageScaleFactorAndLimits(m_pageScaleFactor, m_minPageScaleFacto
r, m_maxPageScaleFactor); |
399 hostImpl->setBackgroundColor(m_backgroundColor); | 399 hostImpl->setBackgroundColor(m_backgroundColor); |
400 hostImpl->setHasTransparentBackground(m_hasTransparentBackground); | 400 hostImpl->setHasTransparentBackground(m_hasTransparentBackground); |
401 hostImpl->setDebugState(m_debugState); | 401 hostImpl->setDebugState(m_debugState); |
402 | 402 |
403 m_commitNumber++; | 403 m_commitNumber++; |
404 } | 404 } |
405 | 405 |
(...skipping 568 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
974 else | 974 else |
975 layer->notifyAnimationFinished(wallClockTime.ToDoubleT()); | 975 layer->notifyAnimationFinished(wallClockTime.ToDoubleT()); |
976 } | 976 } |
977 } | 977 } |
978 | 978 |
979 for (size_t childIndex = 0; childIndex < layer->children().size(); ++childIn
dex) | 979 for (size_t childIndex = 0; childIndex < layer->children().size(); ++childIn
dex) |
980 setAnimationEventsRecursive(events, layer->children()[childIndex].get(),
wallClockTime); | 980 setAnimationEventsRecursive(events, layer->children()[childIndex].get(),
wallClockTime); |
981 } | 981 } |
982 | 982 |
983 } // namespace cc | 983 } // namespace cc |
OLD | NEW |