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

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

Issue 144463016: cc: add more devtools instrumentation (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: capitalized instrumentation functions name Created 6 years, 10 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 | Annotate | Revision Log
« no previous file with comments | « cc/trees/layer_tree_host.cc ('k') | cc/trees/thread_proxy.h » ('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 <algorithm> 7 #include <algorithm>
8 #include <limits> 8 #include <limits>
9 9
10 #include "base/basictypes.h" 10 #include "base/basictypes.h"
(...skipping 1327 matching lines...) Expand 10 before | Expand all | Expand 10 after
1338 TRACE_EVENT0("cc", "EarlyOut_NoDamage"); 1338 TRACE_EVENT0("cc", "EarlyOut_NoDamage");
1339 DCHECK(!output_surface_->capabilities() 1339 DCHECK(!output_surface_->capabilities()
1340 .draw_and_swap_full_viewport_every_frame); 1340 .draw_and_swap_full_viewport_every_frame);
1341 return; 1341 return;
1342 } 1342 }
1343 1343
1344 DCHECK(!frame->render_passes.empty()); 1344 DCHECK(!frame->render_passes.empty());
1345 1345
1346 fps_counter_->SaveTimeStamp(frame_begin_time, 1346 fps_counter_->SaveTimeStamp(frame_begin_time,
1347 !output_surface_->context_provider()); 1347 !output_surface_->context_provider());
1348
1349 bool on_main_thread = false; 1348 bool on_main_thread = false;
1350 rendering_stats_instrumentation_->IncrementFrameCount( 1349 rendering_stats_instrumentation_->IncrementFrameCount(
1351 1, on_main_thread); 1350 1, on_main_thread);
1352 1351
1353 if (tile_manager_) { 1352 if (tile_manager_) {
1354 memory_history_->SaveEntry( 1353 memory_history_->SaveEntry(
1355 tile_manager_->memory_stats_from_last_assign()); 1354 tile_manager_->memory_stats_from_last_assign());
1356 } 1355 }
1357 1356
1358 if (debug_state_.ShowHudRects()) { 1357 if (debug_state_.ShowHudRects()) {
(...skipping 73 matching lines...) Expand 10 before | Expand all | Expand 10 after
1432 // The next frame should start by assuming nothing has changed, and changes 1431 // The next frame should start by assuming nothing has changed, and changes
1433 // are noted as they occur. 1432 // are noted as they occur.
1434 // TODO(boliu): If we did a temporary software renderer frame, propogate the 1433 // TODO(boliu): If we did a temporary software renderer frame, propogate the
1435 // damage forward to the next frame. 1434 // damage forward to the next frame.
1436 for (size_t i = 0; i < frame->render_surface_layer_list->size(); i++) { 1435 for (size_t i = 0; i < frame->render_surface_layer_list->size(); i++) {
1437 (*frame->render_surface_layer_list)[i]->render_surface()->damage_tracker()-> 1436 (*frame->render_surface_layer_list)[i]->render_surface()->damage_tracker()->
1438 DidDrawDamagedArea(); 1437 DidDrawDamagedArea();
1439 } 1438 }
1440 active_tree_->root_layer()->ResetAllChangeTrackingForSubtree(); 1439 active_tree_->root_layer()->ResetAllChangeTrackingForSubtree();
1441 1440
1441 devtools_instrumentation::DidDrawFrame(id_);
1442 BenchmarkInstrumentation::IssueImplThreadRenderingStatsEvent( 1442 BenchmarkInstrumentation::IssueImplThreadRenderingStatsEvent(
1443 rendering_stats_instrumentation_->impl_thread_rendering_stats()); 1443 rendering_stats_instrumentation_->impl_thread_rendering_stats());
1444 rendering_stats_instrumentation_->AccumulateAndClearImplThreadStats(); 1444 rendering_stats_instrumentation_->AccumulateAndClearImplThreadStats();
1445 } 1445 }
1446 1446
1447 void LayerTreeHostImpl::DidDrawAllLayers(const FrameData& frame) { 1447 void LayerTreeHostImpl::DidDrawAllLayers(const FrameData& frame) {
1448 for (size_t i = 0; i < frame.will_draw_layers.size(); ++i) 1448 for (size_t i = 0; i < frame.will_draw_layers.size(); ++i)
1449 frame.will_draw_layers[i]->DidDraw(resource_provider_.get()); 1449 frame.will_draw_layers[i]->DidDraw(resource_provider_.get());
1450 1450
1451 // Once all layers have been drawn, pending texture uploads should no 1451 // Once all layers have been drawn, pending texture uploads should no
(...skipping 178 matching lines...) Expand 10 before | Expand all | Expand 10 after
1630 stats.main_stats.record_time + 1630 stats.main_stats.record_time +
1631 stats.impl_stats.rasterize_time); 1631 stats.impl_stats.rasterize_time);
1632 } 1632 }
1633 1633
1634 client_->DidActivatePendingTree(); 1634 client_->DidActivatePendingTree();
1635 if (!tree_activation_callback_.is_null()) 1635 if (!tree_activation_callback_.is_null())
1636 tree_activation_callback_.Run(); 1636 tree_activation_callback_.Run();
1637 1637
1638 if (time_source_client_adapter_ && time_source_client_adapter_->Active()) 1638 if (time_source_client_adapter_ && time_source_client_adapter_->Active())
1639 DCHECK(active_tree_->root_layer()); 1639 DCHECK(active_tree_->root_layer());
1640 devtools_instrumentation::didActivateLayerTree(id_, 1640 devtools_instrumentation::DidActivateLayerTree(
1641 active_tree_->source_frame_number()); 1641 id_, active_tree_->source_frame_number());
1642 } 1642 }
1643 1643
1644 void LayerTreeHostImpl::SetVisible(bool visible) { 1644 void LayerTreeHostImpl::SetVisible(bool visible) {
1645 DCHECK(proxy_->IsImplThread()); 1645 DCHECK(proxy_->IsImplThread());
1646 1646
1647 if (visible_ == visible) 1647 if (visible_ == visible)
1648 return; 1648 return;
1649 visible_ = visible; 1649 visible_ = visible;
1650 DidVisibilityChange(this, visible_); 1650 DidVisibilityChange(this, visible_);
1651 EnforceManagedMemoryPolicy(ActualManagedMemoryPolicy()); 1651 EnforceManagedMemoryPolicy(ActualManagedMemoryPolicy());
(...skipping 1337 matching lines...) Expand 10 before | Expand all | Expand 10 after
2989 swap_promise_monitor_.erase(monitor); 2989 swap_promise_monitor_.erase(monitor);
2990 } 2990 }
2991 2991
2992 void LayerTreeHostImpl::NotifySwapPromiseMonitorsOfSetNeedsRedraw() { 2992 void LayerTreeHostImpl::NotifySwapPromiseMonitorsOfSetNeedsRedraw() {
2993 std::set<SwapPromiseMonitor*>::iterator it = swap_promise_monitor_.begin(); 2993 std::set<SwapPromiseMonitor*>::iterator it = swap_promise_monitor_.begin();
2994 for (; it != swap_promise_monitor_.end(); it++) 2994 for (; it != swap_promise_monitor_.end(); it++)
2995 (*it)->OnSetNeedsRedrawOnImpl(); 2995 (*it)->OnSetNeedsRedrawOnImpl();
2996 } 2996 }
2997 2997
2998 } // namespace cc 2998 } // namespace cc
OLDNEW
« no previous file with comments | « cc/trees/layer_tree_host.cc ('k') | cc/trees/thread_proxy.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698