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

Side by Side Diff: ui/compositor/compositor.cc

Issue 148983007: cc: Enable rendering stats recording in browser compositor. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebased 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 | « content/renderer/render_widget.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 (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 "ui/compositor/compositor.h" 5 #include "ui/compositor/compositor.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include <deque> 8 #include <deque>
9 9
10 #include "base/bind.h" 10 #include "base/bind.h"
(...skipping 218 matching lines...) Expand 10 before | Expand all | Expand 10 after
229 command_line->HasSwitch(cc::switches::kUIShowSurfaceDamageRects); 229 command_line->HasSwitch(cc::switches::kUIShowSurfaceDamageRects);
230 settings.initial_debug_state.show_screen_space_rects = 230 settings.initial_debug_state.show_screen_space_rects =
231 command_line->HasSwitch(cc::switches::kUIShowScreenSpaceRects); 231 command_line->HasSwitch(cc::switches::kUIShowScreenSpaceRects);
232 settings.initial_debug_state.show_replica_screen_space_rects = 232 settings.initial_debug_state.show_replica_screen_space_rects =
233 command_line->HasSwitch(cc::switches::kUIShowReplicaScreenSpaceRects); 233 command_line->HasSwitch(cc::switches::kUIShowReplicaScreenSpaceRects);
234 settings.initial_debug_state.show_occluding_rects = 234 settings.initial_debug_state.show_occluding_rects =
235 command_line->HasSwitch(cc::switches::kUIShowOccludingRects); 235 command_line->HasSwitch(cc::switches::kUIShowOccludingRects);
236 settings.initial_debug_state.show_non_occluding_rects = 236 settings.initial_debug_state.show_non_occluding_rects =
237 command_line->HasSwitch(cc::switches::kUIShowNonOccludingRects); 237 command_line->HasSwitch(cc::switches::kUIShowNonOccludingRects);
238 238
239 settings.initial_debug_state.SetRecordRenderingStats(
240 command_line->HasSwitch(cc::switches::kEnableGpuBenchmarking));
241
239 base::TimeTicks before_create = base::TimeTicks::Now(); 242 base::TimeTicks before_create = base::TimeTicks::Now();
240 if (!!g_compositor_thread) { 243 if (!!g_compositor_thread) {
241 host_ = cc::LayerTreeHost::CreateThreaded( 244 host_ = cc::LayerTreeHost::CreateThreaded(
242 this, NULL, settings, g_compositor_thread->message_loop_proxy()); 245 this, NULL, settings, g_compositor_thread->message_loop_proxy());
243 } else { 246 } else {
244 host_ = cc::LayerTreeHost::CreateSingleThreaded(this, this, NULL, settings); 247 host_ = cc::LayerTreeHost::CreateSingleThreaded(this, this, NULL, settings);
245 } 248 }
246 UMA_HISTOGRAM_TIMES("GPU.CreateBrowserCompositor", 249 UMA_HISTOGRAM_TIMES("GPU.CreateBrowserCompositor",
247 base::TimeTicks::Now() - before_create); 250 base::TimeTicks::Now() - before_create);
248 host_->SetRootLayer(root_web_layer_); 251 host_->SetRootLayer(root_web_layer_);
(...skipping 308 matching lines...) Expand 10 before | Expand all | Expand 10 after
557 // CompositorObservers to be notified before starting another 560 // CompositorObservers to be notified before starting another
558 // draw cycle. 561 // draw cycle.
559 ScheduleDraw(); 562 ScheduleDraw();
560 } 563 }
561 FOR_EACH_OBSERVER(CompositorObserver, 564 FOR_EACH_OBSERVER(CompositorObserver,
562 observer_list_, 565 observer_list_,
563 OnCompositingEnded(this)); 566 OnCompositingEnded(this));
564 } 567 }
565 568
566 } // namespace ui 569 } // namespace ui
OLDNEW
« no previous file with comments | « content/renderer/render_widget.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698