[cairo-commit] cairo/src cairo_surface.c,1.15,1.16

Carl Worth commit at pdx.freedesktop.org
Tue Oct 28 12:13:37 PST 2003


Committed by: cworth

Update of /cvs/cairo/cairo/src
In directory pdx:/tmp/cvs-serv31354/src

Modified Files:
	cairo_surface.c 
Log Message:
Fix bug from previous commit. Must check for NULL backend function
pointers before calling them.

Index: cairo_surface.c
===================================================================
RCS file: /cvs/cairo/cairo/src/cairo_surface.c,v
retrieving revision 1.15
retrieving revision 1.16
diff -C2 -d -r1.15 -r1.16
*** cairo_surface.c	28 Oct 2003 02:40:55 -0000	1.15
--- cairo_surface.c	28 Oct 2003 20:13:35 -0000	1.16
***************
*** 346,357 ****
      cairo_int_status_t status;
  
!     status = dst->backend->composite (operator,
! 				      src, mask, dst,
! 				      src_x, src_y,
! 				      mask_x, mask_y,
! 				      dst_x, dst_y,
! 				      width, height);
!     if (status == CAIRO_STATUS_SUCCESS)
! 	return;
  
      _cairo_surface_pull_image (src);
--- 346,359 ----
      cairo_int_status_t status;
  
!     if (dst->backend->composite) {
! 	status = dst->backend->composite (operator,
! 					  src, mask, dst,
! 					  src_x, src_y,
! 					  mask_x, mask_y,
! 					  dst_x, dst_y,
! 					  width, height);
! 	if (status == CAIRO_STATUS_SUCCESS)
! 	    return;
!     }
  
      _cairo_surface_pull_image (src);
***************
*** 404,413 ****
  	return;
  
!     status = surface->backend->fill_rectangles (surface,
! 						operator,
! 						color,
! 						rects, num_rects);
!     if (status == CAIRO_STATUS_SUCCESS)
! 	return;
  
      ic_color.red   = color->red_short;
--- 406,417 ----
  	return;
  
!     if (surface->backend->fill_rectangles) {
! 	status = surface->backend->fill_rectangles (surface,
! 						    operator,
! 						    color,
! 						    rects, num_rects);
! 	if (status == CAIRO_STATUS_SUCCESS)
! 	    return;
!     }
  
      ic_color.red   = color->red_short;
***************
*** 436,445 ****
      cairo_int_status_t status;
  
!     status = dst->backend->composite_trapezoids (operator,
! 						 src, dst,
! 						 xSrc, ySrc,
! 						 traps, num_traps);
!     if (status == CAIRO_STATUS_SUCCESS)
! 	return;
  
      _cairo_surface_pull_image (src);
--- 440,451 ----
      cairo_int_status_t status;
  
!     if (dst->backend->composite_trapezoids) {
! 	status = dst->backend->composite_trapezoids (operator,
! 						     src, dst,
! 						     xSrc, ySrc,
! 						     traps, num_traps);
! 	if (status == CAIRO_STATUS_SUCCESS)
! 	    return;
!     }
  
      _cairo_surface_pull_image (src);





More information about the cairo-commit mailing list