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

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

Issue 9837018: Modify gpu::gles2::FeatureInfo::AddFeatures to enable feature flags based on requested features but… (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 8 years, 9 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 | « no previous file | no next file » | 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 #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/string_number_conversions.h" 9 #include "base/string_number_conversions.h"
10 #include "gpu/command_buffer/service/gl_utils.h" 10 #include "gpu/command_buffer/service/gl_utils.h"
(...skipping 371 matching lines...) Expand 10 before | Expand all | Expand 10 after
382 #if defined(OS_MACOSX) 382 #if defined(OS_MACOSX)
383 if (IOSurfaceSupport::Initialize()) { 383 if (IOSurfaceSupport::Initialize()) {
384 AddExtensionString("GL_CHROMIUM_iosurface"); 384 AddExtensionString("GL_CHROMIUM_iosurface");
385 } 385 }
386 #endif 386 #endif
387 387
388 // TODO(gman): Add support for these extensions. 388 // TODO(gman): Add support for these extensions.
389 // GL_OES_depth32 389 // GL_OES_depth32
390 // GL_OES_element_index_uint 390 // GL_OES_element_index_uint
391 391
392 feature_flags_.enable_texture_float_linear = enable_texture_float_linear; 392 feature_flags_.enable_texture_float_linear |= enable_texture_float_linear;
393 feature_flags_.enable_texture_half_float_linear = 393 feature_flags_.enable_texture_half_float_linear |=
394 enable_texture_half_float_linear; 394 enable_texture_half_float_linear;
395 feature_flags_.npot_ok = npot_ok; 395 feature_flags_.npot_ok |= npot_ok;
396 396
397 if (ext.HaveAndDesire("GL_CHROMIUM_post_sub_buffer")) { 397 if (ext.HaveAndDesire("GL_CHROMIUM_post_sub_buffer")) {
398 AddExtensionString("GL_CHROMIUM_post_sub_buffer"); 398 AddExtensionString("GL_CHROMIUM_post_sub_buffer");
399 } 399 }
400 400
401 if (ext.HaveAndDesire("GL_CHROMIUM_front_buffer_cached")) { 401 if (ext.HaveAndDesire("GL_CHROMIUM_front_buffer_cached")) {
402 AddExtensionString("GL_CHROMIUM_front_buffer_cached"); 402 AddExtensionString("GL_CHROMIUM_front_buffer_cached");
403 } 403 }
404 404
405 if (ext.Desire("GL_ANGLE_pack_reverse_row_order") && 405 if (ext.Desire("GL_ANGLE_pack_reverse_row_order") &&
(...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after
463 } 463 }
464 464
465 void FeatureInfo::AddExtensionString(const std::string& str) { 465 void FeatureInfo::AddExtensionString(const std::string& str) {
466 if (extensions_.find(str) == std::string::npos) { 466 if (extensions_.find(str) == std::string::npos) {
467 extensions_ += (extensions_.empty() ? "" : " ") + str; 467 extensions_ += (extensions_.empty() ? "" : " ") + str;
468 } 468 }
469 } 469 }
470 470
471 } // namespace gles2 471 } // namespace gles2
472 } // namespace gpu 472 } // namespace gpu
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698