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

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

Issue 9965023: Merge 128403 - Modify gpu::gles2::FeatureInfo::AddFeatures to enable feature flags based on request… (Closed) Base URL: svn://svn.chromium.org/chrome/branches/1025/src/
Patch Set: Created 8 years, 8 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 369 matching lines...) Expand 10 before | Expand all | Expand 10 after
380 #if defined(OS_MACOSX) 380 #if defined(OS_MACOSX)
381 if (IOSurfaceSupport::Initialize()) { 381 if (IOSurfaceSupport::Initialize()) {
382 AddExtensionString("GL_CHROMIUM_iosurface"); 382 AddExtensionString("GL_CHROMIUM_iosurface");
383 } 383 }
384 #endif 384 #endif
385 385
386 // TODO(gman): Add support for these extensions. 386 // TODO(gman): Add support for these extensions.
387 // GL_OES_depth32 387 // GL_OES_depth32
388 // GL_OES_element_index_uint 388 // GL_OES_element_index_uint
389 389
390 feature_flags_.enable_texture_float_linear = enable_texture_float_linear; 390 feature_flags_.enable_texture_float_linear |= enable_texture_float_linear;
391 feature_flags_.enable_texture_half_float_linear = 391 feature_flags_.enable_texture_half_float_linear |=
392 enable_texture_half_float_linear; 392 enable_texture_half_float_linear;
393 feature_flags_.npot_ok = npot_ok; 393 feature_flags_.npot_ok |= npot_ok;
394 394
395 if (ext.HaveAndDesire("GL_CHROMIUM_post_sub_buffer")) { 395 if (ext.HaveAndDesire("GL_CHROMIUM_post_sub_buffer")) {
396 AddExtensionString("GL_CHROMIUM_post_sub_buffer"); 396 AddExtensionString("GL_CHROMIUM_post_sub_buffer");
397 } 397 }
398 398
399 if (ext.HaveAndDesire("GL_CHROMIUM_front_buffer_cached")) { 399 if (ext.HaveAndDesire("GL_CHROMIUM_front_buffer_cached")) {
400 AddExtensionString("GL_CHROMIUM_front_buffer_cached"); 400 AddExtensionString("GL_CHROMIUM_front_buffer_cached");
401 } 401 }
402 402
403 if (ext.Desire("GL_ANGLE_pack_reverse_row_order") && 403 if (ext.Desire("GL_ANGLE_pack_reverse_row_order") &&
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after
440 } 440 }
441 441
442 void FeatureInfo::AddExtensionString(const std::string& str) { 442 void FeatureInfo::AddExtensionString(const std::string& str) {
443 if (extensions_.find(str) == std::string::npos) { 443 if (extensions_.find(str) == std::string::npos) {
444 extensions_ += (extensions_.empty() ? "" : " ") + str; 444 extensions_ += (extensions_.empty() ? "" : " ") + str;
445 } 445 }
446 } 446 }
447 447
448 } // namespace gles2 448 } // namespace gles2
449 } // namespace gpu 449 } // 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