mirror of
https://gitlab.freedesktop.org/cairo/cairo.git
synced 2026-05-05 12:18:01 +02:00
buffer-diff - check for any errors whilst writing the png
Propagate any errors from writing out the png.
This commit is contained in:
parent
79424fc646
commit
2f2bff038c
1 changed files with 3 additions and 2 deletions
|
|
@ -339,6 +339,7 @@ image_diff_core (const char *filename_a,
|
|||
|
||||
compare_surfaces (surface_a, surface_b, surface_diff, result);
|
||||
|
||||
status = CAIRO_STATUS_SUCCESS;
|
||||
if (result->pixels_changed) {
|
||||
FILE *png_file;
|
||||
|
||||
|
|
@ -347,7 +348,7 @@ image_diff_core (const char *filename_a,
|
|||
else
|
||||
png_file = stdout;
|
||||
|
||||
cairo_surface_write_to_png_stream (surface_diff, stdio_write_func, png_file);
|
||||
status = cairo_surface_write_to_png_stream (surface_diff, stdio_write_func, png_file);
|
||||
|
||||
if (png_file != stdout)
|
||||
fclose (png_file);
|
||||
|
|
@ -360,7 +361,7 @@ image_diff_core (const char *filename_a,
|
|||
cairo_surface_destroy (surface_b);
|
||||
cairo_surface_destroy (surface_diff);
|
||||
|
||||
return CAIRO_STATUS_SUCCESS;
|
||||
return status;
|
||||
}
|
||||
|
||||
cairo_status_t
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue