| OLD | NEW |
| 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 376 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 387 RenderProcess::current()->AddRefProcess(); | 387 RenderProcess::current()->AddRefProcess(); |
| 388 DCHECK(RenderThread::Get()); | 388 DCHECK(RenderThread::Get()); |
| 389 has_disable_gpu_vsync_switch_ = CommandLine::ForCurrentProcess()->HasSwitch( | 389 has_disable_gpu_vsync_switch_ = CommandLine::ForCurrentProcess()->HasSwitch( |
| 390 switches::kDisableGpuVsync); | 390 switches::kDisableGpuVsync); |
| 391 is_threaded_compositing_enabled_ = | 391 is_threaded_compositing_enabled_ = |
| 392 CommandLine::ForCurrentProcess()->HasSwitch( | 392 CommandLine::ForCurrentProcess()->HasSwitch( |
| 393 switches::kEnableThreadedCompositing); | 393 switches::kEnableThreadedCompositing); |
| 394 | 394 |
| 395 legacy_software_mode_stats_ = cc::RenderingStatsInstrumentation::Create(); | 395 legacy_software_mode_stats_ = cc::RenderingStatsInstrumentation::Create(); |
| 396 if (CommandLine::ForCurrentProcess()->HasSwitch( | 396 if (CommandLine::ForCurrentProcess()->HasSwitch( |
| 397 switches::kEnableGpuBenchmarking)) | 397 cc::switches::kEnableGpuBenchmarking)) |
| 398 legacy_software_mode_stats_->set_record_rendering_stats(true); | 398 legacy_software_mode_stats_->set_record_rendering_stats(true); |
| 399 } | 399 } |
| 400 | 400 |
| 401 RenderWidget::~RenderWidget() { | 401 RenderWidget::~RenderWidget() { |
| 402 DCHECK(!webwidget_) << "Leaking our WebWidget!"; | 402 DCHECK(!webwidget_) << "Leaking our WebWidget!"; |
| 403 STLDeleteElements(&updates_pending_swap_); | 403 STLDeleteElements(&updates_pending_swap_); |
| 404 if (current_paint_buf_) { | 404 if (current_paint_buf_) { |
| 405 if (RenderProcess::current()) { | 405 if (RenderProcess::current()) { |
| 406 // If the RenderProcess is already gone, it will have released all DIBs | 406 // If the RenderProcess is already gone, it will have released all DIBs |
| 407 // in its destructor anyway. | 407 // in its destructor anyway. |
| (...skipping 2488 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2896 | 2896 |
| 2897 void RenderWidget::RegisterSwappedOutChildFrame(RenderFrameImpl* frame) { | 2897 void RenderWidget::RegisterSwappedOutChildFrame(RenderFrameImpl* frame) { |
| 2898 swapped_out_frames_.AddObserver(frame); | 2898 swapped_out_frames_.AddObserver(frame); |
| 2899 } | 2899 } |
| 2900 | 2900 |
| 2901 void RenderWidget::UnregisterSwappedOutChildFrame(RenderFrameImpl* frame) { | 2901 void RenderWidget::UnregisterSwappedOutChildFrame(RenderFrameImpl* frame) { |
| 2902 swapped_out_frames_.RemoveObserver(frame); | 2902 swapped_out_frames_.RemoveObserver(frame); |
| 2903 } | 2903 } |
| 2904 | 2904 |
| 2905 } // namespace content | 2905 } // namespace content |
| OLD | NEW |