summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChris Wilson <chris@chris-wilson.co.uk>2013-02-12 10:24:08 +0000
committerChris Wilson <chris@chris-wilson.co.uk>2013-02-12 10:24:08 +0000
commitbe1561dadece6e947a3ca78d1124197b4278ce96 (patch)
treeb9dce441ecae42271bfc4eeef23e8d7d1feaf42d
parent14237f11439831377b59e8ea5717de5dd3e19e73 (diff)
recording: Avoid indirection through indices array if not reduced
If we don't discard any elements, then the index array is simply a 1:1 mapping of the element array, and we may as well bypass it. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
-rw-r--r--src/cairo-recording-surface.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/cairo-recording-surface.c b/src/cairo-recording-surface.c
index edbeed77..c6d34c0a 100644
--- a/src/cairo-recording-surface.c
+++ b/src/cairo-recording-surface.c
@@ -1654,7 +1654,7 @@ _cairo_recording_surface_replay_internal (cairo_recording_surface_t *surface,
if (extents.width < r->width || extents.height < r->height) {
num_elements =
_cairo_recording_surface_get_visible_commands (surface, &extents);
- use_indices = TRUE;
+ use_indices = num_elements != surface->commands.num_elements;
}
for (i = 0; i < num_elements; i++) {