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 883 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
894 const IPC::Message& message) { | 894 const IPC::Message& message) { |
895 RenderWidgetResizeHelper::PostGpuProcessMsg(host_id_, message); | 895 RenderWidgetResizeHelper::PostGpuProcessMsg(host_id_, message); |
896 } | 896 } |
897 #endif | 897 #endif |
898 | 898 |
899 void GpuProcessHost::OnProcessLaunched() { | 899 void GpuProcessHost::OnProcessLaunched() { |
900 UMA_HISTOGRAM_TIMES("GPU.GPUProcessLaunchTime", | 900 UMA_HISTOGRAM_TIMES("GPU.GPUProcessLaunchTime", |
901 base::TimeTicks::Now() - init_start_time_); | 901 base::TimeTicks::Now() - init_start_time_); |
902 } | 902 } |
903 | 903 |
904 void GpuProcessHost::OnProcessLaunchFailed() { | 904 void GpuProcessHost::OnProcessLaunchFailed(int error_code) { |
| 905 // TODO(wfh): do something more useful with this error code. |
905 RecordProcessCrash(); | 906 RecordProcessCrash(); |
906 } | 907 } |
907 | 908 |
908 void GpuProcessHost::OnProcessCrashed(int exit_code) { | 909 void GpuProcessHost::OnProcessCrashed(int exit_code) { |
909 SendOutstandingReplies(); | 910 SendOutstandingReplies(); |
910 RecordProcessCrash(); | 911 RecordProcessCrash(); |
911 GpuDataManagerImpl::GetInstance()->ProcessCrashed( | 912 GpuDataManagerImpl::GetInstance()->ProcessCrashed( |
912 process_->GetTerminationStatus(true /* known_dead */, NULL)); | 913 process_->GetTerminationStatus(true /* known_dead */, NULL)); |
913 } | 914 } |
914 | 915 |
(...skipping 240 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1155 TRACE_EVENT0("gpu", "GpuProcessHost::OnCacheShader"); | 1156 TRACE_EVENT0("gpu", "GpuProcessHost::OnCacheShader"); |
1156 ClientIdToShaderCacheMap::iterator iter = | 1157 ClientIdToShaderCacheMap::iterator iter = |
1157 client_id_to_shader_cache_.find(client_id); | 1158 client_id_to_shader_cache_.find(client_id); |
1158 // If the cache doesn't exist then this is an off the record profile. | 1159 // If the cache doesn't exist then this is an off the record profile. |
1159 if (iter == client_id_to_shader_cache_.end()) | 1160 if (iter == client_id_to_shader_cache_.end()) |
1160 return; | 1161 return; |
1161 iter->second->Cache(GetShaderPrefixKey() + ":" + key, shader); | 1162 iter->second->Cache(GetShaderPrefixKey() + ":" + key, shader); |
1162 } | 1163 } |
1163 | 1164 |
1164 } // namespace content | 1165 } // namespace content |
OLD | NEW |