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

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

Powered by Google App Engine
This is Rietveld 408576698