Re: [patch] recording: recording_surface_copy dst and src are reversed

"Henry (Yu) Song - SISA" <[email protected]>
Newsgroups gmane.comp.lib.cairo
Message-ID <3955FA337689574EB32F94B12A7E6E9E246EE84E@sisaex01sj>
This patch should be combined with my previous patch to un-clear the snapshot recording surface after snapshot copies commands from its snapshot-of recording surface

Sorry for sending multiple patches on the same issue

Thanks

Henry


From bc1a8e62f3db8059cd649c735319ff5efdc67a9d Mon Sep 17 00:00:00 2001
From: Henry Song <[email protected]>
Date: Wed, 10 Oct 2012 11:33:52 -0700
Subject: [PATCH] recording: after copy from a recording surface to its
 snapshot, the snapshot surface is_clear should be FALSE

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

diff --git a/src/cairo-recording-surface.c b/src/cairo-recording-surface.c
index e297273..bdc3aa7 100644
--- a/src/cairo-recording-surface.c
+++ b/src/cairo-recording-surface.c
@@ -1446,6 +1446,8 @@ _cairo_recording_surface_snapshot (void *abstract_other)
 	cairo_surface_destroy (&surface->base);
 	return _cairo_surface_create_in_error (status);
     }
+    if (surface->commands.num_elements != 0)
+	surface->base.is_clear = FALSE;
 
     return &surface->base;
 }
-- 
1.7.9.5
________________________________________
From: [email protected] [[email protected]] on behalf of Henry (Yu) Song - SISA [[email protected]]
Sent: Wednesday, October 10, 2012 9:47 AM
To: [email protected]
Subject: [cairo] [patch] recording: recording_surface_copy dst and src are      reversed

From 398b7b6f397ae7cd057aeeec107b01e103c9154d Mon Sep 17 00:00:00 2001
From: Henry Song <[email protected]>
Date: Wed, 10 Oct 2012 09:45:24 -0700
Subject: [PATCH] recording: recording_surface_copy reverses dst and src

---
 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 73fc48a..e297273 100644
--- a/src/cairo-recording-surface.c
+++ b/src/cairo-recording-surface.c
@@ -1441,7 +1441,7 @@ _cairo_recording_surface_snapshot (void *abstract_other)
     surface->optimize_clears = TRUE;

     _cairo_array_init (&surface->commands, sizeof (cairo_command_t *));
-    status = _cairo_recording_surface_copy (other, surface);
+    status = _cairo_recording_surface_copy (surface, other);
     if (unlikely (status)) {
        cairo_surface_destroy (&surface->base);
        return _cairo_surface_create_in_error (status);
--
1.7.9.5
--
cairo mailing list
[email protected]
http://lists.cairographics.org/mailman/listinfo/cairo
-- 
cairo mailing list
[email protected]
http://lists.cairographics.org/mailman/listinfo/cairo
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.