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

Side by Side Diff: src/gpu/gl/GrGLExtensions.cpp

Issue 14864002: Fix GL extension printing on core profiles. (Closed) Base URL: http://skia.googlecode.com/svn/trunk/
Patch Set: Created 7 years, 7 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 | Annotate | Revision Log
OLDNEW
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
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
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698