Chromium Code Reviews| 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 354 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 365 | 365 |
| 366 if (m_needsFullTreeSync) { | 366 if (m_needsFullTreeSync) { |
| 367 hostImpl->setRootLayer(TreeSynchronizer::synchronizeTrees(rootLayer(), h ostImpl->detachLayerTree(), hostImpl)); | 367 hostImpl->setRootLayer(TreeSynchronizer::synchronizeTrees(rootLayer(), h ostImpl->detachLayerTree(), hostImpl)); |
| 368 } else { | 368 } else { |
| 369 TRACE_EVENT0("cc", "LayerTreeHost::pushPropertiesRecursive"); | 369 TRACE_EVENT0("cc", "LayerTreeHost::pushPropertiesRecursive"); |
| 370 pushPropertiesRecursive(rootLayer(), hostImpl->rootLayer()); | 370 pushPropertiesRecursive(rootLayer(), hostImpl->rootLayer()); |
| 371 } | 371 } |
| 372 m_needsFullTreeSync = false; | 372 m_needsFullTreeSync = false; |
| 373 | 373 |
| 374 if (m_rootLayer && m_hudLayer) | 374 if (m_rootLayer && m_hudLayer) |
| 375 hostImpl->setHudLayer(static_cast<HeadsUpDisplayLayerImpl*>(LayerTreeHos tCommon::findLayerInSubtree(hostImpl->rootLayer(), m_hudLayer->id()))); | 375 hostImpl->activeTree()->set_hud_layer(static_cast<HeadsUpDisplayLayerImp l*>(LayerTreeHostCommon::findLayerInSubtree(hostImpl->rootLayer(), m_hudLayer->i d()))); |
| 376 else | 376 else |
| 377 hostImpl->setHudLayer(0); | 377 hostImpl->activeTree()->set_hud_layer(0); |
| 378 | 378 |
| 379 // We may have added an animation during the tree sync. This will cause both layer tree hosts | 379 // We may have added an animation during the tree sync. This will cause both layer tree hosts |
| 380 // to visit their controllers. | 380 // to visit their controllers. |
| 381 if (rootLayer() && m_needsAnimateLayers) | 381 if (rootLayer() && m_needsAnimateLayers) |
| 382 hostImpl->setNeedsAnimateLayers(); | 382 hostImpl->setNeedsAnimateLayers(); |
| 383 | 383 |
| 384 hostImpl->setSourceFrameNumber(commitNumber()); | 384 hostImpl->activeTree()->set_source_frame_number(commitNumber()); |
| 385 hostImpl->setViewportSize(layoutViewportSize(), deviceViewportSize()); | 385 hostImpl->setViewportSize(layoutViewportSize(), deviceViewportSize()); |
| 386 hostImpl->setDeviceScaleFactor(deviceScaleFactor()); | 386 hostImpl->setDeviceScaleFactor(deviceScaleFactor()); |
|
enne (OOO)
2012/12/05 23:09:09
I kind of wonder if most of these other things are
| |
| 387 hostImpl->setPageScaleFactorAndLimits(m_pageScaleFactor, m_minPageScaleFacto r, m_maxPageScaleFactor); | 387 hostImpl->setPageScaleFactorAndLimits(m_pageScaleFactor, m_minPageScaleFacto r, m_maxPageScaleFactor); |
| 388 hostImpl->setBackgroundColor(m_backgroundColor); | 388 hostImpl->setBackgroundColor(m_backgroundColor); |
| 389 hostImpl->setHasTransparentBackground(m_hasTransparentBackground); | 389 hostImpl->setHasTransparentBackground(m_hasTransparentBackground); |
| 390 hostImpl->setDebugState(m_debugState); | 390 hostImpl->setDebugState(m_debugState); |
| 391 | 391 |
| 392 m_commitNumber++; | 392 m_commitNumber++; |
| 393 } | 393 } |
| 394 | 394 |
| 395 void LayerTreeHost::willCommit() | 395 void LayerTreeHost::willCommit() |
| 396 { | 396 { |
| (...skipping 566 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 963 else | 963 else |
| 964 layer->notifyAnimationFinished(wallClockTime.ToDoubleT()); | 964 layer->notifyAnimationFinished(wallClockTime.ToDoubleT()); |
| 965 } | 965 } |
| 966 } | 966 } |
| 967 | 967 |
| 968 for (size_t childIndex = 0; childIndex < layer->children().size(); ++childIn dex) | 968 for (size_t childIndex = 0; childIndex < layer->children().size(); ++childIn dex) |
| 969 setAnimationEventsRecursive(events, layer->children()[childIndex].get(), wallClockTime); | 969 setAnimationEventsRecursive(events, layer->children()[childIndex].get(), wallClockTime); |
| 970 } | 970 } |
| 971 | 971 |
| 972 } // namespace cc | 972 } // namespace cc |
| OLD | NEW |