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

Unified Diff: src/gpu/gl/GrGLContextInfo.cpp

Issue 12328111: Use glGetStringi to get extensions when available. (Closed) Base URL: http://skia.googlecode.com/svn/trunk/
Patch Set: Created 7 years, 10 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/gpu/gl/GrGLContextInfo.h ('k') | src/gpu/gl/GrGLCreateNullInterface.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/gpu/gl/GrGLContextInfo.cpp
===================================================================
--- src/gpu/gl/GrGLContextInfo.cpp (revision 7868)
+++ src/gpu/gl/GrGLContextInfo.cpp (working copy)
@@ -31,7 +31,7 @@
fGLVersion = ctx.fGLVersion;
fGLSLGeneration = ctx.fGLSLGeneration;
fVendor = ctx.fVendor;
- fExtensionString = ctx.fExtensionString;
+ fExtensions = ctx.fExtensions;
fGLCaps = ctx.fGLCaps;
return *this;
}
@@ -42,7 +42,7 @@
fGLVersion = GR_GL_VER(0, 0);
fGLSLGeneration = static_cast<GrGLSLGeneration>(0);
fVendor = kOther_GrGLVendor;
- fExtensionString = "";
+ fExtensions.reset();
fGLCaps.reset();
}
@@ -50,14 +50,13 @@
this->reset();
// We haven't validated the GrGLInterface yet, so check for GetString
// function pointer
- if (NULL != interface->fGetString) {
-
+ if (interface->fGetString) {
const GrGLubyte* verUByte;
GR_GL_CALL_RET(interface, verUByte, GetString(GR_GL_VERSION));
const char* ver = reinterpret_cast<const char*>(verUByte);
GrGLBinding binding = GrGLGetBindingInUseFromString(ver);
- if (interface->validate(binding)) {
+ if (0 != binding && interface->validate(binding) && fExtensions.init(binding, interface)) {
fInterface = interface;
interface->ref();
@@ -69,9 +68,6 @@
fGLSLGeneration = GrGetGLSLGeneration(fBindingInUse,
this->interface());
- const GrGLubyte* ext;
- GR_GL_CALL_RET(interface, ext, GetString(GR_GL_EXTENSIONS));
- fExtensionString = reinterpret_cast<const char*>(ext);
fVendor = GrGLGetVendor(interface);
fGLCaps.init(*this);
return true;
« no previous file with comments | « src/gpu/gl/GrGLContextInfo.h ('k') | src/gpu/gl/GrGLCreateNullInterface.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698