aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/gpu/gl/GrGLInterface.cpp
diff options
context:
space:
mode:
authorGravatar bsalomon@google.com <bsalomon@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81>2013-08-30 18:25:21 +0000
committerGravatar bsalomon@google.com <bsalomon@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81>2013-08-30 18:25:21 +0000
commitf714d513a61048d7df80ab62f7294e94fce7b5dc (patch)
treef12f35cfd19a476dbe3532a82972d3f318094c09 /src/gpu/gl/GrGLInterface.cpp
parent323ca781f1cdcca4fb70a313d7bb518bbe17b68c (diff)
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
Diffstat (limited to 'src/gpu/gl/GrGLInterface.cpp')
-rw-r--r--src/gpu/gl/GrGLInterface.cpp17
1 files changed, 7 insertions, 10 deletions
diff --git a/src/gpu/gl/GrGLInterface.cpp b/src/gpu/gl/GrGLInterface.cpp
index 38a7f9d7f4..d15b4cc48b 100644
--- a/src/gpu/gl/GrGLInterface.cpp
+++ b/src/gpu/gl/GrGLInterface.cpp
@@ -44,16 +44,6 @@ 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 ||
@@ -154,6 +144,13 @@ bool GrGLInterface::validate(GrGLBinding binding) const {
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.