mirror of
https://gitlab.freedesktop.org/cairo/cairo.git
synced 2026-05-04 02:28:02 +02:00
[image] Trim image surface size by a few bytes
Convert an infrequently accessed series of cairo_bool_t and short enums to a common bitfield.
This commit is contained in:
parent
1f48b36933
commit
cfd2c73826
2 changed files with 10 additions and 8 deletions
|
|
@ -731,7 +731,7 @@ _cairo_image_surface_finish (void *abstract_surface)
|
|||
void
|
||||
_cairo_image_surface_assume_ownership_of_data (cairo_image_surface_t *surface)
|
||||
{
|
||||
surface->owns_data = 1;
|
||||
surface->owns_data = TRUE;
|
||||
}
|
||||
|
||||
static cairo_status_t
|
||||
|
|
@ -1064,10 +1064,11 @@ _cairo_image_surface_fill_rectangles (void *abstract_surface,
|
|||
|
||||
/* XXX: pixman_fill_rectangles() should be implemented */
|
||||
if (! pixman_image_fill_rectangles (_pixman_operator (op),
|
||||
surface->pixman_image,
|
||||
&pixman_color,
|
||||
num_rects,
|
||||
pixman_rects)) {
|
||||
surface->pixman_image,
|
||||
&pixman_color,
|
||||
num_rects,
|
||||
pixman_rects))
|
||||
{
|
||||
status = _cairo_error (CAIRO_STATUS_NO_MEMORY);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -835,9 +835,6 @@ struct _cairo_image_surface {
|
|||
pixman_format_code_t pixman_format;
|
||||
cairo_format_t format;
|
||||
unsigned char *data;
|
||||
cairo_bool_t owns_data;
|
||||
cairo_bool_t has_clip;
|
||||
cairo_image_transparency_t transparency;
|
||||
|
||||
int width;
|
||||
int height;
|
||||
|
|
@ -845,6 +842,10 @@ struct _cairo_image_surface {
|
|||
int depth;
|
||||
|
||||
pixman_image_t *pixman_image;
|
||||
|
||||
unsigned owns_data : 1;
|
||||
unsigned has_clip : 1;
|
||||
unsigned transparency : 2;
|
||||
};
|
||||
|
||||
extern const cairo_private cairo_surface_backend_t _cairo_image_surface_backend;
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue