[cairo-commit] 2 commits - src/cairo-recording-surface.c

GitLab Mirror gitlab-mirror at kemper.freedesktop.org
Sat Jul 24 08:19:18 UTC 2021


 src/cairo-recording-surface.c |    4 ++++
 1 file changed, 4 insertions(+)

New commits:
commit 994eccefc0a778d291a8dbbb4143280b38a7ad80
Merge: d12e55672 2d488b359
Author: Adrian Johnson <ajohnson at redneon.com>
Date:   Sat Jul 24 08:19:16 2021 +0000

    Merge branch 'recording-playback-nothing-to-do' into 'master'
    
    Don't assert on NOTHING_TO_DO during recording replay.
    
    See merge request cairo/cairo!195

commit 2d488b35966af90474eed8fb2f8f1255cb7a1f88
Author: Jonathan Kew <jfkthame at gmail.com>
Date:   Thu Jul 8 15:33:50 2021 +0100

    Don't assert on NOTHING_TO_DO during recording replay.

diff --git a/src/cairo-recording-surface.c b/src/cairo-recording-surface.c
index a20e72d60..86caf9029 100644
--- a/src/cairo-recording-surface.c
+++ b/src/cairo-recording-surface.c
@@ -1993,6 +1993,10 @@ _cairo_recording_surface_replay_internal (cairo_recording_surface_t	*surface,
 	    ASSERT_NOT_REACHED;
 	}
 
+	/* It's possible that a degenerate clip caused the command to end up doing nothing when replayed. */
+	if (unlikely (status == CAIRO_INT_STATUS_NOTHING_TO_DO))
+	    status = CAIRO_INT_STATUS_SUCCESS;
+
 	if (type == CAIRO_RECORDING_CREATE_REGIONS && command->header.region != CAIRO_RECORDING_REGION_NATIVE) {
 	    if (status == CAIRO_INT_STATUS_SUCCESS) {
 		command->header.region = CAIRO_RECORDING_REGION_NATIVE;


More information about the cairo-commit mailing list