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

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

Issue 2479513002: Reland of Extend CopyTextureCHROMIUM to more ES 3.0 texture formats. (Closed)
Patch Set: rebase and minor fix for premultiply and un-premultiply alpha Created 4 years, 1 month 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 <memory> 8 #include <memory>
9 #include <string> 9 #include <string>
10 10
(...skipping 151 matching lines...) Expand 10 before | Expand all | Expand 10 after
162 void EnableOESTextureHalfFloatLinear(); 162 void EnableOESTextureHalfFloatLinear();
163 163
164 bool ext_color_buffer_float_available() const { 164 bool ext_color_buffer_float_available() const {
165 return ext_color_buffer_float_available_; 165 return ext_color_buffer_float_available_;
166 } 166 }
167 167
168 bool oes_texture_float_linear_available() const { 168 bool oes_texture_float_linear_available() const {
169 return oes_texture_float_linear_available_; 169 return oes_texture_float_linear_available_;
170 } 170 }
171 171
172 bool texture_format_bgra8888_available() const {
173 return texture_format_bgra8888_available_;
174 }
175
176 bool ext_srgb_available() const { return ext_srgb_available_; }
177
172 private: 178 private:
173 friend class base::RefCounted<FeatureInfo>; 179 friend class base::RefCounted<FeatureInfo>;
174 friend class BufferManagerClientSideArraysTest; 180 friend class BufferManagerClientSideArraysTest;
175 181
176 ~FeatureInfo(); 182 ~FeatureInfo();
177 183
178 void AddExtensionString(const char* s); 184 void AddExtensionString(const char* s);
179 void InitializeBasicState(const base::CommandLine* command_line); 185 void InitializeBasicState(const base::CommandLine* command_line);
180 void InitializeFeatures(); 186 void InitializeFeatures();
181 187
182 Validators validators_; 188 Validators validators_;
183 189
184 DisallowedFeatures disallowed_features_; 190 DisallowedFeatures disallowed_features_;
185 191
186 ContextType context_type_; 192 ContextType context_type_;
187 193
188 // The extensions string returned by glGetString(GL_EXTENSIONS); 194 // The extensions string returned by glGetString(GL_EXTENSIONS);
189 std::string extensions_; 195 std::string extensions_;
190 196
191 // Flags for some features 197 // Flags for some features
192 FeatureFlags feature_flags_; 198 FeatureFlags feature_flags_;
193 199
194 // Flags for Workarounds. 200 // Flags for Workarounds.
195 const GpuDriverBugWorkarounds workarounds_; 201 const GpuDriverBugWorkarounds workarounds_;
196 202
197 bool ext_color_buffer_float_available_; 203 bool ext_color_buffer_float_available_;
198 bool oes_texture_float_linear_available_; 204 bool oes_texture_float_linear_available_;
199 bool oes_texture_half_float_linear_available_; 205 bool oes_texture_half_float_linear_available_;
206 bool texture_format_bgra8888_available_;
Zhenyao Mo 2016/11/19 00:42:32 This is the wrong place for these two flags. The
qiankun 2016/11/21 16:01:50 Yes. Thanks for pointing this. Follow your suggest
207 bool ext_srgb_available_;
200 208
201 bool disable_shader_translator_; 209 bool disable_shader_translator_;
202 std::unique_ptr<gl::GLVersionInfo> gl_version_info_; 210 std::unique_ptr<gl::GLVersionInfo> gl_version_info_;
203 211
204 DISALLOW_COPY_AND_ASSIGN(FeatureInfo); 212 DISALLOW_COPY_AND_ASSIGN(FeatureInfo);
205 }; 213 };
206 214
207 } // namespace gles2 215 } // namespace gles2
208 } // namespace gpu 216 } // namespace gpu
209 217
210 #endif // GPU_COMMAND_BUFFER_SERVICE_FEATURE_INFO_H_ 218 #endif // GPU_COMMAND_BUFFER_SERVICE_FEATURE_INFO_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698