| 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 316 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 327 TRACE_EVENT0("cc", "LayerTreeHost::pushPropertiesRecursive"); | 327 TRACE_EVENT0("cc", "LayerTreeHost::pushPropertiesRecursive"); |
| 328 pushPropertiesRecursive(rootLayer(), syncTree->RootLayer()); | 328 pushPropertiesRecursive(rootLayer(), syncTree->RootLayer()); |
| 329 } | 329 } |
| 330 m_needsFullTreeSync = false; | 330 m_needsFullTreeSync = false; |
| 331 | 331 |
| 332 if (m_rootLayer && m_hudLayer) | 332 if (m_rootLayer && m_hudLayer) |
| 333 syncTree->set_hud_layer(static_cast<HeadsUpDisplayLayerImpl*>(LayerTreeH
ostCommon::findLayerInSubtree(syncTree->RootLayer(), m_hudLayer->id()))); | 333 syncTree->set_hud_layer(static_cast<HeadsUpDisplayLayerImpl*>(LayerTreeH
ostCommon::findLayerInSubtree(syncTree->RootLayer(), m_hudLayer->id()))); |
| 334 else | 334 else |
| 335 syncTree->set_hud_layer(0); | 335 syncTree->set_hud_layer(0); |
| 336 | 336 |
| 337 // TODO(enne): Do these need to be moved to layer tree as well? | |
| 338 syncTree->set_source_frame_number(commitNumber()); | 337 syncTree->set_source_frame_number(commitNumber()); |
| 338 syncTree->set_background_color(m_backgroundColor); |
| 339 syncTree->set_has_transparent_background(m_hasTransparentBackground); |
| 340 |
| 339 hostImpl->setViewportSize(layoutViewportSize(), deviceViewportSize()); | 341 hostImpl->setViewportSize(layoutViewportSize(), deviceViewportSize()); |
| 340 hostImpl->setDeviceScaleFactor(deviceScaleFactor()); | 342 hostImpl->setDeviceScaleFactor(deviceScaleFactor()); |
| 341 hostImpl->setPageScaleFactorAndLimits(m_pageScaleFactor, m_minPageScaleFacto
r, m_maxPageScaleFactor); | 343 hostImpl->setPageScaleFactorAndLimits(m_pageScaleFactor, m_minPageScaleFacto
r, m_maxPageScaleFactor); |
| 342 hostImpl->setBackgroundColor(m_backgroundColor); | |
| 343 hostImpl->setHasTransparentBackground(m_hasTransparentBackground); | |
| 344 hostImpl->setDebugState(m_debugState); | 344 hostImpl->setDebugState(m_debugState); |
| 345 | 345 |
| 346 m_commitNumber++; | 346 m_commitNumber++; |
| 347 } | 347 } |
| 348 | 348 |
| 349 void LayerTreeHost::willCommit() | 349 void LayerTreeHost::willCommit() |
| 350 { | 350 { |
| 351 m_client->willCommit(); | 351 m_client->willCommit(); |
| 352 | 352 |
| 353 if (m_debugState.showHudInfo()) { | 353 if (m_debugState.showHudInfo()) { |
| (...skipping 540 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 894 else | 894 else |
| 895 layer->notifyAnimationFinished(wallClockTime.ToDoubleT()); | 895 layer->notifyAnimationFinished(wallClockTime.ToDoubleT()); |
| 896 } | 896 } |
| 897 } | 897 } |
| 898 | 898 |
| 899 for (size_t childIndex = 0; childIndex < layer->children().size(); ++childIn
dex) | 899 for (size_t childIndex = 0; childIndex < layer->children().size(); ++childIn
dex) |
| 900 setAnimationEventsRecursive(events, layer->children()[childIndex].get(),
wallClockTime); | 900 setAnimationEventsRecursive(events, layer->children()[childIndex].get(),
wallClockTime); |
| 901 } | 901 } |
| 902 | 902 |
| 903 } // namespace cc | 903 } // namespace cc |
| OLD | NEW |