From be1561dadece6e947a3ca78d1124197b4278ce96 Mon Sep 17 00:00:00 2001 From: Chris Wilson Date: Tue, 12 Feb 2013 10:24:08 +0000 Subject: 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 --- src/cairo-recording-surface.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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++) { -- cgit v1.2.3