[cairo-commit] cairo/src cairo_font.c, 1.19, 1.20 cairo_surface.c,
1.32, 1.33
Carl Worth
commit at pdx.freedesktop.org
Fri May 28 12:47:02 PDT 2004
Committed by: cworth
Update of /cvs/cairo/cairo/src
In directory pdx:/tmp/cvs-serv30860
Modified Files:
cairo_font.c cairo_surface.c
Log Message:
* These two fixes are from David Reveman <c99drn at cs.umu.se>:
* src/cairo_surface.c (_cairo_surface_create_similar_scratch)
(_cairo_surface_create_similar_solid): Move NULL test from
create_similar_scratch to create_similar_solid.
* src/cairo_font.c (_cairo_glyph_surface_init): Fix for when
surface->backend != image->backend, but the backend does use
images for similar surfaces.
Index: cairo_font.c
===================================================================
RCS file: /cvs/cairo/cairo/src/cairo_font.c,v
retrieving revision 1.19
retrieving revision 1.20
diff -C2 -d -r1.19 -r1.20
*** a/cairo_font.c 24 May 2004 09:28:05 -0000 1.19
--- b/cairo_font.c 28 May 2004 19:47:00 -0000 1.20
***************
*** 282,288 ****
glyph_surface->size.width,
glyph_surface->size.height);
! if (glyph_surface->surface == NULL)
return;
!
status = _cairo_surface_set_image (glyph_surface->surface,
(cairo_image_surface_t *) image);
--- 282,290 ----
glyph_surface->size.width,
glyph_surface->size.height);
! if (glyph_surface->surface == NULL) {
! glyph_surface->surface = image;
return;
! }
!
status = _cairo_surface_set_image (glyph_surface->surface,
(cairo_image_surface_t *) image);
Index: cairo_surface.c
===================================================================
RCS file: /cvs/cairo/cairo/src/cairo_surface.c,v
retrieving revision 1.32
retrieving revision 1.33
diff -C2 -d -r1.32 -r1.33
*** a/cairo_surface.c 28 May 2004 19:37:15 -0000 1.32
--- b/cairo_surface.c 28 May 2004 19:47:00 -0000 1.33
***************
*** 61,75 ****
int height)
{
- cairo_surface_t *surface;
-
if (other == NULL)
return NULL;
! surface = other->backend->create_similar (other, format, drawable,
! width, height);
! if (surface == NULL)
! surface = cairo_image_surface_create (format, width, height);
!
! return surface;
}
--- 61,69 ----
int height)
{
if (other == NULL)
return NULL;
! return other->backend->create_similar (other, format, drawable,
! width, height);
}
***************
*** 104,107 ****
--- 98,105 ----
surface = _cairo_surface_create_similar_scratch (other, format, 1,
width, height);
+
+ if (surface == NULL)
+ surface = cairo_image_surface_create (format, width, height);
+
status = _cairo_surface_fill_rectangle (surface,
CAIRO_OPERATOR_SRC, color,
More information about the cairo-commit
mailing list