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