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

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

Issue 242163002: Adding support for PVRTC, ATC, and ETC1 textures to the command buffer (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 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
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 600 matching lines...) Expand 10 before | Expand all | Expand 10 after
611 validators_.texture_parameter.AddValue(GL_REQUIRED_TEXTURE_IMAGE_UNITS_OES); 611 validators_.texture_parameter.AddValue(GL_REQUIRED_TEXTURE_IMAGE_UNITS_OES);
612 validators_.g_l_state.AddValue(GL_TEXTURE_BINDING_EXTERNAL_OES); 612 validators_.g_l_state.AddValue(GL_TEXTURE_BINDING_EXTERNAL_OES);
613 } 613 }
614 614
615 if (extensions.Contains("GL_OES_compressed_ETC1_RGB8_texture")) { 615 if (extensions.Contains("GL_OES_compressed_ETC1_RGB8_texture")) {
616 AddExtensionString("GL_OES_compressed_ETC1_RGB8_texture"); 616 AddExtensionString("GL_OES_compressed_ETC1_RGB8_texture");
617 feature_flags_.oes_compressed_etc1_rgb8_texture = true; 617 feature_flags_.oes_compressed_etc1_rgb8_texture = true;
618 validators_.compressed_texture_format.AddValue(GL_ETC1_RGB8_OES); 618 validators_.compressed_texture_format.AddValue(GL_ETC1_RGB8_OES);
619 } 619 }
620 620
621 if (extensions.Contains("GL_AMD_compressed_ATC_texture")) {
622 AddExtensionString("GL_AMD_compressed_ATC_texture");
623 validators_.compressed_texture_format.AddValue(
624 GL_ATC_RGB_AMD);
625 validators_.compressed_texture_format.AddValue(
626 GL_ATC_RGBA_EXPLICIT_ALPHA_AMD);
627 validators_.compressed_texture_format.AddValue(
628 GL_ATC_RGBA_INTERPOLATED_ALPHA_AMD);
629 }
630
631 if (extensions.Contains("GL_IMG_texture_compression_pvrtc")) {
632 AddExtensionString("GL_IMG_texture_compression_pvrtc");
633 validators_.compressed_texture_format.AddValue(
634 GL_COMPRESSED_RGB_PVRTC_4BPPV1_IMG);
635 validators_.compressed_texture_format.AddValue(
636 GL_COMPRESSED_RGB_PVRTC_2BPPV1_IMG);
637 validators_.compressed_texture_format.AddValue(
638 GL_COMPRESSED_RGBA_PVRTC_4BPPV1_IMG);
639 validators_.compressed_texture_format.AddValue(
640 GL_COMPRESSED_RGBA_PVRTC_2BPPV1_IMG);
641 }
642
621 // Ideally we would only expose this extension on Mac OS X, to 643 // Ideally we would only expose this extension on Mac OS X, to
622 // support GL_CHROMIUM_iosurface and the compositor. We don't want 644 // support GL_CHROMIUM_iosurface and the compositor. We don't want
623 // applications to start using it; they should use ordinary non- 645 // applications to start using it; they should use ordinary non-
624 // power-of-two textures. However, for unit testing purposes we 646 // power-of-two textures. However, for unit testing purposes we
625 // expose it on all supported platforms. 647 // expose it on all supported platforms.
626 if (extensions.Contains("GL_ARB_texture_rectangle")) { 648 if (extensions.Contains("GL_ARB_texture_rectangle")) {
627 AddExtensionString("GL_ARB_texture_rectangle"); 649 AddExtensionString("GL_ARB_texture_rectangle");
628 feature_flags_.arb_texture_rectangle = true; 650 feature_flags_.arb_texture_rectangle = true;
629 validators_.texture_bind_target.AddValue(GL_TEXTURE_RECTANGLE_ARB); 651 validators_.texture_bind_target.AddValue(GL_TEXTURE_RECTANGLE_ARB);
630 // For the moment we don't add this enum to the texture_target 652 // For the moment we don't add this enum to the texture_target
(...skipping 172 matching lines...) Expand 10 before | Expand all | Expand 10 after
803 if (pos == std::string::npos) { 825 if (pos == std::string::npos) {
804 extensions_ += (extensions_.empty() ? "" : " ") + str; 826 extensions_ += (extensions_.empty() ? "" : " ") + str;
805 } 827 }
806 } 828 }
807 829
808 FeatureInfo::~FeatureInfo() { 830 FeatureInfo::~FeatureInfo() {
809 } 831 }
810 832
811 } // namespace gles2 833 } // namespace gles2
812 } // namespace gpu 834 } // namespace gpu
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698