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

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

Issue 2666353002: Revert of Copy GPU workaround flags from browser to GPU process (Closed)
Patch Set: Created 3 years, 10 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
« no previous file with comments | « no previous file | content/test/gpu/gpu_tests/gpu_process_integration_test.py » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 <stddef.h> 7 #include <stddef.h>
8 8
9 #include <algorithm> 9 #include <algorithm>
10 #include <list> 10 #include <list>
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after
50 #include "content/public/common/content_client.h" 50 #include "content/public/common/content_client.h"
51 #include "content/public/common/content_switches.h" 51 #include "content/public/common/content_switches.h"
52 #include "content/public/common/mojo_channel_switches.h" 52 #include "content/public/common/mojo_channel_switches.h"
53 #include "content/public/common/result_codes.h" 53 #include "content/public/common/result_codes.h"
54 #include "content/public/common/sandbox_type.h" 54 #include "content/public/common/sandbox_type.h"
55 #include "content/public/common/sandboxed_process_launcher_delegate.h" 55 #include "content/public/common/sandboxed_process_launcher_delegate.h"
56 #include "content/public/common/service_manager_connection.h" 56 #include "content/public/common/service_manager_connection.h"
57 #include "content/public/common/service_names.mojom.h" 57 #include "content/public/common/service_names.mojom.h"
58 #include "gpu/command_buffer/service/gpu_preferences.h" 58 #include "gpu/command_buffer/service/gpu_preferences.h"
59 #include "gpu/command_buffer/service/gpu_switches.h" 59 #include "gpu/command_buffer/service/gpu_switches.h"
60 #include "gpu/config/gpu_driver_bug_list.h"
61 #include "gpu/ipc/host/shader_disk_cache.h" 60 #include "gpu/ipc/host/shader_disk_cache.h"
62 #include "gpu/ipc/service/switches.h" 61 #include "gpu/ipc/service/switches.h"
63 #include "ipc/ipc_channel_handle.h" 62 #include "ipc/ipc_channel_handle.h"
64 #include "ipc/message_filter.h" 63 #include "ipc/message_filter.h"
65 #include "media/base/media_switches.h" 64 #include "media/base/media_switches.h"
66 #include "media/media_features.h" 65 #include "media/media_features.h"
67 #include "mojo/edk/embedder/embedder.h" 66 #include "mojo/edk/embedder/embedder.h"
68 #include "services/service_manager/public/cpp/connection.h" 67 #include "services/service_manager/public/cpp/connection.h"
69 #include "services/service_manager/public/cpp/interface_provider.h" 68 #include "services/service_manager/public/cpp/interface_provider.h"
70 #include "services/service_manager/runner/common/client_util.h" 69 #include "services/service_manager/runner/common/client_util.h"
(...skipping 979 matching lines...) Expand 10 before | Expand all | Expand 10 after
1050 // TODO(penghuang): Replace all GPU related switches with GpuPreferences. 1049 // TODO(penghuang): Replace all GPU related switches with GpuPreferences.
1051 // https://crbug.com/590825 1050 // https://crbug.com/590825
1052 // If you want a browser command-line switch passed to the GPU process 1051 // If you want a browser command-line switch passed to the GPU process
1053 // you need to add it to |kSwitchNames| at the beginning of this file. 1052 // you need to add it to |kSwitchNames| at the beginning of this file.
1054 cmd_line->CopySwitchesFrom(browser_command_line, kSwitchNames, 1053 cmd_line->CopySwitchesFrom(browser_command_line, kSwitchNames,
1055 arraysize(kSwitchNames)); 1054 arraysize(kSwitchNames));
1056 cmd_line->CopySwitchesFrom( 1055 cmd_line->CopySwitchesFrom(
1057 browser_command_line, switches::kGLSwitchesCopiedFromGpuProcessHost, 1056 browser_command_line, switches::kGLSwitchesCopiedFromGpuProcessHost,
1058 switches::kGLSwitchesCopiedFromGpuProcessHostNumSwitches); 1057 switches::kGLSwitchesCopiedFromGpuProcessHostNumSwitches);
1059 1058
1060 std::vector<const char*> gpu_workarounds;
1061 gpu::GpuDriverBugList::AppendAllWorkarounds(&gpu_workarounds);
1062 cmd_line->CopySwitchesFrom(browser_command_line,
1063 gpu_workarounds.data(), gpu_workarounds.size());
1064
1065 GetContentClient()->browser()->AppendExtraCommandLineSwitches( 1059 GetContentClient()->browser()->AppendExtraCommandLineSwitches(
1066 cmd_line.get(), process_->GetData().id); 1060 cmd_line.get(), process_->GetData().id);
1067 1061
1068 GpuDataManagerImpl::GetInstance()->AppendGpuCommandLine(cmd_line.get(), 1062 GpuDataManagerImpl::GetInstance()->AppendGpuCommandLine(cmd_line.get(),
1069 gpu_preferences); 1063 gpu_preferences);
1070 if (cmd_line->HasSwitch(switches::kUseGL)) { 1064 if (cmd_line->HasSwitch(switches::kUseGL)) {
1071 swiftshader_rendering_ = 1065 swiftshader_rendering_ =
1072 (cmd_line->GetSwitchValueASCII(switches::kUseGL) == "swiftshader"); 1066 (cmd_line->GetSwitchValueASCII(switches::kUseGL) == "swiftshader");
1073 } 1067 }
1074 1068
(...skipping 167 matching lines...) Expand 10 before | Expand all | Expand 10 after
1242 TRACE_EVENT0("gpu", "GpuProcessHost::OnCacheShader"); 1236 TRACE_EVENT0("gpu", "GpuProcessHost::OnCacheShader");
1243 ClientIdToShaderCacheMap::iterator iter = 1237 ClientIdToShaderCacheMap::iterator iter =
1244 client_id_to_shader_cache_.find(client_id); 1238 client_id_to_shader_cache_.find(client_id);
1245 // If the cache doesn't exist then this is an off the record profile. 1239 // If the cache doesn't exist then this is an off the record profile.
1246 if (iter == client_id_to_shader_cache_.end()) 1240 if (iter == client_id_to_shader_cache_.end())
1247 return; 1241 return;
1248 iter->second->Cache(GetShaderPrefixKey(shader) + ":" + key, shader); 1242 iter->second->Cache(GetShaderPrefixKey(shader) + ":" + key, shader);
1249 } 1243 }
1250 1244
1251 } // namespace content 1245 } // namespace content
OLDNEW
« no previous file with comments | « no previous file | content/test/gpu/gpu_tests/gpu_process_integration_test.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698