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

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
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_->root_layer(),
1630 [](LayerImpl* layer) { layer->DidBeginTracing(); }); 1630 [](LayerImpl* layer) { layer->DidBeginTracing(); });
1631 } 1631 }
1632 LayerTreeHostCommon::CallFunctionForSubtree( 1632 LayerTreeHostCommon::CallFunctionForEveryLayer(
1633 active_tree_->root_layer(), 1633 active_tree_->root_layer(),
1634 [](LayerImpl* layer) { layer->DidBeginTracing(); }); 1634 [](LayerImpl* layer) { layer->DidBeginTracing(); });
1635 } 1635 }
1636 1636
1637 { 1637 {
1638 TRACE_EVENT0("cc", "DrawLayers.FrameViewerTracing"); 1638 TRACE_EVENT0("cc", "DrawLayers.FrameViewerTracing");
1639 TRACE_EVENT_OBJECT_SNAPSHOT_WITH_ID( 1639 TRACE_EVENT_OBJECT_SNAPSHOT_WITH_ID(
1640 frame_viewer_instrumentation::kCategoryLayerTree, 1640 frame_viewer_instrumentation::kCategoryLayerTree,
1641 "cc::LayerTreeHostImpl", id_, AsValueWithFrame(frame)); 1641 "cc::LayerTreeHostImpl", id_, AsValueWithFrame(frame));
1642 } 1642 }
(...skipping 2280 matching lines...) Expand 10 before | Expand all | Expand 10 after
3923 return task_runner_provider_->HasImplThread(); 3923 return task_runner_provider_->HasImplThread();
3924 } 3924 }
3925 3925
3926 bool LayerTreeHostImpl::CommitToActiveTree() const { 3926 bool LayerTreeHostImpl::CommitToActiveTree() const {
3927 // In single threaded mode we skip the pending tree and commit directly to the 3927 // In single threaded mode we skip the pending tree and commit directly to the
3928 // active tree. 3928 // active tree.
3929 return !task_runner_provider_->HasImplThread(); 3929 return !task_runner_provider_->HasImplThread();
3930 } 3930 }
3931 3931
3932 } // namespace cc 3932 } // namespace cc
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698