Fix invalid enum error when checking for core profile in GrGLInterface::validate()
R=robertphillips@google.com
Review URL: https://codereview.chromium.org/23691022
git-svn-id: http://skia.googlecode.com/svn/trunk@11040 2bbb7eff-a529-9590-31e7-b0007b416f81
diff --git a/src/gpu/gl/GrGLInterface.cpp b/src/gpu/gl/GrGLInterface.cpp
index 38a7f9d..d15b4cc 100644
--- a/src/gpu/gl/GrGLInterface.cpp
+++ b/src/gpu/gl/GrGLInterface.cpp
@@ -44,16 +44,6 @@
return false;
}
- bool isCoreProfile = false;
- if (kDesktop_GrGLBinding == binding) {
- if (NULL == this->fGetIntegerv) {
- return false;
- }
- GrGLint profileMask = 0;
- fGetIntegerv(GR_GL_CONTEXT_PROFILE_MASK, &profileMask);
- isCoreProfile = SkToBool(profileMask & GR_GL_CONTEXT_CORE_PROFILE_BIT);
- }
-
// functions that are always required
if (NULL == fActiveTexture ||
NULL == fAttachShader ||
@@ -154,6 +144,13 @@
GrGLVersion glVer = GrGLGetVersion(this);
+ bool isCoreProfile = false;
+ if (kDesktop_GrGLBinding == binding && glVer >= GR_GL_VER(3,2)) {
+ GrGLint profileMask;
+ GR_GL_GetIntegerv(this, GR_GL_CONTEXT_PROFILE_MASK, &profileMask);
+ isCoreProfile = SkToBool(profileMask & GR_GL_CONTEXT_CORE_PROFILE_BIT);
+ }
+
// Now check that baseline ES/Desktop fns not covered above are present
// and that we have fn pointers for any advertised extensions that we will
// try to use.
diff --git a/src/gpu/gl/mac/GrGLCreateNativeInterface_mac.cpp b/src/gpu/gl/mac/GrGLCreateNativeInterface_mac.cpp
index ba0adad..4f8ecac 100644
--- a/src/gpu/gl/mac/GrGLCreateNativeInterface_mac.cpp
+++ b/src/gpu/gl/mac/GrGLCreateNativeInterface_mac.cpp
@@ -132,7 +132,10 @@
GET_PROC(GetUniformLocation);
GET_PROC(LineWidth);
GET_PROC(LinkProgram);
+ GET_PROC(LoadIdentity);
+ GET_PROC(LoadMatrixf);
GET_PROC(MapBuffer);
+ GET_PROC(MatrixMode);
GET_PROC(PixelStorei);
GET_PROC(ReadBuffer);
GET_PROC(ReadPixels);