mirror of
https://gitlab.freedesktop.org/cairo/cairo.git
synced 2026-04-19 17:10:43 +02:00
Eliminate unclipped CLEAR from meta-surface playback
The optimization that avoids replaying commands prior to an unclipped
CLEAR operation now starts playback from the first command after the
CLEAR. This avoids the need to handle the unclipped CLEAR in the PDF
surface.
(cherry picked from commit 875e32178e)
This commit is contained in:
parent
11d83334ce
commit
fce1a3fdd4
1 changed files with 6 additions and 6 deletions
|
|
@ -243,12 +243,6 @@ _cairo_meta_surface_paint (void *abstract_surface,
|
|||
cairo_meta_surface_t *meta = abstract_surface;
|
||||
cairo_command_paint_t *command;
|
||||
|
||||
/* An optimisation that takes care to not replay what was done
|
||||
* before surface is cleared. We don't erase recorded commands
|
||||
* since we may have earlier snapshots of this surface. */
|
||||
if (op == CAIRO_OPERATOR_CLEAR && !meta->is_clipped)
|
||||
meta->replay_start_idx = meta->commands.num_elements;
|
||||
|
||||
command = malloc (sizeof (cairo_command_paint_t));
|
||||
if (command == NULL)
|
||||
return CAIRO_STATUS_NO_MEMORY;
|
||||
|
|
@ -264,6 +258,12 @@ _cairo_meta_surface_paint (void *abstract_surface,
|
|||
if (status)
|
||||
goto CLEANUP_SOURCE;
|
||||
|
||||
/* An optimisation that takes care to not replay what was done
|
||||
* before surface is cleared. We don't erase recorded commands
|
||||
* since we may have earlier snapshots of this surface. */
|
||||
if (op == CAIRO_OPERATOR_CLEAR && !meta->is_clipped)
|
||||
meta->replay_start_idx = meta->commands.num_elements;
|
||||
|
||||
return CAIRO_STATUS_SUCCESS;
|
||||
|
||||
CLEANUP_SOURCE:
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue