mirror of
https://gitlab.freedesktop.org/cairo/cairo.git
synced 2026-01-08 02:30:22 +01:00
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>
This commit is contained in:
parent
a8cbb00784
commit
6b472e12ae
1 changed files with 2 additions and 4 deletions
|
|
@ -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);
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue