add helpers to initialize our var-int args before calling GL. Some drivers
assert that those are zero on input, even though they are logically
output-only parameters.
git-svn-id: http://skia.googlecode.com/svn/trunk@688 2bbb7eff-a529-9590-31e7-b0007b416f81
diff --git a/gpu/src/GrGpuGL.h b/gpu/src/GrGpuGL.h
index 7701df9..dc766be 100644
--- a/gpu/src/GrGpuGL.h
+++ b/gpu/src/GrGpuGL.h
@@ -180,6 +180,16 @@
#define SK_GL_HAS_COLOR4UB
#endif
+/*
+ * Some drivers want the var-int arg to be zero-initialized on input.
+ */
+#define GR_GL_INIT_ZERO 0
+#define GR_GL_GetIntegerv(e, p) \
+ do { \
+ *(p) = GR_GL_INIT_ZERO; \
+ GR_GL(GetIntegerv(e, p)); \
+ } while (0)
+
#endif