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

Side by Side Diff: content/renderer/render_widget.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_thread_impl.cc ('k') | ui/compositor/compositor.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 (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 "content/renderer/render_widget.h" 5 #include "content/renderer/render_widget.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/command_line.h" 8 #include "base/command_line.h"
9 #include "base/debug/trace_event.h" 9 #include "base/debug/trace_event.h"
10 #include "base/debug/trace_event_synthetic_delay.h" 10 #include "base/debug/trace_event_synthetic_delay.h"
(...skipping 375 matching lines...) Expand 10 before | Expand all | Expand 10 after
386 RenderProcess::current()->AddRefProcess(); 386 RenderProcess::current()->AddRefProcess();
387 DCHECK(RenderThread::Get()); 387 DCHECK(RenderThread::Get());
388 has_disable_gpu_vsync_switch_ = CommandLine::ForCurrentProcess()->HasSwitch( 388 has_disable_gpu_vsync_switch_ = CommandLine::ForCurrentProcess()->HasSwitch(
389 switches::kDisableGpuVsync); 389 switches::kDisableGpuVsync);
390 is_threaded_compositing_enabled_ = 390 is_threaded_compositing_enabled_ =
391 CommandLine::ForCurrentProcess()->HasSwitch( 391 CommandLine::ForCurrentProcess()->HasSwitch(
392 switches::kEnableThreadedCompositing); 392 switches::kEnableThreadedCompositing);
393 393
394 legacy_software_mode_stats_ = cc::RenderingStatsInstrumentation::Create(); 394 legacy_software_mode_stats_ = cc::RenderingStatsInstrumentation::Create();
395 if (CommandLine::ForCurrentProcess()->HasSwitch( 395 if (CommandLine::ForCurrentProcess()->HasSwitch(
396 switches::kEnableGpuBenchmarking)) 396 cc::switches::kEnableGpuBenchmarking))
397 legacy_software_mode_stats_->set_record_rendering_stats(true); 397 legacy_software_mode_stats_->set_record_rendering_stats(true);
398 } 398 }
399 399
400 RenderWidget::~RenderWidget() { 400 RenderWidget::~RenderWidget() {
401 DCHECK(!webwidget_) << "Leaking our WebWidget!"; 401 DCHECK(!webwidget_) << "Leaking our WebWidget!";
402 STLDeleteElements(&updates_pending_swap_); 402 STLDeleteElements(&updates_pending_swap_);
403 if (current_paint_buf_) { 403 if (current_paint_buf_) {
404 if (RenderProcess::current()) { 404 if (RenderProcess::current()) {
405 // If the RenderProcess is already gone, it will have released all DIBs 405 // If the RenderProcess is already gone, it will have released all DIBs
406 // in its destructor anyway. 406 // in its destructor anyway.
(...skipping 2461 matching lines...) Expand 10 before | Expand all | Expand 10 after
2868 2868
2869 void RenderWidget::RegisterSwappedOutChildFrame(RenderFrameImpl* frame) { 2869 void RenderWidget::RegisterSwappedOutChildFrame(RenderFrameImpl* frame) {
2870 swapped_out_frames_.AddObserver(frame); 2870 swapped_out_frames_.AddObserver(frame);
2871 } 2871 }
2872 2872
2873 void RenderWidget::UnregisterSwappedOutChildFrame(RenderFrameImpl* frame) { 2873 void RenderWidget::UnregisterSwappedOutChildFrame(RenderFrameImpl* frame) {
2874 swapped_out_frames_.RemoveObserver(frame); 2874 swapped_out_frames_.RemoveObserver(frame);
2875 } 2875 }
2876 2876
2877 } // namespace content 2877 } // namespace content
OLDNEW
« no previous file with comments | « content/renderer/render_thread_impl.cc ('k') | ui/compositor/compositor.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698