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

Side by Side Diff: gpu/command_buffer/service/gpu_preferences.h

Issue 1716813002: Use GpuPreferences to avoid directly accessing switches in gpu related code (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Update Created 4 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
OLDNEW
(Empty)
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
3 // found in the LICENSE file.
4
5 #ifndef GPU_COMMAND_BUFFER_SERVICE_GPU_PREFERENCES_H_
6 #define GPU_COMMAND_BUFFER_SERVICE_GPU_PREFERENCES_H_
7
8 #include <stddef.h>
9
10 #include "base/macros.h"
11 #include "build/build_config.h"
12 #include "gpu/command_buffer/common/constants.h"
13 #include "gpu/gpu_export.h"
14
15 namespace gpu {
16
17 struct GPU_EXPORT GpuPreferences {
18 public:
19 GpuPreferences();
20
21 ~GpuPreferences();
22
23 // ===================================
24 // Settings from //content/public/common/content_switches.h
25
26 // Runs the renderer and plugins in the same process as the browser.
27 bool single_process = false;
28
29 // Run the GPU process as a thread in the browser process.
30 bool in_process_gpu = false;
31
32 // ===================================
33 // Settings from //gpu/command_buffer/service/gpu_switches.cc
34
35 // Always return success when compiling a shader. Linking will still fail.
36 bool compile_shader_always_succeeds = false;
37
38 // Disable the GL error log limit.
39 bool disable_gl_error_limit = false;
40
41 // Disable the GLSL translator.
42 bool disable_glsl_translator = false;
43
44 // Disable workarounds for various GPU driver bugs.
45 bool disable_gpu_driver_bug_workarounds = false;
46
47 // Turn off user-defined name hashing in shaders.
48 bool disable_shader_name_hashing = false;
49
50 // Turn on Logging GPU commands.
51 bool enable_gpu_command_logging = false;
52
53 // Turn on Calling GL Error after every command.
54 bool enable_gpu_debugging = false;
55
56 // Enable GPU service logging.
57 bool enable_gpu_service_logging_gpu = false;
58
59 // Turn off gpu program caching
60 bool disable_gpu_program_cache = false;
61
62 // Enforce GL minimums.
63 bool enforce_gl_minimums = false;
64
65 // Sets the total amount of memory that may be allocated for GPU resources
66 size_t force_gpu_mem_available = 0;
67
68 // Sets the maximum size of the in-memory gpu program cache, in kb
69 size_t gpu_program_cache_size = kDefaultMaxProgramCacheMemoryBytes;
70
71 // Disables the GPU shader on disk cache.
72 bool disable_gpu_shader_disk_cache = false;
73
74 // Allows async texture uploads (off main thread) via GL context sharing.
75 bool enable_share_group_async_texture_upload = false;
76
77 // Enable WebGL subscribe uniform extension.
78 bool enable_subscribe_uniform_extension = false;
79
80 // Simulates shared textures when share groups are not available.
81 // Not available everywhere.
82 bool enable_threaded_texture_mailboxes = false;
83
84 // Include ANGLE's intermediate representation (AST) output in shader
85 // compilation info logs.
86 bool gl_shader_interm_output = false;
87
88 // Emulate ESSL lowp and mediump float precisions by mutating the shaders to
89 // round intermediate values in ANGLE.
90 bool emulate_shader_precision = false;
91
92 // Enables using path rendering implementation implemented currently
93 // in NV_path_rendering OpenGL extension. Requires compatible hardware
94 // and driver. This is used in GPU rasterization.
95 bool enable_gl_path_rendering = false;
96
97 // ===================================
98 // Settings from //ui/gl/gl_switches.h
99
100 // Turns on GPU logging (debug build only).
101 bool enable_gpu_service_logging = false;
102
103 // Turns on calling TRACE for every GL call.
104 bool enable_gpu_service_tracing = false;
105
106 // Enable OpenGL ES 3 APIs without proper service side validation.
107 bool enable_unsafe_es3_apis = false;
108 };
109
110 } // namespace gpu
111
112 #endif // GPU_COMMAND_BUFFER_SERVICE_GPU_PREFERENCES_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698