Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 /* | 1 /* |
| 2 * Copyright 2013 Google Inc. | 2 * Copyright 2013 Google Inc. |
| 3 * | 3 * |
| 4 * Use of this source code is governed by a BSD-style license that can be | 4 * Use of this source code is governed by a BSD-style license that can be |
| 5 * found in the LICENSE file. | 5 * found in the LICENSE file. |
| 6 */ | 6 */ |
| 7 | 7 |
| 8 #include "gl/GrGLExtensions.h" | 8 #include "gl/GrGLExtensions.h" |
| 9 #include "gl/GrGLDefines.h" | 9 #include "gl/GrGLDefines.h" |
| 10 #include "gl/GrGLUtil.h" | 10 #include "gl/GrGLUtil.h" |
| (...skipping 63 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 74 } | 74 } |
| 75 | 75 |
| 76 bool GrGLExtensions::has(const char* ext) const { | 76 bool GrGLExtensions::has(const char* ext) const { |
| 77 SkString extensionStr(ext); | 77 SkString extensionStr(ext); |
| 78 int idx = SkTSearch<SkString, extension_compare>(&fStrings.front(), | 78 int idx = SkTSearch<SkString, extension_compare>(&fStrings.front(), |
| 79 fStrings.count(), | 79 fStrings.count(), |
| 80 extensionStr, | 80 extensionStr, |
| 81 sizeof(SkString)); | 81 sizeof(SkString)); |
| 82 return idx >= 0; | 82 return idx >= 0; |
| 83 } | 83 } |
| 84 | |
| 85 void GrGLExtensions::print(const char* sep) const { | |
| 86 if (NULL == sep) { | |
|
robertphillips
2013/05/02 19:39:14
Wouldn't " " be a better default?
bsalomon
2013/05/02 19:41:59
I suppose so.. I could also just assert, was mostl
| |
| 87 sep = ""; | |
| 88 } | |
| 89 int cnt = fStrings.count(); | |
| 90 for (int i = 0; i < cnt; ++i) { | |
| 91 GrPrintf("%s%s", fStrings[i].c_str(), (i < cnt - 1) ? sep : ""); | |
| 92 } | |
| 93 } | |
| 94 | |
| OLD | NEW |