mirror of
https://gitlab.freedesktop.org/cairo/cairo.git
synced 2026-04-22 09:20:45 +02:00
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>
This commit is contained in:
parent
14237f1143
commit
be1561dade
1 changed files with 1 additions and 1 deletions
|
|
@ -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++) {
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue