static unsigned int fz_shade_size(fz_shade *s) { if (s == NULL) return 0; if (s->type == FZ_FUNCTION_BASED) return sizeof(*s) + sizeof(float) * s->u.f.xdivs * s->u.f.ydivs * s->colorspace->n; return sizeof(*s) + fz_compressed_buffer_size(s->buffer); }
static size_t fz_shade_size(fz_context *ctx, fz_shade *s) { if (s == NULL) return 0; if (s->type == FZ_FUNCTION_BASED) return sizeof(*s) + sizeof(float) * s->u.f.xdivs * s->u.f.ydivs * fz_colorspace_n(ctx, s->colorspace); return sizeof(*s) + fz_compressed_buffer_size(s->buffer); }