Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(547)

Side by Side Diff: cc/layer_tree_host.cc

Issue 11519018: [cc] Make LayerImpls point at LayerTreeImpl instead of LTHI (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
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"
11 #include "cc/font_atlas.h" 11 #include "cc/font_atlas.h"
12 #include "cc/heads_up_display_layer.h" 12 #include "cc/heads_up_display_layer.h"
13 #include "cc/heads_up_display_layer_impl.h" 13 #include "cc/heads_up_display_layer_impl.h"
14 #include "cc/layer.h" 14 #include "cc/layer.h"
15 #include "cc/layer_animation_controller.h" 15 #include "cc/layer_animation_controller.h"
16 #include "cc/layer_iterator.h" 16 #include "cc/layer_iterator.h"
17 #include "cc/layer_tree_host_client.h" 17 #include "cc/layer_tree_host_client.h"
18 #include "cc/layer_tree_host_common.h" 18 #include "cc/layer_tree_host_common.h"
19 #include "cc/layer_tree_host_impl.h" 19 #include "cc/layer_tree_host_impl.h"
20 #include "cc/layer_tree_impl.h"
20 #include "cc/math_util.h" 21 #include "cc/math_util.h"
21 #include "cc/occlusion_tracker.h" 22 #include "cc/occlusion_tracker.h"
22 #include "cc/overdraw_metrics.h" 23 #include "cc/overdraw_metrics.h"
23 #include "cc/single_thread_proxy.h" 24 #include "cc/single_thread_proxy.h"
24 #include "cc/switches.h" 25 #include "cc/switches.h"
25 #include "cc/thread.h" 26 #include "cc/thread.h"
26 #include "cc/thread_proxy.h" 27 #include "cc/thread_proxy.h"
27 #include "cc/tree_synchronizer.h" 28 #include "cc/tree_synchronizer.h"
28 29
29 using namespace std; 30 using namespace std;
(...skipping 338 matching lines...) Expand 10 before | Expand all | Expand 10 after
368 // should be delayed until the LayerTreeHost::commitComplete, which will run 369 // should be delayed until the LayerTreeHost::commitComplete, which will run
369 // after the commit, but on the main thread. 370 // after the commit, but on the main thread.
370 void LayerTreeHost::finishCommitOnImplThread(LayerTreeHostImpl* hostImpl) 371 void LayerTreeHost::finishCommitOnImplThread(LayerTreeHostImpl* hostImpl)
371 { 372 {
372 DCHECK(m_proxy->isImplThread()); 373 DCHECK(m_proxy->isImplThread());
373 374
374 m_contentsTextureManager->updateBackingsInDrawingImplTree(); 375 m_contentsTextureManager->updateBackingsInDrawingImplTree();
375 m_contentsTextureManager->reduceMemory(hostImpl->resourceProvider()); 376 m_contentsTextureManager->reduceMemory(hostImpl->resourceProvider());
376 377
377 if (m_needsFullTreeSync) { 378 if (m_needsFullTreeSync) {
378 hostImpl->setRootLayer(TreeSynchronizer::synchronizeTrees(rootLayer(), h ostImpl->detachLayerTree(), hostImpl)); 379 hostImpl->setRootLayer(TreeSynchronizer::synchronizeTrees(rootLayer(), h ostImpl->detachLayerTree(), hostImpl->activeTree()));
379 } else { 380 } else {
380 TRACE_EVENT0("cc", "LayerTreeHost::pushPropertiesRecursive"); 381 TRACE_EVENT0("cc", "LayerTreeHost::pushPropertiesRecursive");
381 pushPropertiesRecursive(rootLayer(), hostImpl->rootLayer()); 382 pushPropertiesRecursive(rootLayer(), hostImpl->rootLayer());
382 } 383 }
383 m_needsFullTreeSync = false; 384 m_needsFullTreeSync = false;
384 385
385 if (m_rootLayer && m_hudLayer) 386 if (m_rootLayer && m_hudLayer)
386 hostImpl->activeTree()->set_hud_layer(static_cast<HeadsUpDisplayLayerImp l*>(LayerTreeHostCommon::findLayerInSubtree(hostImpl->rootLayer(), m_hudLayer->i d()))); 387 hostImpl->activeTree()->set_hud_layer(static_cast<HeadsUpDisplayLayerImp l*>(LayerTreeHostCommon::findLayerInSubtree(hostImpl->rootLayer(), m_hudLayer->i d())));
387 else 388 else
388 hostImpl->activeTree()->set_hud_layer(0); 389 hostImpl->activeTree()->set_hud_layer(0);
(...skipping 585 matching lines...) Expand 10 before | Expand all | Expand 10 after
974 else 975 else
975 layer->notifyAnimationFinished(wallClockTime.ToDoubleT()); 976 layer->notifyAnimationFinished(wallClockTime.ToDoubleT());
976 } 977 }
977 } 978 }
978 979
979 for (size_t childIndex = 0; childIndex < layer->children().size(); ++childIn dex) 980 for (size_t childIndex = 0; childIndex < layer->children().size(); ++childIn dex)
980 setAnimationEventsRecursive(events, layer->children()[childIndex].get(), wallClockTime); 981 setAnimationEventsRecursive(events, layer->children()[childIndex].get(), wallClockTime);
981 } 982 }
982 983
983 } // namespace cc 984 } // namespace cc
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698