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

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

Issue 780433006: Add framebuffer object related commands to command buffer. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@tex
Patch Set: Created 6 years 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
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/containers/hash_tables.h" 10 #include "base/containers/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/config/gpu_driver_bug_workaround_type.h" 15 #include "gpu/config/gpu_driver_bug_workaround_type.h"
16 #include "gpu/gpu_export.h" 16 #include "gpu/gpu_export.h"
17 #include "ui/gl/gl_version_info.h"
17 18
18 namespace base { 19 namespace base {
19 class CommandLine; 20 class CommandLine;
20 } 21 }
21 22
22 namespace gpu { 23 namespace gpu {
23 namespace gles2 { 24 namespace gles2 {
24 25
25 // FeatureInfo records the features that are available for a ContextGroup. 26 // FeatureInfo records the features that are available for a ContextGroup.
26 class GPU_EXPORT FeatureInfo : public base::RefCounted<FeatureInfo> { 27 class GPU_EXPORT FeatureInfo : public base::RefCounted<FeatureInfo> {
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after
59 bool enable_shader_name_hashing; 60 bool enable_shader_name_hashing;
60 bool enable_samplers; 61 bool enable_samplers;
61 bool ext_draw_buffers; 62 bool ext_draw_buffers;
62 bool nv_draw_buffers; 63 bool nv_draw_buffers;
63 bool ext_frag_depth; 64 bool ext_frag_depth;
64 bool ext_shader_texture_lod; 65 bool ext_shader_texture_lod;
65 bool use_async_readpixels; 66 bool use_async_readpixels;
66 bool map_buffer_range; 67 bool map_buffer_range;
67 bool ext_discard_framebuffer; 68 bool ext_discard_framebuffer;
68 bool angle_depth_texture; 69 bool angle_depth_texture;
69 bool is_angle;
70 bool is_swiftshader; 70 bool is_swiftshader;
71 bool angle_texture_usage; 71 bool angle_texture_usage;
72 bool ext_texture_storage; 72 bool ext_texture_storage;
73 bool chromium_path_rendering; 73 bool chromium_path_rendering;
74 bool blend_equation_advanced; 74 bool blend_equation_advanced;
75 bool blend_equation_advanced_coherent; 75 bool blend_equation_advanced_coherent;
76 bool ext_texture_rg; 76 bool ext_texture_rg;
77 bool enable_subscribe_uniform; 77 bool enable_subscribe_uniform;
78 }; 78 };
79 79
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after
115 } 115 }
116 116
117 const FeatureFlags& feature_flags() const { 117 const FeatureFlags& feature_flags() const {
118 return feature_flags_; 118 return feature_flags_;
119 } 119 }
120 120
121 const Workarounds& workarounds() const { 121 const Workarounds& workarounds() const {
122 return workarounds_; 122 return workarounds_;
123 } 123 }
124 124
125 const gfx::GLVersionInfo& gl_version_info() const {
126 CHECK(gl_version_info_.get());
piman 2014/12/05 22:44:09 drive-by: no CHECK please. use DCHECK.
127 return *(gl_version_info_.get());
128 }
129
125 private: 130 private:
126 friend class base::RefCounted<FeatureInfo>; 131 friend class base::RefCounted<FeatureInfo>;
127 friend class BufferManagerClientSideArraysTest; 132 friend class BufferManagerClientSideArraysTest;
128 133
129 typedef base::hash_map<GLenum, ValueValidator<GLenum> > ValidatorMap; 134 typedef base::hash_map<GLenum, ValueValidator<GLenum> > ValidatorMap;
130 ValidatorMap texture_format_validators_; 135 ValidatorMap texture_format_validators_;
131 136
132 ~FeatureInfo(); 137 ~FeatureInfo();
133 138
134 void AddExtensionString(const char* s); 139 void AddExtensionString(const char* s);
135 void InitializeBasicState(const base::CommandLine& command_line); 140 void InitializeBasicState(const base::CommandLine& command_line);
136 void InitializeFeatures(); 141 void InitializeFeatures();
137 142
138 Validators validators_; 143 Validators validators_;
139 144
140 DisallowedFeatures disallowed_features_; 145 DisallowedFeatures disallowed_features_;
141 146
142 // The extensions string returned by glGetString(GL_EXTENSIONS); 147 // The extensions string returned by glGetString(GL_EXTENSIONS);
143 std::string extensions_; 148 std::string extensions_;
144 149
145 // Flags for some features 150 // Flags for some features
146 FeatureFlags feature_flags_; 151 FeatureFlags feature_flags_;
147 152
148 // Flags for Workarounds. 153 // Flags for Workarounds.
149 Workarounds workarounds_; 154 Workarounds workarounds_;
150 155
156 scoped_ptr<gfx::GLVersionInfo> gl_version_info_;
157
151 DISALLOW_COPY_AND_ASSIGN(FeatureInfo); 158 DISALLOW_COPY_AND_ASSIGN(FeatureInfo);
152 }; 159 };
153 160
154 } // namespace gles2 161 } // namespace gles2
155 } // namespace gpu 162 } // namespace gpu
156 163
157 #endif // GPU_COMMAND_BUFFER_SERVICE_FEATURE_INFO_H_ 164 #endif // GPU_COMMAND_BUFFER_SERVICE_FEATURE_INFO_H_
OLDNEW
« no previous file with comments | « gpu/command_buffer/common/gles2_cmd_ids_autogen.h ('k') | gpu/command_buffer/service/feature_info.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698