[cairo-commit] 2 commits - src/cairo-pdf-interchange.c

GitLab Mirror gitlab-mirror at kemper.freedesktop.org
Mon Oct 2 05:49:55 UTC 2023


 src/cairo-pdf-interchange.c |    5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

New commits:
commit 95c8d5b1e025d9d1e77ee6c9d9b167edcdc7ce0d
Merge: 29592a331 0fce59ff8
Author: Adrian Johnson <ajohnson at redneon.com>
Date:   Mon Oct 2 05:49:53 2023 +0000

    Merge branch 'fix-tags-incorrect-surface' into 'master'
    
    Fix surface type mismatch error in pdf-interchange
    
    See merge request cairo/cairo!521

commit 0fce59ff8d250a59ccc86894b8f1459070bf6ddb
Author: Adrian Johnson <ajohnson at redneon.com>
Date:   Mon Oct 2 15:29:25 2023 +1030

    Fix surface type mismatch error in pdf-interchange

diff --git a/src/cairo-pdf-interchange.c b/src/cairo-pdf-interchange.c
index 2f97b081c..9d7aa42fd 100644
--- a/src/cairo-pdf-interchange.c
+++ b/src/cairo-pdf-interchange.c
@@ -52,6 +52,7 @@
 #include "cairo-array-private.h"
 #include "cairo-error-private.h"
 #include "cairo-output-stream-private.h"
+#include "cairo-recording-surface-inline.h"
 #include "cairo-recording-surface-private.h"
 #include "cairo-surface-snapshot-inline.h"
 
@@ -2071,7 +2072,9 @@ _cairo_pdf_interchange_struct_tree_requires_recording_surface (
     if (_cairo_surface_is_snapshot (recording_surface))
 	free_me = recording_surface = _cairo_surface_snapshot_get_target (recording_surface);
 
-    if (_cairo_recording_surface_has_tags (recording_surface)) {
+    if (_cairo_surface_is_recording (recording_surface) &&
+	_cairo_recording_surface_has_tags (recording_surface))
+    {
 	/* Check if tags are to be ignored in this source */
 	switch (source_type) {
 	    case CAIRO_ANALYSIS_SOURCE_PAINT:


More information about the cairo-commit mailing list