| Index: src/gpu/gl/GrGLInterface.cpp
|
| diff --git a/src/gpu/gl/GrGLInterface.cpp b/src/gpu/gl/GrGLInterface.cpp
|
| index 0aba95eaed0e38177b970b749a04d7ca0a96ea66..fb6cb1c54d71978f69114f66bab48959b3a0c83a 100644
|
| --- a/src/gpu/gl/GrGLInterface.cpp
|
| +++ b/src/gpu/gl/GrGLInterface.cpp
|
| @@ -44,6 +44,16 @@ bool GrGLInterface::validate(GrGLBinding binding) const {
|
| 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 ||
|
| @@ -198,14 +208,19 @@ bool GrGLInterface::validate(GrGLBinding binding) const {
|
| return false;
|
| }
|
| }
|
| - // The below two blocks are checks for functions used with
|
| - // GL_NV_path_rendering. We're not enforcing that they be non-NULL
|
| - // because they aren't actually called at this time.
|
| - if (false &&
|
| - (NULL == fMatrixMode ||
|
| - NULL == fLoadIdentity ||
|
| - NULL == fLoadMatrixf)) {
|
| - return false;
|
| + if (!isCoreProfile) {
|
| + if (NULL == fClientActiveTexture ||
|
| + NULL == fDisableClientState ||
|
| + NULL == fEnableClientState ||
|
| + NULL == fLoadIdentity ||
|
| + NULL == fLoadMatrixf ||
|
| + NULL == fMatrixMode ||
|
| + NULL == fTexGenf ||
|
| + NULL == fTexGenfv ||
|
| + NULL == fTexGeni ||
|
| + NULL == fVertexPointer) {
|
| + return false;
|
| + }
|
| }
|
| if (false && extensions.has("GL_NV_path_rendering")) {
|
| if (NULL == fPathCommands ||
|
|
|