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/GrGLInterface.cpp

Issue 23691022: Fix invalid enum error when checking for core profile in GrGLInterface::validate() (Closed) Base URL: https://skia.googlecode.com/svn/trunk
Patch Set: matrix mode func on mac Created 7 years, 4 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 | « no previous file | src/gpu/gl/mac/GrGLCreateNativeInterface_mac.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/gpu/gl/GrGLInterface.cpp
diff --git a/src/gpu/gl/GrGLInterface.cpp b/src/gpu/gl/GrGLInterface.cpp
index 38a7f9d7f43e874bc051cbfceef6091c2e611746..d15b4cc48bf5530672d49a9b3c3a51243aa46d12 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.
« no previous file with comments | « no previous file | src/gpu/gl/mac/GrGLCreateNativeInterface_mac.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698