[cairo-commit] 2 commits - src/cairo-recording-surface.c
Chris Wilson
ickle at kemper.freedesktop.org
Thu Jul 28 09:24:02 PDT 2011
src/cairo-recording-surface.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
New commits:
commit ec74912eeeb08a32170bbbf3a83290f21171c730
Author: Chris Wilson <chris at chris-wilson.co.uk>
Date: Thu Jul 28 17:21:33 2011 +0100
record: Recording surfaces need an explicit clear
As a recording surface will be replayed onto a destination target, it is
unknown at the time of creation as to whether or not the target is
clear. So we need to make sure to record any initial clear in order
to replay that clear onto the destination. (If the destination is clear
anyway it will be suppressed.)
Signed-off-by: Chris Wilson <chris at chris-wilson.co.uk>
diff --git a/src/cairo-recording-surface.c b/src/cairo-recording-surface.c
index cb8d4fa..a0faf21 100644
--- a/src/cairo-recording-surface.c
+++ b/src/cairo-recording-surface.c
@@ -407,7 +407,7 @@ cairo_recording_surface_create (cairo_content_t content,
_cairo_array_init (&surface->commands, sizeof (cairo_command_t *));
surface->replay_start_idx = 0;
- surface->base.is_clear = TRUE;
+ surface->base.is_clear = FALSE;
surface->bbtree.left = surface->bbtree.right = NULL;
surface->bbtree.chain = INVALID_CHAIN;
commit 65e13cd20154f1f19b2d06ea7cf8779b0fb2158b
Author: Chris Wilson <chris at chris-wilson.co.uk>
Date: Thu Jul 28 17:16:25 2011 +0100
record: We can only skip the clear so long as we know the destination is clear
Signed-off-by: Chris Wilson <chris at chris-wilson.co.uk>
diff --git a/src/cairo-recording-surface.c b/src/cairo-recording-surface.c
index 5df5ee5..cb8d4fa 100644
--- a/src/cairo-recording-surface.c
+++ b/src/cairo-recording-surface.c
@@ -1239,7 +1239,7 @@ _cairo_recording_surface_replay_internal (cairo_recording_surface_t *surface,
if (unlikely (surface->base.finished))
return _cairo_error (CAIRO_STATUS_SURFACE_FINISHED);
- if (surface->base.is_clear)
+ if (surface->base.is_clear && target->is_clear)
return CAIRO_STATUS_SUCCESS;
assert (_cairo_surface_is_recording (&surface->base));
More information about the cairo-commit
mailing list