@ -30,6 +30,7 @@
# include <string.h> /* memcpy */
# include <string.h> /* memcpy */
# include <cairo.h>
# include <cairo.h>
# include "zalloc.h"
# include "weston-test-client-helper.h"
# include "weston-test-client-helper.h"
char * server_parameters = " --use-pixman --width=320 --height=240 " ;
char * server_parameters = " --use-pixman --width=320 --height=240 " ;
@ -92,9 +93,9 @@ load_surface_from_png(const char *fname)
}
}
/* Disguise the cairo surface in a weston test surface */
/* Disguise the cairo surface in a weston test surface */
reference = x zalloc( sizeof * reference ) ;
reference = zalloc ( sizeof * reference ) ;
if ( reference = = NULL ) {
if ( reference = = NULL ) {
perror ( " x zalloc reference" ) ;
perror ( " zalloc reference " ) ;
cairo_surface_destroy ( reference_cairo_surface ) ;
cairo_surface_destroy ( reference_cairo_surface ) ;
return NULL ;
return NULL ;
}
}
@ -114,9 +115,9 @@ load_surface_from_png(const char *fname)
/* Allocate new buffer for our weston reference, and copy the data from
/* Allocate new buffer for our weston reference, and copy the data from
the cairo surface so we can destroy it */
the cairo surface so we can destroy it */
reference - > data = x zalloc( source_data_size ) ;
reference - > data = zalloc ( source_data_size ) ;
if ( reference - > data = = NULL ) {
if ( reference - > data = = NULL ) {
perror ( " x zalloc reference data" ) ;
perror ( " zalloc reference data " ) ;
cairo_surface_destroy ( reference_cairo_surface ) ;
cairo_surface_destroy ( reference_cairo_surface ) ;
free ( reference ) ;
free ( reference ) ;
return NULL ;
return NULL ;
@ -143,7 +144,7 @@ static struct surface*
create_screenshot_surface ( struct client * client )
create_screenshot_surface ( struct client * client )
{
{
struct surface * screenshot ;
struct surface * screenshot ;
screenshot = x zalloc( sizeof * screenshot ) ;
screenshot = zalloc ( sizeof * screenshot ) ;
if ( screenshot = = NULL )
if ( screenshot = = NULL )
return NULL ;
return NULL ;
screenshot - > wl_buffer = create_shm_buffer ( client ,
screenshot - > wl_buffer = create_shm_buffer ( client ,