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 1014 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1025 (cmd_line->GetSwitchValueASCII(switches::kUseGL) == "swiftshader"); | 1025 (cmd_line->GetSwitchValueASCII(switches::kUseGL) == "swiftshader"); |
1026 } | 1026 } |
1027 | 1027 |
1028 bool current_gpu_type_enabled = | 1028 bool current_gpu_type_enabled = |
1029 swiftshader_rendering_ ? gpu_enabled_ : hardware_gpu_enabled_; | 1029 swiftshader_rendering_ ? gpu_enabled_ : hardware_gpu_enabled_; |
1030 if (!current_gpu_type_enabled) { | 1030 if (!current_gpu_type_enabled) { |
1031 SendOutstandingReplies(); | 1031 SendOutstandingReplies(); |
1032 return false; | 1032 return false; |
1033 } | 1033 } |
1034 | 1034 |
1035 UMA_HISTOGRAM_BOOLEAN("GPU.GPU.GPUProcessSoftwareRendering", | 1035 UMA_HISTOGRAM_BOOLEAN("GPU.GPUProcessSoftwareRendering", |
1036 swiftshader_rendering_); | 1036 swiftshader_rendering_); |
1037 | 1037 |
1038 // If specified, prepend a launcher program to the command line. | 1038 // If specified, prepend a launcher program to the command line. |
1039 if (!gpu_launcher.empty()) | 1039 if (!gpu_launcher.empty()) |
1040 cmd_line->PrependWrapper(gpu_launcher); | 1040 cmd_line->PrependWrapper(gpu_launcher); |
1041 | 1041 |
1042 process_->Launch( | 1042 process_->Launch( |
1043 new GpuSandboxedProcessLauncherDelegate(cmd_line, | 1043 new GpuSandboxedProcessLauncherDelegate(cmd_line, |
1044 process_->GetHost()), | 1044 process_->GetHost()), |
1045 cmd_line, | 1045 cmd_line, |
(...skipping 143 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1189 TRACE_EVENT0("gpu", "GpuProcessHost::OnCacheShader"); | 1189 TRACE_EVENT0("gpu", "GpuProcessHost::OnCacheShader"); |
1190 ClientIdToShaderCacheMap::iterator iter = | 1190 ClientIdToShaderCacheMap::iterator iter = |
1191 client_id_to_shader_cache_.find(client_id); | 1191 client_id_to_shader_cache_.find(client_id); |
1192 // If the cache doesn't exist then this is an off the record profile. | 1192 // If the cache doesn't exist then this is an off the record profile. |
1193 if (iter == client_id_to_shader_cache_.end()) | 1193 if (iter == client_id_to_shader_cache_.end()) |
1194 return; | 1194 return; |
1195 iter->second->Cache(GetShaderPrefixKey() + ":" + key, shader); | 1195 iter->second->Cache(GetShaderPrefixKey() + ":" + key, shader); |
1196 } | 1196 } |
1197 | 1197 |
1198 } // namespace content | 1198 } // namespace content |
OLD | NEW |