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

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

Issue 1864183002: cc: Main thread skip single layers instead of subtrees (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Format the comments 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.cc ('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 1608 matching lines...) Expand 10 before | Expand all | Expand 10 after
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::CallFunctionForEveryLayer( 1628 LayerTreeHostCommon::CallFunctionForEveryLayer(
1629 pending_tree(), [](LayerImpl* layer) { layer->DidBeginTracing(); }); 1629 pending_tree(), [](LayerImpl* layer) { layer->DidBeginTracing(); },
1630 CallFunctionLayerType::ALL_LAYERS);
1630 } 1631 }
1631 LayerTreeHostCommon::CallFunctionForEveryLayer( 1632 LayerTreeHostCommon::CallFunctionForEveryLayer(
1632 active_tree(), [](LayerImpl* layer) { layer->DidBeginTracing(); }); 1633 active_tree(), [](LayerImpl* layer) { layer->DidBeginTracing(); },
1634 CallFunctionLayerType::ALL_LAYERS);
1633 } 1635 }
1634 1636
1635 { 1637 {
1636 TRACE_EVENT0("cc", "DrawLayers.FrameViewerTracing"); 1638 TRACE_EVENT0("cc", "DrawLayers.FrameViewerTracing");
1637 TRACE_EVENT_OBJECT_SNAPSHOT_WITH_ID( 1639 TRACE_EVENT_OBJECT_SNAPSHOT_WITH_ID(
1638 frame_viewer_instrumentation::kCategoryLayerTree, 1640 frame_viewer_instrumentation::kCategoryLayerTree,
1639 "cc::LayerTreeHostImpl", id_, AsValueWithFrame(frame)); 1641 "cc::LayerTreeHostImpl", id_, AsValueWithFrame(frame));
1640 } 1642 }
1641 1643
1642 const DrawMode draw_mode = GetDrawMode(); 1644 const DrawMode draw_mode = GetDrawMode();
(...skipping 2294 matching lines...) Expand 10 before | Expand all | Expand 10 after
3937 return task_runner_provider_->HasImplThread(); 3939 return task_runner_provider_->HasImplThread();
3938 } 3940 }
3939 3941
3940 bool LayerTreeHostImpl::CommitToActiveTree() const { 3942 bool LayerTreeHostImpl::CommitToActiveTree() const {
3941 // In single threaded mode we skip the pending tree and commit directly to the 3943 // In single threaded mode we skip the pending tree and commit directly to the
3942 // active tree. 3944 // active tree.
3943 return !task_runner_provider_->HasImplThread(); 3945 return !task_runner_provider_->HasImplThread();
3944 } 3946 }
3945 3947
3946 } // namespace cc 3948 } // namespace cc
OLDNEW
« no previous file with comments | « cc/trees/layer_tree_host_common.cc ('k') | cc/trees/layer_tree_host_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698