| 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/browser/gpu/gpu_process_host.h" | 5 #include "content/browser/gpu/gpu_process_host.h" |
| 6 | 6 |
| 7 #include <stddef.h> | 7 #include <stddef.h> |
| 8 | 8 |
| 9 #include <utility> | 9 #include <utility> |
| 10 | 10 |
| (...skipping 909 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 920 const IPC::Message& message) { | 920 const IPC::Message& message) { |
| 921 RenderWidgetResizeHelper::PostGpuProcessMsg(host_id_, message); | 921 RenderWidgetResizeHelper::PostGpuProcessMsg(host_id_, message); |
| 922 } | 922 } |
| 923 #endif | 923 #endif |
| 924 | 924 |
| 925 void GpuProcessHost::OnProcessLaunched() { | 925 void GpuProcessHost::OnProcessLaunched() { |
| 926 UMA_HISTOGRAM_TIMES("GPU.GPUProcessLaunchTime", | 926 UMA_HISTOGRAM_TIMES("GPU.GPUProcessLaunchTime", |
| 927 base::TimeTicks::Now() - init_start_time_); | 927 base::TimeTicks::Now() - init_start_time_); |
| 928 } | 928 } |
| 929 | 929 |
| 930 void GpuProcessHost::OnProcessLaunchFailed() { | 930 void GpuProcessHost::OnProcessLaunchFailed(int error_code) { |
| 931 // TODO(wfh): do something more useful with this error code. |
| 931 RecordProcessCrash(); | 932 RecordProcessCrash(); |
| 932 } | 933 } |
| 933 | 934 |
| 934 void GpuProcessHost::OnProcessCrashed(int exit_code) { | 935 void GpuProcessHost::OnProcessCrashed(int exit_code) { |
| 935 SendOutstandingReplies(); | 936 SendOutstandingReplies(); |
| 936 RecordProcessCrash(); | 937 RecordProcessCrash(); |
| 937 GpuDataManagerImpl::GetInstance()->ProcessCrashed( | 938 GpuDataManagerImpl::GetInstance()->ProcessCrashed( |
| 938 process_->GetTerminationStatus(true /* known_dead */, NULL)); | 939 process_->GetTerminationStatus(true /* known_dead */, NULL)); |
| 939 } | 940 } |
| 940 | 941 |
| (...skipping 243 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1184 TRACE_EVENT0("gpu", "GpuProcessHost::OnCacheShader"); | 1185 TRACE_EVENT0("gpu", "GpuProcessHost::OnCacheShader"); |
| 1185 ClientIdToShaderCacheMap::iterator iter = | 1186 ClientIdToShaderCacheMap::iterator iter = |
| 1186 client_id_to_shader_cache_.find(client_id); | 1187 client_id_to_shader_cache_.find(client_id); |
| 1187 // If the cache doesn't exist then this is an off the record profile. | 1188 // If the cache doesn't exist then this is an off the record profile. |
| 1188 if (iter == client_id_to_shader_cache_.end()) | 1189 if (iter == client_id_to_shader_cache_.end()) |
| 1189 return; | 1190 return; |
| 1190 iter->second->Cache(GetShaderPrefixKey() + ":" + key, shader); | 1191 iter->second->Cache(GetShaderPrefixKey() + ":" + key, shader); |
| 1191 } | 1192 } |
| 1192 | 1193 |
| 1193 } // namespace content | 1194 } // namespace content |
| OLD | NEW |