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

Side by Side Diff: content/gpu/gpu_child_thread.cc

Issue 10993026: Re-enable the GPU watchdog on Windows (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 2 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 | « no previous file | 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 "content/gpu/gpu_child_thread.h" 5 #include "content/gpu/gpu_child_thread.h"
6 6
7 #include <string> 7 #include <string>
8 #include <vector> 8 #include <vector>
9 9
10 #include "base/bind.h" 10 #include "base/bind.h"
(...skipping 130 matching lines...) Expand 10 before | Expand all | Expand 10 after
141 switches::kDisableGpuWatchdog) && 141 switches::kDisableGpuWatchdog) &&
142 gfx::GetGLImplementation() != gfx::kGLImplementationOSMesaGL && 142 gfx::GetGLImplementation() != gfx::kGLImplementationOSMesaGL &&
143 !RunningOnValgrind(); 143 !RunningOnValgrind();
144 144
145 // Disable the watchdog in debug builds because they tend to only be run by 145 // Disable the watchdog in debug builds because they tend to only be run by
146 // developers who will not appreciate the watchdog killing the GPU process. 146 // developers who will not appreciate the watchdog killing the GPU process.
147 #ifndef NDEBUG 147 #ifndef NDEBUG
148 enable_watchdog = false; 148 enable_watchdog = false;
149 #endif 149 #endif
150 150
151 // Disable the watchdog for Windows. It tends to abort when the GPU process
152 // is not hung but still taking a long time to do something. Instead, the
153 // browser process displays a dialog when it notices that the child window
154 // is hung giving the user an opportunity to terminate it. This is the
155 // same mechanism used to abort hung plugins.
156 #if defined(OS_WIN)
157 enable_watchdog = false;
158 #endif
159
160 // Start the GPU watchdog only after anything that is expected to be time 151 // Start the GPU watchdog only after anything that is expected to be time
161 // consuming has completed, otherwise the process is liable to be aborted. 152 // consuming has completed, otherwise the process is liable to be aborted.
162 if (enable_watchdog) { 153 if (enable_watchdog) {
163 watchdog_thread_ = new GpuWatchdogThread(kGpuTimeout); 154 watchdog_thread_ = new GpuWatchdogThread(kGpuTimeout);
164 watchdog_thread_->Start(); 155 watchdog_thread_->Start();
165 } 156 }
166 157
167 // Defer creation of the render thread. This is to prevent it from handling 158 // Defer creation of the render thread. This is to prevent it from handling
168 // IPC messages before the sandbox has been enabled and all other necessary 159 // IPC messages before the sandbox has been enabled and all other necessary
169 // initialization has succeeded. 160 // initialization has succeeded.
(...skipping 94 matching lines...) Expand 10 before | Expand all | Expand 10 after
264 // Runs on the main thread. 255 // Runs on the main thread.
265 void GpuChildThread::SetDxDiagnostics(GpuChildThread* thread, 256 void GpuChildThread::SetDxDiagnostics(GpuChildThread* thread,
266 const content::DxDiagNode& node) { 257 const content::DxDiagNode& node) {
267 thread->gpu_info_.dx_diagnostics = node; 258 thread->gpu_info_.dx_diagnostics = node;
268 thread->gpu_info_.finalized = true; 259 thread->gpu_info_.finalized = true;
269 thread->collecting_dx_diagnostics_ = false; 260 thread->collecting_dx_diagnostics_ = false;
270 thread->Send(new GpuHostMsg_GraphicsInfoCollected(thread->gpu_info_)); 261 thread->Send(new GpuHostMsg_GraphicsInfoCollected(thread->gpu_info_));
271 } 262 }
272 263
273 #endif 264 #endif
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698