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

Side by Side Diff: content/browser/gpu/gpu_process_host.cc

Issue 9235052: Fix race condition in utility process clients (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 11 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
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/browser/gpu/gpu_process_host.h" 5 #include "content/browser/gpu/gpu_process_host.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/bind_helpers.h" 8 #include "base/bind_helpers.h"
9 #include "base/base_switches.h" 9 #include "base/base_switches.h"
10 #include "base/command_line.h" 10 #include "base/command_line.h"
(...skipping 489 matching lines...) Expand 10 before | Expand all | Expand 10 after
500 base::GetCurrentProcessHandle(), 500 base::GetCurrentProcessHandle(),
501 &gpu_process_, 501 &gpu_process_,
502 PROCESS_DUP_HANDLE, 502 PROCESS_DUP_HANDLE,
503 FALSE, 503 FALSE,
504 0); 504 0);
505 #else 505 #else
506 gpu_process_ = child_handle; 506 gpu_process_ = child_handle;
507 #endif 507 #endif
508 } 508 }
509 509
510 void GpuProcessHost::OnProcessCrashed(int exit_code) { 510 void GpuProcessHost::OnProcessCrashedOrWasKilled(int exit_code) {
511 SendOutstandingReplies(); 511 SendOutstandingReplies();
512 if (++g_gpu_crash_count >= kGpuMaxCrashCount) { 512 if (++g_gpu_crash_count >= kGpuMaxCrashCount) {
513 // The gpu process is too unstable to use. Disable it for current session. 513 // The gpu process is too unstable to use. Disable it for current session.
514 gpu_enabled_ = false; 514 gpu_enabled_ = false;
515 } 515 }
516 } 516 }
517 517
518 bool GpuProcessHost::software_rendering() { 518 bool GpuProcessHost::software_rendering() {
519 return software_rendering_; 519 return software_rendering_;
520 } 520 }
(...skipping 103 matching lines...) Expand 10 before | Expand all | Expand 10 after
624 const IPC::ChannelHandle& channel_handle, 624 const IPC::ChannelHandle& channel_handle,
625 base::ProcessHandle renderer_process_for_gpu, 625 base::ProcessHandle renderer_process_for_gpu,
626 const content::GPUInfo& gpu_info) { 626 const content::GPUInfo& gpu_info) {
627 callback.Run(channel_handle, renderer_process_for_gpu, gpu_info); 627 callback.Run(channel_handle, renderer_process_for_gpu, gpu_info);
628 } 628 }
629 629
630 void GpuProcessHost::CreateCommandBufferError( 630 void GpuProcessHost::CreateCommandBufferError(
631 const CreateCommandBufferCallback& callback, int32 route_id) { 631 const CreateCommandBufferCallback& callback, int32 route_id) {
632 callback.Run(route_id); 632 callback.Run(route_id);
633 } 633 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698