OLD | NEW |
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 838 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
849 AddExtensionString("GL_CHROMIUM_sync_query"); | 849 AddExtensionString("GL_CHROMIUM_sync_query"); |
850 feature_flags_.chromium_sync_query = true; | 850 feature_flags_.chromium_sync_query = true; |
851 } | 851 } |
852 | 852 |
853 if (extensions.Contains("GL_NV_path_rendering")) { | 853 if (extensions.Contains("GL_NV_path_rendering")) { |
854 if (extensions.Contains("GL_EXT_direct_state_access") || is_es3) { | 854 if (extensions.Contains("GL_EXT_direct_state_access") || is_es3) { |
855 AddExtensionString("GL_CHROMIUM_path_rendering"); | 855 AddExtensionString("GL_CHROMIUM_path_rendering"); |
856 feature_flags_.chromium_path_rendering = true; | 856 feature_flags_.chromium_path_rendering = true; |
857 validators_.g_l_state.AddValue(GL_PATH_MODELVIEW_MATRIX_CHROMIUM); | 857 validators_.g_l_state.AddValue(GL_PATH_MODELVIEW_MATRIX_CHROMIUM); |
858 validators_.g_l_state.AddValue(GL_PATH_PROJECTION_MATRIX_CHROMIUM); | 858 validators_.g_l_state.AddValue(GL_PATH_PROJECTION_MATRIX_CHROMIUM); |
| 859 validators_.g_l_state.AddValue(GL_PATH_STENCIL_FUNC_CHROMIUM); |
| 860 validators_.g_l_state.AddValue(GL_PATH_STENCIL_REF_CHROMIUM); |
| 861 validators_.g_l_state.AddValue(GL_PATH_STENCIL_VALUE_MASK_CHROMIUM); |
859 } | 862 } |
860 } | 863 } |
861 } | 864 } |
862 | 865 |
863 void FeatureInfo::AddExtensionString(const char* s) { | 866 void FeatureInfo::AddExtensionString(const char* s) { |
864 std::string str(s); | 867 std::string str(s); |
865 size_t pos = extensions_.find(str); | 868 size_t pos = extensions_.find(str); |
866 while (pos != std::string::npos && | 869 while (pos != std::string::npos && |
867 pos + str.length() < extensions_.length() && | 870 pos + str.length() < extensions_.length() && |
868 extensions_.substr(pos + str.length(), 1) != " ") { | 871 extensions_.substr(pos + str.length(), 1) != " ") { |
869 // This extension name is a substring of another. | 872 // This extension name is a substring of another. |
870 pos = extensions_.find(str, pos + str.length()); | 873 pos = extensions_.find(str, pos + str.length()); |
871 } | 874 } |
872 if (pos == std::string::npos) { | 875 if (pos == std::string::npos) { |
873 extensions_ += (extensions_.empty() ? "" : " ") + str; | 876 extensions_ += (extensions_.empty() ? "" : " ") + str; |
874 } | 877 } |
875 } | 878 } |
876 | 879 |
877 FeatureInfo::~FeatureInfo() { | 880 FeatureInfo::~FeatureInfo() { |
878 } | 881 } |
879 | 882 |
880 } // namespace gles2 | 883 } // namespace gles2 |
881 } // namespace gpu | 884 } // namespace gpu |
OLD | NEW |