diff options
author | Carl Worth <cworth@cworth.org> | 2009-10-12 11:04:34 -0700 |
---|---|---|
committer | Carl Worth <cworth@cworth.org> | 2009-10-12 11:04:34 -0700 |
commit | 71be014153f86e8e85f57841484f3c633bad931e (patch) | |
tree | 54bd6436ca4996a6e65e15f595f4544f1b7b507b | |
parent | 56c9b2de7a2b93b2e0c59cf98326d8c0d4d508ba (diff) |
gl: Reorder initialization of cairo_gl_context_t to match declaration.
This makes it easier to find any missing initializers.
-rw-r--r-- | src/cairo-gl-private.h | 1 | ||||
-rw-r--r-- | src/cairo-gl-surface.c | 7 |
2 files changed, 5 insertions, 3 deletions
diff --git a/src/cairo-gl-private.h b/src/cairo-gl-private.h index 79145cf3..9c8f901b 100644 --- a/src/cairo-gl-private.h +++ b/src/cairo-gl-private.h @@ -84,6 +84,7 @@ struct _cairo_gl_context { cairo_status_t status; cairo_mutex_t mutex; /* needed? */ + GLuint dummy_tex; GLint max_framebuffer_size; GLint max_texture_size; diff --git a/src/cairo-gl-surface.c b/src/cairo-gl-surface.c index e73646ae..34f2ba0d 100644 --- a/src/cairo-gl-surface.c +++ b/src/cairo-gl-surface.c @@ -81,11 +81,10 @@ _cairo_gl_context_init (cairo_gl_context_t *ctx) { int n; - ctx->status = CAIRO_STATUS_SUCCESS; CAIRO_REFERENCE_COUNT_INIT (&ctx->ref_count, 1); - CAIRO_MUTEX_INIT (ctx->mutex); + ctx->status = CAIRO_STATUS_SUCCESS; - memset (ctx->glyph_cache, 0, sizeof (ctx->glyph_cache)); + CAIRO_MUTEX_INIT (ctx->mutex); if (glewInit () != GLEW_OK) return _cairo_error (CAIRO_STATUS_INVALID_FORMAT); /* XXX */ @@ -117,6 +116,8 @@ _cairo_gl_context_init (cairo_gl_context_t *ctx) ctx->max_texture_size = 0; glGetIntegerv (GL_MAX_TEXTURE_SIZE, &ctx->max_texture_size); + memset (ctx->glyph_cache, 0, sizeof (ctx->glyph_cache)); + for (n = 0; n < ARRAY_LENGTH (ctx->glyph_cache); n++) _cairo_gl_glyph_cache_init (&ctx->glyph_cache[n]); |