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

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

Issue 1143393007: Teach GPU command buffer whether a context is webgl. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 6 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 <set> 7 #include <set>
8 8
9 #include "base/command_line.h" 9 #include "base/command_line.h"
10 #include "base/macros.h" 10 #include "base/macros.h"
(...skipping 505 matching lines...) Expand 10 before | Expand all | Expand 10 after
516 validators_.render_buffer_format.AddValue(GL_BGRA8_EXT); 516 validators_.render_buffer_format.AddValue(GL_BGRA8_EXT);
517 } 517 }
518 518
519 if (extensions.Contains("GL_OES_rgb8_rgba8") || gfx::HasDesktopGLFeatures()) { 519 if (extensions.Contains("GL_OES_rgb8_rgba8") || gfx::HasDesktopGLFeatures()) {
520 AddExtensionString("GL_OES_rgb8_rgba8"); 520 AddExtensionString("GL_OES_rgb8_rgba8");
521 validators_.render_buffer_format.AddValue(GL_RGB8_OES); 521 validators_.render_buffer_format.AddValue(GL_RGB8_OES);
522 validators_.render_buffer_format.AddValue(GL_RGBA8_OES); 522 validators_.render_buffer_format.AddValue(GL_RGBA8_OES);
523 } 523 }
524 524
525 // Check if we should allow GL_OES_texture_npot 525 // Check if we should allow GL_OES_texture_npot
526 if (gl_version_info_->is_es3 || 526 if (!disallowed_features_.npot_support &&
527 gl_version_info_->is_desktop_core_profile || 527 (gl_version_info_->is_es3 ||
528 extensions.Contains("GL_ARB_texture_non_power_of_two") || 528 gl_version_info_->is_desktop_core_profile ||
529 extensions.Contains("GL_OES_texture_npot")) { 529 extensions.Contains("GL_ARB_texture_non_power_of_two") ||
530 extensions.Contains("GL_OES_texture_npot"))) {
530 AddExtensionString("GL_OES_texture_npot"); 531 AddExtensionString("GL_OES_texture_npot");
531 feature_flags_.npot_ok = true; 532 feature_flags_.npot_ok = true;
532 } 533 }
533 534
534 // Check if we should allow GL_OES_texture_float, GL_OES_texture_half_float, 535 // Check if we should allow GL_OES_texture_float, GL_OES_texture_half_float,
535 // GL_OES_texture_float_linear, GL_OES_texture_half_float_linear 536 // GL_OES_texture_float_linear, GL_OES_texture_half_float_linear
536 bool enable_texture_float = false; 537 bool enable_texture_float = false;
537 bool enable_texture_float_linear = false; 538 bool enable_texture_float_linear = false;
538 bool enable_texture_half_float = false; 539 bool enable_texture_half_float = false;
539 bool enable_texture_half_float_linear = false; 540 bool enable_texture_half_float_linear = false;
(...skipping 598 matching lines...) Expand 10 before | Expand all | Expand 10 after
1138 if (pos == std::string::npos) { 1139 if (pos == std::string::npos) {
1139 extensions_ += (extensions_.empty() ? "" : " ") + str; 1140 extensions_ += (extensions_.empty() ? "" : " ") + str;
1140 } 1141 }
1141 } 1142 }
1142 1143
1143 FeatureInfo::~FeatureInfo() { 1144 FeatureInfo::~FeatureInfo() {
1144 } 1145 }
1145 1146
1146 } // namespace gles2 1147 } // namespace gles2
1147 } // namespace gpu 1148 } // namespace gpu
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698