diff options
author | Eric Anholt <eric@anholt.net> | 2009-02-05 09:43:38 -0800 |
---|---|---|
committer | Eric Anholt <eric@anholt.net> | 2009-02-08 15:09:38 +0100 |
commit | a8a40810275ff0a59f5767034372523d34fbbd1b (patch) | |
tree | af56b25f1a5309b755a95aaeb4a5f69d7b41387e /src/cairo-gl-surface.c | |
parent | e7eb6dab12b9d622b80e4202d753324f7161b269 (diff) |
[gl] clear surfaces to transparent on creation
Diffstat (limited to 'src/cairo-gl-surface.c')
-rw-r--r-- | src/cairo-gl-surface.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/src/cairo-gl-surface.c b/src/cairo-gl-surface.c index c2b6cd08..98dd8807 100644 --- a/src/cairo-gl-surface.c +++ b/src/cairo-gl-surface.c @@ -274,6 +274,13 @@ cairo_gl_surface_create (cairo_gl_context_t *ctx, surface->width = width; surface->height = height; + /* Cairo surfaces start out initialized to transparent (black) */ + ctx = _cairo_gl_context_acquire (surface->ctx); + _cairo_gl_set_destination (surface); + glClearColor (0.0, 0.0, 0.0, 0.0); + glClear (GL_COLOR_BUFFER_BIT); + _cairo_gl_context_release (ctx); + return &surface->base; } |