Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(346)

Unified Diff: src/gpu/gl/GrGLUtil.h

Issue 254083002: Fail to create GrContext when we get a NULL for a GL/GLSL version string (Closed) Base URL: https://skia.googlecode.com/svn/trunk
Patch Set: check GrGLCaps::init return Created 6 years, 8 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 | « src/gpu/gl/GrGLSL.cpp ('k') | src/gpu/gl/GrGLUtil.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/gpu/gl/GrGLUtil.h
diff --git a/src/gpu/gl/GrGLUtil.h b/src/gpu/gl/GrGLUtil.h
index b99487a1af6a7a2b680c3d0b1e868ec4f176dea1..73fcec1177011f0220007a97a53138bea226881a 100644
--- a/src/gpu/gl/GrGLUtil.h
+++ b/src/gpu/gl/GrGLUtil.h
@@ -18,6 +18,14 @@ class SkMatrix;
typedef uint32_t GrGLVersion;
typedef uint32_t GrGLSLVersion;
+#define GR_GL_VER(major, minor) ((static_cast<int>(major) << 16) | \
+ static_cast<int>(minor))
+#define GR_GLSL_VER(major, minor) ((static_cast<int>(major) << 16) | \
+ static_cast<int>(minor))
+
+#define GR_GL_INVALID_VER GR_GL_VER(0, 0)
+#define GR_GLSL_INVALID_VER GR_GL_VER(0, 0)
+
/**
* The Vendor and Renderer enum values are lazily updated as required.
*/
@@ -37,11 +45,6 @@ enum GrGLRenderer {
kOther_GrGLRenderer
};
-#define GR_GL_VER(major, minor) ((static_cast<int>(major) << 16) | \
- static_cast<int>(minor))
-#define GR_GLSL_VER(major, minor) ((static_cast<int>(major) << 16) | \
- static_cast<int>(minor))
-
////////////////////////////////////////////////////////////////////////////////
/**
« no previous file with comments | « src/gpu/gl/GrGLSL.cpp ('k') | src/gpu/gl/GrGLUtil.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698