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 792 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
803 AddExtensionString("GL_CHROMIUM_sync_query"); | 803 AddExtensionString("GL_CHROMIUM_sync_query"); |
804 feature_flags_.chromium_sync_query = true; | 804 feature_flags_.chromium_sync_query = true; |
805 } | 805 } |
806 | 806 |
807 if (extensions.Contains("GL_NV_path_rendering") && | 807 if (extensions.Contains("GL_NV_path_rendering") && |
808 extensions.Contains("GL_EXT_direct_state_access")) { | 808 extensions.Contains("GL_EXT_direct_state_access")) { |
809 AddExtensionString("GL_CHROMIUM_path_rendering"); | 809 AddExtensionString("GL_CHROMIUM_path_rendering"); |
810 feature_flags_.chromium_path_rendering = true; | 810 feature_flags_.chromium_path_rendering = true; |
811 validators_.g_l_state.AddValue(GL_MODELVIEW_MATRIX_CHROMIUM); | 811 validators_.g_l_state.AddValue(GL_MODELVIEW_MATRIX_CHROMIUM); |
812 validators_.g_l_state.AddValue(GL_PROJECTION_MATRIX_CHROMIUM); | 812 validators_.g_l_state.AddValue(GL_PROJECTION_MATRIX_CHROMIUM); |
| 813 validators_.g_l_state.AddValue(GL_MAX_TEXTURE_COORDS_CHROMIUM); |
| 814 validators_.g_l_state.AddValue(GL_PATH_STENCIL_FUNC_CHROMIUM); |
| 815 validators_.g_l_state.AddValue(GL_PATH_STENCIL_REF_CHROMIUM); |
| 816 validators_.g_l_state.AddValue(GL_PATH_STENCIL_VALUE_MASK_CHROMIUM); |
813 } | 817 } |
814 } | 818 } |
815 | 819 |
816 void FeatureInfo::AddExtensionString(const std::string& str) { | 820 void FeatureInfo::AddExtensionString(const std::string& str) { |
817 size_t pos = extensions_.find(str); | 821 size_t pos = extensions_.find(str); |
818 while (pos != std::string::npos && | 822 while (pos != std::string::npos && |
819 pos + str.length() < extensions_.length() && | 823 pos + str.length() < extensions_.length() && |
820 extensions_.substr(pos + str.length(), 1) != " ") { | 824 extensions_.substr(pos + str.length(), 1) != " ") { |
821 // This extension name is a substring of another. | 825 // This extension name is a substring of another. |
822 pos = extensions_.find(str, pos + str.length()); | 826 pos = extensions_.find(str, pos + str.length()); |
823 } | 827 } |
824 if (pos == std::string::npos) { | 828 if (pos == std::string::npos) { |
825 extensions_ += (extensions_.empty() ? "" : " ") + str; | 829 extensions_ += (extensions_.empty() ? "" : " ") + str; |
826 } | 830 } |
827 } | 831 } |
828 | 832 |
829 FeatureInfo::~FeatureInfo() { | 833 FeatureInfo::~FeatureInfo() { |
830 } | 834 } |
831 | 835 |
832 } // namespace gles2 | 836 } // namespace gles2 |
833 } // namespace gpu | 837 } // namespace gpu |
OLD | NEW |