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

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

Issue 13400003: Use macro to simplify gpu driver bug workaround defs and code. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Created 7 years, 8 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 | Annotate | Revision Log
« no previous file with comments | « content/browser/gpu/gpu_driver_bug_list.cc ('k') | gpu/command_buffer/service/feature_info.cc » ('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 #ifndef GPU_COMMAND_BUFFER_SERVICE_FEATURE_INFO_H_ 5 #ifndef GPU_COMMAND_BUFFER_SERVICE_FEATURE_INFO_H_
6 #define GPU_COMMAND_BUFFER_SERVICE_FEATURE_INFO_H_ 6 #define GPU_COMMAND_BUFFER_SERVICE_FEATURE_INFO_H_
7 7
8 #include <set> 8 #include <set>
9 #include <string> 9 #include <string>
10 #include "base/hash_tables.h" 10 #include "base/hash_tables.h"
11 #include "base/memory/ref_counted.h" 11 #include "base/memory/ref_counted.h"
12 #include "base/sys_info.h" 12 #include "base/sys_info.h"
13 #include "gpu/command_buffer/service/gles2_cmd_decoder.h" 13 #include "gpu/command_buffer/service/gles2_cmd_decoder.h"
14 #include "gpu/command_buffer/service/gles2_cmd_validation.h" 14 #include "gpu/command_buffer/service/gles2_cmd_validation.h"
15 #include "gpu/command_buffer/service/gpu_driver_bug_workaround_type.h"
15 #include "gpu/gpu_export.h" 16 #include "gpu/gpu_export.h"
16 17
17 class CommandLine; 18 class CommandLine;
18 19
19 namespace gpu { 20 namespace gpu {
20 namespace gles2 { 21 namespace gles2 {
21 22
22 // FeatureInfo records the features that are available for a ContextGroup. 23 // FeatureInfo records the features that are available for a ContextGroup.
23 class GPU_EXPORT FeatureInfo : public base::RefCounted<FeatureInfo> { 24 class GPU_EXPORT FeatureInfo : public base::RefCounted<FeatureInfo> {
24 public: 25 public:
(...skipping 16 matching lines...) Expand all
41 bool use_arb_occlusion_query_for_occlusion_query_boolean; 42 bool use_arb_occlusion_query_for_occlusion_query_boolean;
42 bool native_vertex_array_object; 43 bool native_vertex_array_object;
43 bool enable_shader_name_hashing; 44 bool enable_shader_name_hashing;
44 bool enable_samplers; 45 bool enable_samplers;
45 bool ext_draw_buffers; 46 bool ext_draw_buffers;
46 }; 47 };
47 48
48 struct Workarounds { 49 struct Workarounds {
49 Workarounds(); 50 Workarounds();
50 51
51 bool clear_alpha_in_readpixels; 52 #define GPU_OP(type, name) bool name;
52 bool clear_uniforms_before_program_use; 53 GPU_DRIVER_BUG_WORKAROUNDS(GPU_OP)
53 bool delete_instead_of_resize_fbo; 54 #undef GPU_OP
54 bool disable_angle_framebuffer_multisample;
55 bool disable_depth_texture;
56 bool disable_ext_occlusion_query;
57 bool enable_chromium_fast_npot_mo8_textures;
58 bool exit_on_context_lost;
59 bool flush_on_context_switch;
60 bool needs_glsl_built_in_function_emulation;
61 bool needs_offscreen_buffer_workaround;
62 bool restore_scissor_on_fbo_change;
63 bool reverse_point_sprite_coord_origin;
64 bool set_texture_filter_before_generating_mipmap;
65 bool use_client_side_arrays_for_stream_buffers;
66 bool use_current_program_after_successful_link;
67 55
68 // Note: 0 here means use driver limit. 56 // Note: 0 here means use driver limit.
69 GLint max_texture_size; 57 GLint max_texture_size;
70 GLint max_cube_map_texture_size; 58 GLint max_cube_map_texture_size;
71 }; 59 };
72 60
73 FeatureInfo(); 61 FeatureInfo();
74 62
75 // If allowed features = NULL or "*", all features are allowed. Otherwise 63 // If allowed features = NULL or "*", all features are allowed. Otherwise
76 // only features that match the strings in allowed_features are allowed. 64 // only features that match the strings in allowed_features are allowed.
(...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after
126 // Flags for Workarounds. 114 // Flags for Workarounds.
127 Workarounds workarounds_; 115 Workarounds workarounds_;
128 116
129 DISALLOW_COPY_AND_ASSIGN(FeatureInfo); 117 DISALLOW_COPY_AND_ASSIGN(FeatureInfo);
130 }; 118 };
131 119
132 } // namespace gles2 120 } // namespace gles2
133 } // namespace gpu 121 } // namespace gpu
134 122
135 #endif // GPU_COMMAND_BUFFER_SERVICE_FEATURE_INFO_H_ 123 #endif // GPU_COMMAND_BUFFER_SERVICE_FEATURE_INFO_H_
OLDNEW
« no previous file with comments | « content/browser/gpu/gpu_driver_bug_list.cc ('k') | gpu/command_buffer/service/feature_info.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698