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

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

Issue 2159183002: Attaching an image to many color attachment points is unsupported (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: remove webgl2 condition Created 4 years, 5 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
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 #include "gpu/command_buffer/service/feature_info.h" 5 #include "gpu/command_buffer/service/feature_info.h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 8
9 #include <set> 9 #include <set>
10 #include <vector> 10 #include <vector>
(...skipping 193 matching lines...) Expand 10 before | Expand all | Expand 10 after
204 204
205 bool FeatureInfo::InitializeForTesting( 205 bool FeatureInfo::InitializeForTesting(
206 const DisallowedFeatures& disallowed_features) { 206 const DisallowedFeatures& disallowed_features) {
207 return Initialize(CONTEXT_TYPE_OPENGLES2, disallowed_features); 207 return Initialize(CONTEXT_TYPE_OPENGLES2, disallowed_features);
208 } 208 }
209 209
210 bool FeatureInfo::InitializeForTesting() { 210 bool FeatureInfo::InitializeForTesting() {
211 return Initialize(CONTEXT_TYPE_OPENGLES2, DisallowedFeatures()); 211 return Initialize(CONTEXT_TYPE_OPENGLES2, DisallowedFeatures());
212 } 212 }
213 213
214 bool FeatureInfo::InitializeForTesting(ContextType context_type) {
215 return Initialize(context_type, DisallowedFeatures());
216 }
217
214 bool IsGL_REDSupportedOnFBOs() { 218 bool IsGL_REDSupportedOnFBOs() {
215 // Skia uses GL_RED with frame buffers, unfortunately, Mesa claims to support 219 // Skia uses GL_RED with frame buffers, unfortunately, Mesa claims to support
216 // GL_EXT_texture_rg, but it doesn't support it on frame buffers. To fix 220 // GL_EXT_texture_rg, but it doesn't support it on frame buffers. To fix
217 // this, we try it, and if it fails, we don't expose GL_EXT_texture_rg. 221 // this, we try it, and if it fails, we don't expose GL_EXT_texture_rg.
218 GLint fb_binding = 0; 222 GLint fb_binding = 0;
219 GLint tex_binding = 0; 223 GLint tex_binding = 0;
220 glGetIntegerv(GL_FRAMEBUFFER_BINDING, &fb_binding); 224 glGetIntegerv(GL_FRAMEBUFFER_BINDING, &fb_binding);
221 glGetIntegerv(GL_TEXTURE_BINDING_2D, &tex_binding); 225 glGetIntegerv(GL_TEXTURE_BINDING_2D, &tex_binding);
222 226
223 GLuint textureId = 0; 227 GLuint textureId = 0;
(...skipping 1208 matching lines...) Expand 10 before | Expand all | Expand 10 after
1432 if (pos == std::string::npos) { 1436 if (pos == std::string::npos) {
1433 extensions_ += (extensions_.empty() ? "" : " ") + str; 1437 extensions_ += (extensions_.empty() ? "" : " ") + str;
1434 } 1438 }
1435 } 1439 }
1436 1440
1437 FeatureInfo::~FeatureInfo() { 1441 FeatureInfo::~FeatureInfo() {
1438 } 1442 }
1439 1443
1440 } // namespace gles2 1444 } // namespace gles2
1441 } // namespace gpu 1445 } // namespace gpu
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698