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 <algorithm> | 9 #include <algorithm> |
10 #include <list> | 10 #include <list> |
(...skipping 922 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
933 RecordProcessCrash(); | 933 RecordProcessCrash(); |
934 } | 934 } |
935 | 935 |
936 void GpuProcessHost::OnProcessCrashed(int exit_code) { | 936 void GpuProcessHost::OnProcessCrashed(int exit_code) { |
937 SendOutstandingReplies(); | 937 SendOutstandingReplies(); |
938 RecordProcessCrash(); | 938 RecordProcessCrash(); |
939 GpuDataManagerImpl::GetInstance()->ProcessCrashed( | 939 GpuDataManagerImpl::GetInstance()->ProcessCrashed( |
940 process_->GetTerminationStatus(true /* known_dead */, NULL)); | 940 process_->GetTerminationStatus(true /* known_dead */, NULL)); |
941 } | 941 } |
942 | 942 |
943 shell::InterfaceRegistry* GpuProcessHost::GetInterfaceRegistry() { | |
944 return mojo_child_connection_->GetInterfaceRegistry(); | |
945 } | |
946 | |
947 shell::InterfaceProvider* GpuProcessHost::GetRemoteInterfaces() { | 943 shell::InterfaceProvider* GpuProcessHost::GetRemoteInterfaces() { |
948 return mojo_child_connection_->GetRemoteInterfaces(); | 944 return mojo_child_connection_->GetRemoteInterfaces(); |
949 } | 945 } |
950 | 946 |
951 GpuProcessHost::GpuProcessKind GpuProcessHost::kind() { | 947 GpuProcessHost::GpuProcessKind GpuProcessHost::kind() { |
952 return kind_; | 948 return kind_; |
953 } | 949 } |
954 | 950 |
955 void GpuProcessHost::ForceShutdown() { | 951 void GpuProcessHost::ForceShutdown() { |
956 // This is only called on the IO thread so no race against the constructor | 952 // This is only called on the IO thread so no race against the constructor |
(...skipping 233 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1190 TRACE_EVENT0("gpu", "GpuProcessHost::OnCacheShader"); | 1186 TRACE_EVENT0("gpu", "GpuProcessHost::OnCacheShader"); |
1191 ClientIdToShaderCacheMap::iterator iter = | 1187 ClientIdToShaderCacheMap::iterator iter = |
1192 client_id_to_shader_cache_.find(client_id); | 1188 client_id_to_shader_cache_.find(client_id); |
1193 // If the cache doesn't exist then this is an off the record profile. | 1189 // If the cache doesn't exist then this is an off the record profile. |
1194 if (iter == client_id_to_shader_cache_.end()) | 1190 if (iter == client_id_to_shader_cache_.end()) |
1195 return; | 1191 return; |
1196 iter->second->Cache(GetShaderPrefixKey() + ":" + key, shader); | 1192 iter->second->Cache(GetShaderPrefixKey() + ":" + key, shader); |
1197 } | 1193 } |
1198 | 1194 |
1199 } // namespace content | 1195 } // namespace content |
OLD | NEW |