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

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

Issue 707963003: cc: Remove main thread rendering stats (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Added out of line constructor Created 6 years, 1 month 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/resources/skpicture_content_layer_updater.cc ('k') | cc/trees/single_thread_proxy.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 <algorithm> 7 #include <algorithm>
8 #include <limits> 8 #include <limits>
9 9
10 #include "base/basictypes.h" 10 #include "base/basictypes.h"
(...skipping 1525 matching lines...) Expand 10 before | Expand all | Expand 10 after
1536 active_tree_->hud_layer(), 1536 active_tree_->hud_layer(),
1537 *frame->render_surface_layer_list, 1537 *frame->render_surface_layer_list,
1538 frame->occluding_screen_space_rects, 1538 frame->occluding_screen_space_rects,
1539 frame->non_occluding_screen_space_rects, 1539 frame->non_occluding_screen_space_rects,
1540 debug_state_); 1540 debug_state_);
1541 } 1541 }
1542 1542
1543 if (!settings_.impl_side_painting && debug_state_.continuous_painting) { 1543 if (!settings_.impl_side_painting && debug_state_.continuous_painting) {
1544 const RenderingStats& stats = 1544 const RenderingStats& stats =
1545 rendering_stats_instrumentation_->GetRenderingStats(); 1545 rendering_stats_instrumentation_->GetRenderingStats();
1546 paint_time_counter_->SavePaintTime(stats.main_stats.paint_time); 1546 paint_time_counter_->SavePaintTime(
1547 stats.begin_main_frame_to_commit_duration.GetLastTimeDelta());
1547 } 1548 }
1548 1549
1549 bool is_new_trace; 1550 bool is_new_trace;
1550 TRACE_EVENT_IS_NEW_TRACE(&is_new_trace); 1551 TRACE_EVENT_IS_NEW_TRACE(&is_new_trace);
1551 if (is_new_trace) { 1552 if (is_new_trace) {
1552 if (pending_tree_) { 1553 if (pending_tree_) {
1553 LayerTreeHostCommon::CallFunctionForSubtree( 1554 LayerTreeHostCommon::CallFunctionForSubtree(
1554 pending_tree_->root_layer(), 1555 pending_tree_->root_layer(),
1555 base::Bind(&LayerTreeHostImplDidBeginTracingCallback)); 1556 base::Bind(&LayerTreeHostImplDidBeginTracingCallback));
1556 } 1557 }
(...skipping 319 matching lines...) Expand 10 before | Expand all | Expand 10 after
1876 client_->DidActivateSyncTree(); 1877 client_->DidActivateSyncTree();
1877 if (!tree_activation_callback_.is_null()) 1878 if (!tree_activation_callback_.is_null())
1878 tree_activation_callback_.Run(); 1879 tree_activation_callback_.Run();
1879 1880
1880 if (debug_state_.continuous_painting) { 1881 if (debug_state_.continuous_painting) {
1881 const RenderingStats& stats = 1882 const RenderingStats& stats =
1882 rendering_stats_instrumentation_->GetRenderingStats(); 1883 rendering_stats_instrumentation_->GetRenderingStats();
1883 // TODO(hendrikw): This requires a different metric when we commit directly 1884 // TODO(hendrikw): This requires a different metric when we commit directly
1884 // to the active tree. See crbug.com/429311. 1885 // to the active tree. See crbug.com/429311.
1885 paint_time_counter_->SavePaintTime( 1886 paint_time_counter_->SavePaintTime(
1886 stats.impl_stats.commit_to_activate_duration.GetLastTimeDelta() + 1887 stats.commit_to_activate_duration.GetLastTimeDelta() +
1887 stats.impl_stats.draw_duration.GetLastTimeDelta()); 1888 stats.draw_duration.GetLastTimeDelta());
1888 } 1889 }
1889 1890
1890 if (time_source_client_adapter_ && time_source_client_adapter_->Active()) 1891 if (time_source_client_adapter_ && time_source_client_adapter_->Active())
1891 DCHECK(active_tree_->root_layer()); 1892 DCHECK(active_tree_->root_layer());
1892 1893
1893 scoped_ptr<PageScaleAnimation> page_scale_animation = 1894 scoped_ptr<PageScaleAnimation> page_scale_animation =
1894 active_tree_->TakePageScaleAnimation(); 1895 active_tree_->TakePageScaleAnimation();
1895 if (page_scale_animation) { 1896 if (page_scale_animation) {
1896 page_scale_animation_ = page_scale_animation.Pass(); 1897 page_scale_animation_ = page_scale_animation.Pass();
1897 SetNeedsAnimate(); 1898 SetNeedsAnimate();
(...skipping 1624 matching lines...) Expand 10 before | Expand all | Expand 10 after
3522 } 3523 }
3523 3524
3524 void LayerTreeHostImpl::UnregisterPictureLayerImpl(PictureLayerImpl* layer) { 3525 void LayerTreeHostImpl::UnregisterPictureLayerImpl(PictureLayerImpl* layer) {
3525 std::vector<PictureLayerImpl*>::iterator it = 3526 std::vector<PictureLayerImpl*>::iterator it =
3526 std::find(picture_layers_.begin(), picture_layers_.end(), layer); 3527 std::find(picture_layers_.begin(), picture_layers_.end(), layer);
3527 DCHECK(it != picture_layers_.end()); 3528 DCHECK(it != picture_layers_.end());
3528 picture_layers_.erase(it); 3529 picture_layers_.erase(it);
3529 } 3530 }
3530 3531
3531 } // namespace cc 3532 } // namespace cc
OLDNEW
« no previous file with comments | « cc/resources/skpicture_content_layer_updater.cc ('k') | cc/trees/single_thread_proxy.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698