Chromium Code Reviews| Index: gpu/command_buffer/service/gpu_preferences.h |
| diff --git a/gpu/command_buffer/service/gpu_preferences.h b/gpu/command_buffer/service/gpu_preferences.h |
| new file mode 100644 |
| index 0000000000000000000000000000000000000000..b0a84d17f9ffa7581af4472e7c7e75ebfe9610c3 |
| --- /dev/null |
| +++ b/gpu/command_buffer/service/gpu_preferences.h |
| @@ -0,0 +1,115 @@ |
| +// Copyright 2016 The Chromium Authors. All rights reserved. |
| +// Use of this source code is governed by a BSD-style license that can be |
| +// found in the LICENSE file. |
| + |
| +#ifndef GPU_PREFERENCES_H_ |
|
piman
2016/02/24 22:19:08
nit: GPU_COMMAND_BUFFER_SERVICE_GPU_PREFERENCES_H_
Peng
2016/02/25 16:18:35
Done.
|
| +#define GPU_PREFERENCES_H_ |
| + |
| +#include <stddef.h> |
| + |
| +#include <set> |
|
piman
2016/02/24 22:19:08
nit: This is not used.
Peng
2016/02/25 16:18:35
Done.
|
| + |
| +#include "base/macros.h" |
| +#include "build/build_config.h" |
| +#include "gpu/command_buffer/common/constants.h" |
| +#include "gpu/gpu_export.h" |
| + |
| +namespace base { class CommandLine; }; |
|
Fady Samuel
2016/02/24 20:51:54
Is this forward declaration necessary?
Peng
2016/02/25 16:18:36
Done.
|
| + |
| +namespace gpu { |
| + |
| +struct GPU_EXPORT GpuPreferences { |
| + public: |
| + GpuPreferences(); |
| + |
| + ~GpuPreferences(); |
| + |
| + // =================================== |
| + // settings from //content/public/common/content_switches.h |
| + |
| + // Runs the renderer and plugins in the same process as the browser. |
| + bool single_process = false; |
| + |
| + // Run the GPU process as a thread in the browser process. |
| + bool in_process_gpu = false; |
| + |
| + // =================================== |
| + // settings from //gpu/command_buffer/service/gpu_switches.cc |
| + |
| + // Always return success when compiling a shader. Linking will still fail. |
| + bool compile_shader_always_succeeds = false; |
| + |
| + // Disable the GL error log limit. |
| + bool disable_gl_error_limit = false; |
| + |
| + // Disable the GLSL translator. |
| + bool disable_glsl_translator = false; |
| + |
| + // Disable workarounds for various GPU driver bugs. |
| + bool disable_gpu_driver_bug_workarounds = false; |
| + |
| + // Turn off user-defined name hashing in shaders. |
| + bool disable_shader_name_hashing = false; |
| + |
| + // Turn on Logging GPU commands. |
| + bool enable_gpu_command_logging = false; |
| + |
| + // Turn on Calling GL Error after every command. |
| + bool enable_gpu_debugging = false; |
| + |
| + // Enable GPU service logging. |
| + bool enable_gpu_service_logging_gpu = false; |
| + |
| + // Turn off gpu program caching |
| + bool disable_gpu_program_cache = false; |
| + |
| + // Enforce GL minimums. |
| + bool enforce_gl_minimums = false; |
| + |
| + // Sets the total amount of memory that may be allocated for GPU resources |
| + size_t force_gpu_mem_available = 0; |
| + |
| + // Sets the maximum size of the in-memory gpu program cache, in kb |
| + size_t gpu_program_cache_size = kDefaultMaxProgramCacheMemoryBytes; |
| + |
| + // Disables the GPU shader on disk cache. |
| + bool disable_gpu_shader_disk_cache = false; |
| + |
| + // Allows async texture uploads (off main thread) via GL context sharing. |
| + bool enable_share_group_async_texture_upload = false; |
| + |
| + // Enable WebGL subscribe uniform extension. |
| + bool enable_subscribe_uniform_extension = false; |
| + |
| + // Simulates shared textures when share groups are not available. |
| + // Not available everywhere. |
| + bool enable_threaded_texture_mailboxes = false; |
| + |
| + // Include ANGLE's intermediate representation (AST) output in shader |
| + // compilation info logs. |
| + bool gl_shader_interm_output = false; |
| + |
| + // Emulate ESSL lowp and mediump float precisions by mutating the shaders to |
| + // round intermediate values in ANGLE. |
| + bool emulate_shader_precision = false; |
| + |
| + // Enables using path rendering implementation implemented currently |
| + // in NV_path_rendering OpenGL extension. Requires compatible hardware |
| + // and driver. This is used in GPU rasterization. |
| + bool enable_gl_path_rendering = false; |
| + |
| + // =================================== |
| + // settings from //ui/gl/gl_switches.h |
| + // Turns on GPU logging (debug build only). |
| + bool enable_gpu_service_logging = false; |
| + |
| + // Turns on calling TRACE for every GL call. |
| + bool enable_gpu_service_tracing = false; |
| + |
| + // Enable OpenGL ES 3 APIs without proper service side validation. |
| + bool enable_unsafe_es3_apis = false; |
| +}; |
| + |
| +} // namespace gpu |
| + |
| +#endif // GPU_PREFERENCES_H_ |