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

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

Issue 2644733005: Copy GPU workaround flags from browser to GPU process (Closed)
Patch Set: fix merge error 2 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 40 matching lines...) Expand 10 before | Expand all | Expand 10 after
51 #include "content/public/common/content_client.h" 51 #include "content/public/common/content_client.h"
52 #include "content/public/common/content_switches.h" 52 #include "content/public/common/content_switches.h"
53 #include "content/public/common/mojo_channel_switches.h" 53 #include "content/public/common/mojo_channel_switches.h"
54 #include "content/public/common/result_codes.h" 54 #include "content/public/common/result_codes.h"
55 #include "content/public/common/sandbox_type.h" 55 #include "content/public/common/sandbox_type.h"
56 #include "content/public/common/sandboxed_process_launcher_delegate.h" 56 #include "content/public/common/sandboxed_process_launcher_delegate.h"
57 #include "content/public/common/service_manager_connection.h" 57 #include "content/public/common/service_manager_connection.h"
58 #include "content/public/common/service_names.mojom.h" 58 #include "content/public/common/service_names.mojom.h"
59 #include "gpu/command_buffer/service/gpu_preferences.h" 59 #include "gpu/command_buffer/service/gpu_preferences.h"
60 #include "gpu/command_buffer/service/gpu_switches.h" 60 #include "gpu/command_buffer/service/gpu_switches.h"
61 #include "gpu/config/gpu_driver_bug_list.h"
61 #include "gpu/ipc/host/shader_disk_cache.h" 62 #include "gpu/ipc/host/shader_disk_cache.h"
62 #include "gpu/ipc/service/switches.h" 63 #include "gpu/ipc/service/switches.h"
63 #include "ipc/ipc_channel_handle.h" 64 #include "ipc/ipc_channel_handle.h"
64 #include "ipc/message_filter.h" 65 #include "ipc/message_filter.h"
65 #include "media/base/media_switches.h" 66 #include "media/base/media_switches.h"
66 #include "media/media_features.h" 67 #include "media/media_features.h"
67 #include "mojo/edk/embedder/embedder.h" 68 #include "mojo/edk/embedder/embedder.h"
68 #include "services/service_manager/public/cpp/connection.h" 69 #include "services/service_manager/public/cpp/connection.h"
69 #include "services/service_manager/public/cpp/interface_provider.h" 70 #include "services/service_manager/public/cpp/interface_provider.h"
70 #include "services/service_manager/runner/common/client_util.h" 71 #include "services/service_manager/runner/common/client_util.h"
(...skipping 943 matching lines...) Expand 10 before | Expand all | Expand 10 after
1014 // TODO(penghuang): Replace all GPU related switches with GpuPreferences. 1015 // TODO(penghuang): Replace all GPU related switches with GpuPreferences.
1015 // https://crbug.com/590825 1016 // https://crbug.com/590825
1016 // If you want a browser command-line switch passed to the GPU process 1017 // If you want a browser command-line switch passed to the GPU process
1017 // you need to add it to |kSwitchNames| at the beginning of this file. 1018 // you need to add it to |kSwitchNames| at the beginning of this file.
1018 cmd_line->CopySwitchesFrom(browser_command_line, kSwitchNames, 1019 cmd_line->CopySwitchesFrom(browser_command_line, kSwitchNames,
1019 arraysize(kSwitchNames)); 1020 arraysize(kSwitchNames));
1020 cmd_line->CopySwitchesFrom( 1021 cmd_line->CopySwitchesFrom(
1021 browser_command_line, switches::kGLSwitchesCopiedFromGpuProcessHost, 1022 browser_command_line, switches::kGLSwitchesCopiedFromGpuProcessHost,
1022 switches::kGLSwitchesCopiedFromGpuProcessHostNumSwitches); 1023 switches::kGLSwitchesCopiedFromGpuProcessHostNumSwitches);
1023 1024
1025 std::vector<const char*> gpu_workarounds;
1026 gpu::GpuDriverBugList::AppendAllWorkarounds(&gpu_workarounds);
1027 cmd_line->CopySwitchesFrom(browser_command_line, gpu_workarounds.data(),
1028 gpu_workarounds.size());
1029
1024 GetContentClient()->browser()->AppendExtraCommandLineSwitches( 1030 GetContentClient()->browser()->AppendExtraCommandLineSwitches(
1025 cmd_line.get(), process_->GetData().id); 1031 cmd_line.get(), process_->GetData().id);
1026 1032
1027 GpuDataManagerImpl::GetInstance()->AppendGpuCommandLine(cmd_line.get(), 1033 GpuDataManagerImpl::GetInstance()->AppendGpuCommandLine(cmd_line.get(),
1028 gpu_preferences); 1034 gpu_preferences);
1029 if (cmd_line->HasSwitch(switches::kUseGL)) { 1035 if (cmd_line->HasSwitch(switches::kUseGL)) {
1030 swiftshader_rendering_ = (cmd_line->GetSwitchValueASCII(switches::kUseGL) == 1036 swiftshader_rendering_ = (cmd_line->GetSwitchValueASCII(switches::kUseGL) ==
1031 gl::kGLImplementationSwiftShaderForWebGLName); 1037 gl::kGLImplementationSwiftShaderForWebGLName);
1032 } 1038 }
1033 1039
(...skipping 151 matching lines...) Expand 10 before | Expand all | Expand 10 after
1185 GetShaderCacheFactorySingleton()->Get(client_id); 1191 GetShaderCacheFactorySingleton()->Get(client_id);
1186 if (!cache.get()) 1192 if (!cache.get())
1187 return; 1193 return;
1188 1194
1189 cache->set_shader_loaded_callback(base::Bind(&HostLoadedShader, host_id_)); 1195 cache->set_shader_loaded_callback(base::Bind(&HostLoadedShader, host_id_));
1190 1196
1191 client_id_to_shader_cache_[client_id] = cache; 1197 client_id_to_shader_cache_[client_id] = cache;
1192 } 1198 }
1193 1199
1194 } // namespace content 1200 } // 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