aboutsummaryrefslogtreecommitdiffhomepage
path: root/include/gpu/gl
diff options
context:
space:
mode:
authorGravatar joshualitt <joshualitt@chromium.org>2014-08-07 13:48:49 -0700
committerGravatar Commit bot <commit-bot@chromium.org>2014-08-07 13:48:50 -0700
commitc863ab07c207aac5aae8b1593a2767a946682bca (patch)
tree489e34d20295bf60467d171816082b4b5b3f0f7e /include/gpu/gl
parent619e07656dc51bc252324dbf2579125c5b488b01 (diff)
Cleanup of context initialization
Cleanup context initialization on linux BUG=skia: R=bsalomon@chromium.org, bsalomon@google.com Author: joshualitt@chromium.org Review URL: https://codereview.chromium.org/422323003
Diffstat (limited to 'include/gpu/gl')
-rw-r--r--include/gpu/gl/SkNativeGLContext.h23
1 files changed, 23 insertions, 0 deletions
diff --git a/include/gpu/gl/SkNativeGLContext.h b/include/gpu/gl/SkNativeGLContext.h
index 01b73094fb..3bb6530c27 100644
--- a/include/gpu/gl/SkNativeGLContext.h
+++ b/include/gpu/gl/SkNativeGLContext.h
@@ -10,6 +10,29 @@
#include "SkGLContextHelper.h"
+/* This struct is taken from a mesa demo. Please update as required */
+static const struct { int major, minor; } gl_versions[] = {
+ {1, 0},
+ {1, 1},
+ {1, 2},
+ {1, 3},
+ {1, 4},
+ {1, 5},
+ {2, 0},
+ {2, 1},
+ {3, 0},
+ {3, 1},
+ {3, 2},
+ {3, 3},
+ {4, 0},
+ {4, 1},
+ {4, 2},
+ {4, 3},
+ {4, 4},
+ {0, 0} /* end of list */
+};
+#define NUM_GL_VERSIONS SK_ARRAY_COUNT(gl_versions)
+
#if defined(SK_BUILD_FOR_MAC)
#include <OpenGL/OpenGL.h>
#elif defined(SK_BUILD_FOR_ANDROID) || defined(SK_BUILD_FOR_NACL)