| 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 842 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 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     } | 859     } | 
| 860   } | 860   } | 
| 861 } | 861 } | 
| 862 | 862 | 
| 863 void FeatureInfo::AddExtensionString(const std::string& str) { | 863 void FeatureInfo::AddExtensionString(const char* s) { | 
|  | 864   std::string str(s); | 
| 864   size_t pos = extensions_.find(str); | 865   size_t pos = extensions_.find(str); | 
| 865   while (pos != std::string::npos && | 866   while (pos != std::string::npos && | 
| 866          pos + str.length() < extensions_.length() && | 867          pos + str.length() < extensions_.length() && | 
| 867          extensions_.substr(pos + str.length(), 1) != " ") { | 868          extensions_.substr(pos + str.length(), 1) != " ") { | 
| 868     // This extension name is a substring of another. | 869     // This extension name is a substring of another. | 
| 869     pos = extensions_.find(str, pos + str.length()); | 870     pos = extensions_.find(str, pos + str.length()); | 
| 870   } | 871   } | 
| 871   if (pos == std::string::npos) { | 872   if (pos == std::string::npos) { | 
| 872     extensions_ += (extensions_.empty() ? "" : " ") + str; | 873     extensions_ += (extensions_.empty() ? "" : " ") + str; | 
| 873   } | 874   } | 
| 874 } | 875 } | 
| 875 | 876 | 
| 876 FeatureInfo::~FeatureInfo() { | 877 FeatureInfo::~FeatureInfo() { | 
| 877 } | 878 } | 
| 878 | 879 | 
| 879 }  // namespace gles2 | 880 }  // namespace gles2 | 
| 880 }  // namespace gpu | 881 }  // namespace gpu | 
| OLD | NEW | 
|---|