summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorAdrian Johnson <ajohnson@redneon.com>2007-09-05 22:51:13 +0930
committerAdrian Johnson <ajohnson@redneon.com>2007-09-05 22:51:13 +0930
commit875e32178e5d990a09f3c41262d890888035f04f (patch)
tree2c511ddfd1265db55b2efc7a094cbcaee96fde67 /src
parentd24f019101dd014983aeb0bf186fe2011694e2ed (diff)
downloadcairo-875e32178e5d990a09f3c41262d890888035f04f.tar.gz
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.
Diffstat (limited to 'src')
-rw-r--r--src/cairo-meta-surface.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/cairo-meta-surface.c b/src/cairo-meta-surface.c
index 63f6a9c5e..e9635a298 100644
--- a/src/cairo-meta-surface.c
+++ b/src/cairo-meta-surface.c
@@ -251,12 +251,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;
@@ -273,6 +267,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: