Index: src/gpu/gl/GrGLUtil.cpp |
diff --git a/src/gpu/gl/GrGLUtil.cpp b/src/gpu/gl/GrGLUtil.cpp |
index d6f5820781699b3fd8f9c0335b035af90f475e62..0e3d2a3f7bf0bb51314846a712fe805ec4c801d9 100644 |
--- a/src/gpu/gl/GrGLUtil.cpp |
+++ b/src/gpu/gl/GrGLUtil.cpp |
@@ -214,6 +214,15 @@ GrGLVendor GrGLGetVendorFromString(const char* vendorString) { |
return kOther_GrGLVendor; |
} |
+GrGLRenderer GrGLGetRendererFromString(const char* rendererString) { |
+ if (NULL != rendererString) { |
+ if (0 == strcmp(rendererString, "NVIDIA Tegra 3")) { |
+ return kTegra3_GrGLRenderer; |
+ } |
+ } |
+ return kOther_GrGLRenderer; |
+} |
+ |
GrGLBinding GrGLGetBindingInUse(const GrGLInterface* gl) { |
const GrGLubyte* v; |
GR_GL_CALL_RET(gl, v, GetString(GR_GL_VERSION)); |
@@ -238,6 +247,12 @@ GrGLVendor GrGLGetVendor(const GrGLInterface* gl) { |
return GrGLGetVendorFromString((const char*) v); |
} |
+GrGLRenderer GrGLGetRenderer(const GrGLInterface* gl) { |
+ const GrGLubyte* v; |
+ GR_GL_CALL_RET(gl, v, GetString(GR_GL_RENDERER)); |
+ return GrGLGetRendererFromString((const char*) v); |
+} |
+ |
template<> void GrGLGetMatrix<3>(GrGLfloat* dest, const SkMatrix& src) { |
// Col 0 |
dest[0] = SkScalarToFloat(src[SkMatrix::kMScaleX]); |