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 133413003: Rename GrGLBinding->GrGLStandard, no longer a bitfield (Closed) Base URL: https://skia.googlecode.com/svn/trunk
Patch Set: actually fix enum names? Created 6 years, 11 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"
11 11
12 #include "SkTSearch.h" 12 #include "SkTSearch.h"
13 #include "SkTSort.h" 13 #include "SkTSort.h"
14 14
15 namespace { 15 namespace {
16 inline bool extension_compare(const SkString& a, const SkString& b) { 16 inline bool extension_compare(const SkString& a, const SkString& b) {
17 return strcmp(a.c_str(), b.c_str()) < 0; 17 return strcmp(a.c_str(), b.c_str()) < 0;
18 } 18 }
19 } 19 }
20 20
21 bool GrGLExtensions::init(GrGLBinding binding, 21 bool GrGLExtensions::init(GrGLStandard standard,
22 GrGLGetStringProc getString, 22 GrGLGetStringProc getString,
23 GrGLGetStringiProc getStringi, 23 GrGLGetStringiProc getStringi,
24 GrGLGetIntegervProc getIntegerv) { 24 GrGLGetIntegervProc getIntegerv) {
25 fStrings.reset(); 25 fStrings.reset();
26 if (NULL == getString) { 26 if (NULL == getString) {
27 return false; 27 return false;
28 } 28 }
29 29
30 // glGetStringi and indexed extensions were added in version 3.0 of desktop GL and ES. 30 // glGetStringi and indexed extensions were added in version 3.0 of desktop GL and ES.
31 const GrGLubyte* verString = getString(GR_GL_VERSION); 31 const GrGLubyte* verString = getString(GR_GL_VERSION);
(...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after
87 87
88 void GrGLExtensions::print(const char* sep) const { 88 void GrGLExtensions::print(const char* sep) const {
89 if (NULL == sep) { 89 if (NULL == sep) {
90 sep = " "; 90 sep = " ";
91 } 91 }
92 int cnt = fStrings.count(); 92 int cnt = fStrings.count();
93 for (int i = 0; i < cnt; ++i) { 93 for (int i = 0; i < cnt; ++i) {
94 GrPrintf("%s%s", fStrings[i].c_str(), (i < cnt - 1) ? sep : ""); 94 GrPrintf("%s%s", fStrings[i].c_str(), (i < cnt - 1) ? sep : "");
95 } 95 }
96 } 96 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698