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

Side by Side Diff: cc/trees/layer_tree_host_impl.cc

Issue 1846043002: cc : Make CallFunctionForSubtree on impl use layer iterator (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 8 months 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
« no previous file with comments | « cc/trees/layer_tree_host_common.h ('k') | cc/trees/layer_tree_host_unittest.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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/trees/layer_tree_host_impl.h" 5 #include "cc/trees/layer_tree_host_impl.h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 #include <stdint.h> 8 #include <stdint.h>
9 9
10 #include <algorithm> 10 #include <algorithm>
(...skipping 1607 matching lines...) Expand 10 before | Expand all | Expand 10 after
1618 active_tree_->root_layer(), 1618 active_tree_->root_layer(),
1619 active_tree_->hud_layer(), 1619 active_tree_->hud_layer(),
1620 *frame->render_surface_layer_list, 1620 *frame->render_surface_layer_list,
1621 debug_state_); 1621 debug_state_);
1622 } 1622 }
1623 1623
1624 bool is_new_trace; 1624 bool is_new_trace;
1625 TRACE_EVENT_IS_NEW_TRACE(&is_new_trace); 1625 TRACE_EVENT_IS_NEW_TRACE(&is_new_trace);
1626 if (is_new_trace) { 1626 if (is_new_trace) {
1627 if (pending_tree_) { 1627 if (pending_tree_) {
1628 LayerTreeHostCommon::CallFunctionForSubtree( 1628 LayerTreeHostCommon::CallFunctionForEveryLayer(
1629 pending_tree_->root_layer(), 1629 pending_tree(), [](LayerImpl* layer) { layer->DidBeginTracing(); });
1630 [](LayerImpl* layer) { layer->DidBeginTracing(); });
1631 } 1630 }
1632 LayerTreeHostCommon::CallFunctionForSubtree( 1631 LayerTreeHostCommon::CallFunctionForEveryLayer(
1633 active_tree_->root_layer(), 1632 active_tree(), [](LayerImpl* layer) { layer->DidBeginTracing(); });
1634 [](LayerImpl* layer) { layer->DidBeginTracing(); });
1635 } 1633 }
1636 1634
1637 { 1635 {
1638 TRACE_EVENT0("cc", "DrawLayers.FrameViewerTracing"); 1636 TRACE_EVENT0("cc", "DrawLayers.FrameViewerTracing");
1639 TRACE_EVENT_OBJECT_SNAPSHOT_WITH_ID( 1637 TRACE_EVENT_OBJECT_SNAPSHOT_WITH_ID(
1640 frame_viewer_instrumentation::kCategoryLayerTree, 1638 frame_viewer_instrumentation::kCategoryLayerTree,
1641 "cc::LayerTreeHostImpl", id_, AsValueWithFrame(frame)); 1639 "cc::LayerTreeHostImpl", id_, AsValueWithFrame(frame));
1642 } 1640 }
1643 1641
1644 const DrawMode draw_mode = GetDrawMode(); 1642 const DrawMode draw_mode = GetDrawMode();
(...skipping 2278 matching lines...) Expand 10 before | Expand all | Expand 10 after
3923 return task_runner_provider_->HasImplThread(); 3921 return task_runner_provider_->HasImplThread();
3924 } 3922 }
3925 3923
3926 bool LayerTreeHostImpl::CommitToActiveTree() const { 3924 bool LayerTreeHostImpl::CommitToActiveTree() const {
3927 // In single threaded mode we skip the pending tree and commit directly to the 3925 // In single threaded mode we skip the pending tree and commit directly to the
3928 // active tree. 3926 // active tree.
3929 return !task_runner_provider_->HasImplThread(); 3927 return !task_runner_provider_->HasImplThread();
3930 } 3928 }
3931 3929
3932 } // namespace cc 3930 } // namespace cc
OLDNEW
« no previous file with comments | « cc/trees/layer_tree_host_common.h ('k') | cc/trees/layer_tree_host_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698