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

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

Issue 924973003: CC: Force push properties for all layers when tracing is started (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: review comments addressed Created 5 years, 9 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
« cc/trees/layer_tree_host.cc ('K') | « cc/trees/layer_tree_host.cc ('k') | no next file » | 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 <algorithm> 7 #include <algorithm>
8 #include <limits> 8 #include <limits>
9 9
10 #include "base/basictypes.h" 10 #include "base/basictypes.h"
11 #include "base/containers/hash_tables.h" 11 #include "base/containers/hash_tables.h"
12 #include "base/json/json_writer.h" 12 #include "base/json/json_writer.h"
13 #include "base/metrics/histogram.h" 13 #include "base/metrics/histogram.h"
14 #include "base/stl_util.h" 14 #include "base/stl_util.h"
15 #include "base/strings/stringprintf.h" 15 #include "base/strings/stringprintf.h"
16 #include "base/trace_event/trace_event_argument.h" 16 #include "base/trace_event/trace_event_argument.h"
17 #include "cc/animation/animation_id_provider.h" 17 #include "cc/animation/animation_id_provider.h"
18 #include "cc/animation/scroll_offset_animation_curve.h" 18 #include "cc/animation/scroll_offset_animation_curve.h"
19 #include "cc/animation/scrollbar_animation_controller.h" 19 #include "cc/animation/scrollbar_animation_controller.h"
20 #include "cc/animation/timing_function.h" 20 #include "cc/animation/timing_function.h"
21 #include "cc/base/math_util.h" 21 #include "cc/base/math_util.h"
22 #include "cc/base/util.h" 22 #include "cc/base/util.h"
23 #include "cc/debug/benchmark_instrumentation.h" 23 #include "cc/debug/benchmark_instrumentation.h"
24 #include "cc/debug/debug_rect_history.h" 24 #include "cc/debug/debug_rect_history.h"
25 #include "cc/debug/devtools_instrumentation.h" 25 #include "cc/debug/devtools_instrumentation.h"
26 #include "cc/debug/frame_rate_counter.h" 26 #include "cc/debug/frame_rate_counter.h"
27 #include "cc/debug/frame_viewer_instrumentation.h"
27 #include "cc/debug/paint_time_counter.h" 28 #include "cc/debug/paint_time_counter.h"
28 #include "cc/debug/rendering_stats_instrumentation.h" 29 #include "cc/debug/rendering_stats_instrumentation.h"
29 #include "cc/debug/traced_value.h" 30 #include "cc/debug/traced_value.h"
30 #include "cc/input/page_scale_animation.h" 31 #include "cc/input/page_scale_animation.h"
31 #include "cc/input/scroll_elasticity_helper.h" 32 #include "cc/input/scroll_elasticity_helper.h"
32 #include "cc/input/top_controls_manager.h" 33 #include "cc/input/top_controls_manager.h"
33 #include "cc/layers/append_quads_data.h" 34 #include "cc/layers/append_quads_data.h"
34 #include "cc/layers/heads_up_display_layer_impl.h" 35 #include "cc/layers/heads_up_display_layer_impl.h"
35 #include "cc/layers/layer_impl.h" 36 #include "cc/layers/layer_impl.h"
36 #include "cc/layers/layer_iterator.h" 37 #include "cc/layers/layer_iterator.h"
(...skipping 1484 matching lines...) Expand 10 before | Expand all | Expand 10 after
1521 [](LayerImpl* layer) { layer->DidBeginTracing(); }); 1522 [](LayerImpl* layer) { layer->DidBeginTracing(); });
1522 } 1523 }
1523 LayerTreeHostCommon::CallFunctionForSubtree( 1524 LayerTreeHostCommon::CallFunctionForSubtree(
1524 active_tree_->root_layer(), 1525 active_tree_->root_layer(),
1525 [](LayerImpl* layer) { layer->DidBeginTracing(); }); 1526 [](LayerImpl* layer) { layer->DidBeginTracing(); });
1526 } 1527 }
1527 1528
1528 { 1529 {
1529 TRACE_EVENT0("cc", "DrawLayers.FrameViewerTracing"); 1530 TRACE_EVENT0("cc", "DrawLayers.FrameViewerTracing");
1530 TRACE_EVENT_OBJECT_SNAPSHOT_WITH_ID( 1531 TRACE_EVENT_OBJECT_SNAPSHOT_WITH_ID(
1531 TRACE_DISABLED_BY_DEFAULT("cc.debug") "," 1532 frame_viewer_instrumentation::kCategoryLayerTree,
1532 TRACE_DISABLED_BY_DEFAULT("cc.debug.quads") "," 1533 "cc::LayerTreeHostImpl", id_, AsValueWithFrame(frame));
1533 TRACE_DISABLED_BY_DEFAULT("devtools.timeline.layers"),
1534 "cc::LayerTreeHostImpl",
1535 id_,
1536 AsValueWithFrame(frame));
1537 } 1534 }
1538 1535
1539 const DrawMode draw_mode = GetDrawMode(); 1536 const DrawMode draw_mode = GetDrawMode();
1540 1537
1541 // Because the contents of the HUD depend on everything else in the frame, the 1538 // Because the contents of the HUD depend on everything else in the frame, the
1542 // contents of its texture are updated as the last thing before the frame is 1539 // contents of its texture are updated as the last thing before the frame is
1543 // drawn. 1540 // drawn.
1544 if (active_tree_->hud_layer()) { 1541 if (active_tree_->hud_layer()) {
1545 TRACE_EVENT0("cc", "DrawLayers.UpdateHudTexture"); 1542 TRACE_EVENT0("cc", "DrawLayers.UpdateHudTexture");
1546 active_tree_->hud_layer()->UpdateHudTexture(draw_mode, 1543 active_tree_->hud_layer()->UpdateHudTexture(draw_mode,
(...skipping 1923 matching lines...) Expand 10 before | Expand all | Expand 10 after
3470 new_target.SetToMin(layer_impl->MaxScrollOffset()); 3467 new_target.SetToMin(layer_impl->MaxScrollOffset());
3471 3468
3472 curve->UpdateTarget( 3469 curve->UpdateTarget(
3473 animation->TrimTimeToCurrentIteration(CurrentBeginFrameArgs().frame_time) 3470 animation->TrimTimeToCurrentIteration(CurrentBeginFrameArgs().frame_time)
3474 .InSecondsF(), 3471 .InSecondsF(),
3475 new_target); 3472 new_target);
3476 3473
3477 return true; 3474 return true;
3478 } 3475 }
3479 } // namespace cc 3476 } // namespace cc
OLDNEW
« cc/trees/layer_tree_host.cc ('K') | « cc/trees/layer_tree_host.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698