summaryrefslogtreecommitdiff
path: root/src/cairo-gl-info.c
diff options
context:
space:
mode:
authorBryce Harrington <bryce@osg.samsung.com>2014-07-31 17:43:03 -0700
committerBryce Harrington <bryce@osg.samsung.com>2014-09-19 17:23:50 -0700
commitaa820c13d78a4fc1c87da0da9012ee532aa2d50a (patch)
tree6ecfc7b0825c404092e5cc3e6078334693d16320 /src/cairo-gl-info.c
parent036f47c34579259fa86d0193797b6f83fe79bbeb (diff)
gl: Track the VBO size as a property of the ctx
Change suggested by Chris Wilson. This will enable setting different vbo sizes for GL vs. EGL. Signed-off-by: Bryce Harrington <bryce@osg.samsung.com>
Diffstat (limited to 'src/cairo-gl-info.c')
-rw-r--r--src/cairo-gl-info.c22
1 files changed, 10 insertions, 12 deletions
diff --git a/src/cairo-gl-info.c b/src/cairo-gl-info.c
index c47033ecd..66b0b5081 100644
--- a/src/cairo-gl-info.c
+++ b/src/cairo-gl-info.c
@@ -73,21 +73,19 @@ _cairo_gl_get_flavor (void)
return flavor;
}
-long
+unsigned long
_cairo_gl_get_vbo_size (void)
{
- static long vbo_size = -1;
+ unsigned long vbo_size;
- if (vbo_size < 0) {
- const char *env = getenv ("CAIRO_GL_VBO_SIZE");
- if (env == NULL) {
- vbo_size = CAIRO_GL_VBO_SIZE_DEFAULT;
- } else {
- errno = 0;
- vbo_size = strtol (env, NULL, 10);
- assert (errno == 0);
- assert (vbo_size > 0);
- }
+ const char *env = getenv ("CAIRO_GL_VBO_SIZE");
+ if (env == NULL) {
+ vbo_size = CAIRO_GL_VBO_SIZE_DEFAULT;
+ } else {
+ errno = 0;
+ vbo_size = strtol (env, NULL, 10);
+ assert (errno == 0);
+ assert (vbo_size > 0);
}
return vbo_size;