diff options
author | Chris Wilson <chris@chris-wilson.co.uk> | 2011-12-06 10:27:17 +0000 |
---|---|---|
committer | Chris Wilson <chris@chris-wilson.co.uk> | 2011-12-06 11:33:15 +0000 |
commit | 6b472e12ae11f7b68289cdfd616e765be9a25a98 (patch) | |
tree | 514ef2bc233b40f38e5a6eeb2f58db787cf03c7a | |
parent | a8cbb007844b04937b36cc387d5ad29b5fc70119 (diff) |
gl: Re-enable the CLEAR optimisation
It was temporarily disabled whilst the surface API was in flux.
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
-rw-r--r-- | src/cairo-gl-surface.c | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/src/cairo-gl-surface.c b/src/cairo-gl-surface.c index c201c5139..90b25949c 100644 --- a/src/cairo-gl-surface.c +++ b/src/cairo-gl-surface.c @@ -1161,19 +1161,17 @@ _cairo_gl_surface_paint (void *surface, const cairo_pattern_t *source, const cairo_clip_t *clip) { -#if 0 /* simplify the common case of clearing the surface */ if (clip == NULL) { if (op == CAIRO_OPERATOR_CLEAR) - return _cairo_gl_surface_clear (abstract_surface, CAIRO_COLOR_TRANSPARENT); + return _cairo_gl_surface_clear (surface, CAIRO_COLOR_TRANSPARENT); else if (source->type == CAIRO_PATTERN_TYPE_SOLID && (op == CAIRO_OPERATOR_SOURCE || (op == CAIRO_OPERATOR_OVER && _cairo_pattern_is_opaque_solid (source)))) { - return _cairo_gl_surface_clear (abstract_surface, + return _cairo_gl_surface_clear (surface, &((cairo_solid_pattern_t *) source)->color); } } -#endif return _cairo_compositor_paint (get_compositor (surface), surface, op, source, clip); |