| OLD | NEW |
| 1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 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/public/browser/gpu_utils.h" | 5 #include "content/public/browser/gpu_utils.h" |
| 6 | 6 |
| 7 #include "base/command_line.h" | 7 #include "base/command_line.h" |
| 8 #include "base/strings/string_number_conversions.h" | 8 #include "base/strings/string_number_conversions.h" |
| 9 #include "content/public/common/content_switches.h" | 9 #include "content/public/common/content_switches.h" |
| 10 #include "gpu/command_buffer/service/gpu_switches.h" | 10 #include "gpu/command_buffer/service/gpu_switches.h" |
| (...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 76 gpu_preferences.force_gpu_mem_available *= 1024 * 1024; | 76 gpu_preferences.force_gpu_mem_available *= 1024 * 1024; |
| 77 } | 77 } |
| 78 if (GetUintFromSwitch(command_line, switches::kGpuProgramCacheSizeKb, | 78 if (GetUintFromSwitch(command_line, switches::kGpuProgramCacheSizeKb, |
| 79 &gpu_preferences.gpu_program_cache_size)) { | 79 &gpu_preferences.gpu_program_cache_size)) { |
| 80 gpu_preferences.gpu_program_cache_size *= 1024; | 80 gpu_preferences.gpu_program_cache_size *= 1024; |
| 81 } | 81 } |
| 82 gpu_preferences.disable_gpu_shader_disk_cache = | 82 gpu_preferences.disable_gpu_shader_disk_cache = |
| 83 command_line->HasSwitch(switches::kDisableGpuShaderDiskCache); | 83 command_line->HasSwitch(switches::kDisableGpuShaderDiskCache); |
| 84 gpu_preferences.enable_share_group_async_texture_upload = | 84 gpu_preferences.enable_share_group_async_texture_upload = |
| 85 command_line->HasSwitch(switches::kEnableShareGroupAsyncTextureUpload); | 85 command_line->HasSwitch(switches::kEnableShareGroupAsyncTextureUpload); |
| 86 gpu_preferences.enable_subscribe_uniform_extension = | |
| 87 command_line->HasSwitch(switches::kEnableSubscribeUniformExtension); | |
| 88 gpu_preferences.enable_threaded_texture_mailboxes = | 86 gpu_preferences.enable_threaded_texture_mailboxes = |
| 89 command_line->HasSwitch(switches::kEnableThreadedTextureMailboxes); | 87 command_line->HasSwitch(switches::kEnableThreadedTextureMailboxes); |
| 90 gpu_preferences.gl_shader_interm_output = | 88 gpu_preferences.gl_shader_interm_output = |
| 91 command_line->HasSwitch(switches::kGLShaderIntermOutput); | 89 command_line->HasSwitch(switches::kGLShaderIntermOutput); |
| 92 gpu_preferences.emulate_shader_precision = | 90 gpu_preferences.emulate_shader_precision = |
| 93 command_line->HasSwitch(switches::kEmulateShaderPrecision); | 91 command_line->HasSwitch(switches::kEmulateShaderPrecision); |
| 94 gpu_preferences.enable_gpu_service_logging = | 92 gpu_preferences.enable_gpu_service_logging = |
| 95 command_line->HasSwitch(switches::kEnableGPUServiceLogging); | 93 command_line->HasSwitch(switches::kEnableGPUServiceLogging); |
| 96 gpu_preferences.enable_gpu_service_tracing = | 94 gpu_preferences.enable_gpu_service_tracing = |
| 97 command_line->HasSwitch(switches::kEnableGPUServiceTracing); | 95 command_line->HasSwitch(switches::kEnableGPUServiceTracing); |
| 98 gpu_preferences.enable_unsafe_es3_apis = | 96 gpu_preferences.enable_unsafe_es3_apis = |
| 99 command_line->HasSwitch(switches::kEnableUnsafeES3APIs); | 97 command_line->HasSwitch(switches::kEnableUnsafeES3APIs); |
| 100 return gpu_preferences; | 98 return gpu_preferences; |
| 101 } | 99 } |
| 102 | 100 |
| 103 } // namespace content | 101 } // namespace content |
| OLD | NEW |