[cairo-commit] 2 commits - src/cairo-quartz-surface.c src/cairo-surface.c
Chris Wilson
ickle at kemper.freedesktop.org
Mon Aug 10 09:44:49 PDT 2009
src/cairo-quartz-surface.c | 4 ++--
src/cairo-surface.c | 28 +++++++++++++++-------------
2 files changed, 17 insertions(+), 15 deletions(-)
New commits:
commit d4d0fcb4a8055f1fdd24fc5b7b64bb55d55e1485
Author: Andrea Canciani <ranma42 at gmail.com>
Date: Mon Aug 10 17:43:31 2009 +0100
[quartz] Compile fix for show_glyphs
Correct the prototype for _cairo_quartz_surface_show_glyphs().
diff --git a/src/cairo-quartz-surface.c b/src/cairo-quartz-surface.c
index f7b7acd..cc4a8ae 100644
--- a/src/cairo-quartz-surface.c
+++ b/src/cairo-quartz-surface.c
@@ -2052,8 +2052,8 @@ _cairo_quartz_surface_show_glyphs (void *abstract_surface,
cairo_glyph_t *glyphs,
int num_glyphs,
cairo_scaled_font_t *scaled_font,
- int *remaining_glyphs,
- cairo_clip_t *clip)
+ cairo_clip_t *clip,
+ int *remaining_glyphs)
{
CGAffineTransform textTransform, ctm;
#define STATIC_BUF_SIZE 64
commit 2a2a19457bb934f9585bfdb97730fab99c8e386c
Author: Chris Wilson <chris at chris-wilson.co.uk>
Date: Mon Aug 10 17:42:05 2009 +0100
[surface] Check for a NULL snapshot
The backend is permitted to return a NULL surface when snapshotting to
indicate that it cannot (or choses not to) implement the method.
diff --git a/src/cairo-surface.c b/src/cairo-surface.c
index 8c8b867..84a3012 100644
--- a/src/cairo-surface.c
+++ b/src/cairo-surface.c
@@ -1633,19 +1633,21 @@ _cairo_surface_snapshot (cairo_surface_t *surface)
if (surface->backend->snapshot != NULL) {
snapshot = surface->backend->snapshot (surface);
- if (unlikely (snapshot->status))
- return snapshot;
-
- /* Is this surface just a proxy - e.g. paginated surfaces? */
- if (snapshot->backend != surface->backend) {
- cairo_surface_t *previous;
-
- previous = _cairo_surface_has_snapshot (surface,
- snapshot->backend,
- snapshot->content);
- if (previous != NULL) {
- cairo_surface_destroy (snapshot);
- return cairo_surface_reference (previous);
+ if (snapshot != NULL) {
+ if (unlikely (snapshot->status))
+ return snapshot;
+
+ /* Is this surface just a proxy - e.g. paginated surfaces? */
+ if (snapshot->backend != surface->backend) {
+ cairo_surface_t *previous;
+
+ previous = _cairo_surface_has_snapshot (surface,
+ snapshot->backend,
+ snapshot->content);
+ if (previous != NULL) {
+ cairo_surface_destroy (snapshot);
+ return cairo_surface_reference (previous);
+ }
}
}
}
More information about the cairo-commit
mailing list