if (!(format == PIXMAN_a8r8g8b8 ||
format == PIXMAN_x8r8g8b8 ||
format == PIXMAN_a8b8g8r8 ||
format == PIXMAN_x8b8g8r8 ||
format == PIXMAN_b8g8r8a8 ||
format == PIXMAN_b8g8r8x8 ||
format == PIXMAN_r5g6b5 ||
format == PIXMAN_b5g6r5 ||
format == PIXMAN_a8))
{ returnFALSE;
}
case CAIRO_OPERATOR_SOURCE: return PIXMAN_OP_SRC; case CAIRO_OPERATOR_OVER: return PIXMAN_OP_OVER; case CAIRO_OPERATOR_IN: return PIXMAN_OP_IN; case CAIRO_OPERATOR_OUT: return PIXMAN_OP_OUT; case CAIRO_OPERATOR_ATOP: return PIXMAN_OP_ATOP;
case CAIRO_OPERATOR_DEST: return PIXMAN_OP_DST; case CAIRO_OPERATOR_DEST_OVER: return PIXMAN_OP_OVER_REVERSE; case CAIRO_OPERATOR_DEST_IN: return PIXMAN_OP_IN_REVERSE; case CAIRO_OPERATOR_DEST_OUT: return PIXMAN_OP_OUT_REVERSE; case CAIRO_OPERATOR_DEST_ATOP: return PIXMAN_OP_ATOP_REVERSE;
case CAIRO_OPERATOR_XOR: return PIXMAN_OP_XOR; case CAIRO_OPERATOR_ADD: return PIXMAN_OP_ADD; case CAIRO_OPERATOR_SATURATE: return PIXMAN_OP_SATURATE;
case CAIRO_OPERATOR_MULTIPLY: return PIXMAN_OP_MULTIPLY; case CAIRO_OPERATOR_SCREEN: return PIXMAN_OP_SCREEN; case CAIRO_OPERATOR_OVERLAY: return PIXMAN_OP_OVERLAY; case CAIRO_OPERATOR_DARKEN: return PIXMAN_OP_DARKEN; case CAIRO_OPERATOR_LIGHTEN: return PIXMAN_OP_LIGHTEN; case CAIRO_OPERATOR_COLOR_DODGE: return PIXMAN_OP_COLOR_DODGE; case CAIRO_OPERATOR_COLOR_BURN: return PIXMAN_OP_COLOR_BURN; case CAIRO_OPERATOR_HARD_LIGHT: return PIXMAN_OP_HARD_LIGHT; case CAIRO_OPERATOR_SOFT_LIGHT: return PIXMAN_OP_SOFT_LIGHT; case CAIRO_OPERATOR_DIFFERENCE: return PIXMAN_OP_DIFFERENCE; case CAIRO_OPERATOR_EXCLUSION: return PIXMAN_OP_EXCLUSION; case CAIRO_OPERATOR_HSL_HUE: return PIXMAN_OP_HSL_HUE; case CAIRO_OPERATOR_HSL_SATURATION: return PIXMAN_OP_HSL_SATURATION; case CAIRO_OPERATOR_HSL_COLOR: return PIXMAN_OP_HSL_COLOR; case CAIRO_OPERATOR_HSL_LUMINOSITY: return PIXMAN_OP_HSL_LUMINOSITY;
/* Now add the two results together */
TRACE ((stderr, "%s - ADD (src=%d/%p, mask=%d/%p, dst=%d/%p)\n",
__FUNCTION__,
src->base.unique_id, src->pixman_image,
mask->base.unique_id, mask->pixman_image,
dst->base.unique_id, dst->pixman_image));
pixman_image_composite32 (PIXMAN_OP_ADD,
src->pixman_image, mask->pixman_image, dst->pixman_image,
src_x, src_y,
mask_x, mask_y,
dst_x, dst_y,
width, height); #endif
return CAIRO_STATUS_SUCCESS;
}
static cairo_int_status_t
composite_boxes (void *_dst,
cairo_operator_t op,
cairo_surface_t *abstract_src,
cairo_surface_t *abstract_mask, int src_x, int src_y, int mask_x, int mask_y, int dst_x, int dst_y,
cairo_boxes_t *boxes, const cairo_rectangle_int_t *extents)
{
pixman_image_t *dst = to_pixman_image (_dst);
pixman_image_t *src = ((cairo_image_source_t *)abstract_src)->pixman_image;
pixman_image_t *mask = abstract_mask ? ((cairo_image_source_t *)abstract_mask)->pixman_image : NULL;
pixman_image_t *free_src = NULL; struct _cairo_boxes_chunk *chunk; int i;
/* XXX consider using a region? saves multiple prepare-composite */
TRACE ((stderr, "%s x %d\n", __FUNCTION__, boxes->num_boxes));
if (((cairo_surface_t *)_dst)->is_clear &&
(op == CAIRO_OPERATOR_SOURCE ||
op == CAIRO_OPERATOR_OVER ||
op == CAIRO_OPERATOR_ADD)) {
op = PIXMAN_OP_SRC;
} elseif (mask) { if (op == CAIRO_OPERATOR_CLEAR) { #if PIXMAN_HAS_OP_LERP
op = PIXMAN_OP_LERP_CLEAR; #else
free_src = src = _pixman_image_for_color (CAIRO_COLOR_WHITE); if (unlikely (src == NULL)) return _cairo_error (CAIRO_STATUS_NO_MEMORY);
op = PIXMAN_OP_OUT_REVERSE; #endif
} elseif (op == CAIRO_OPERATOR_SOURCE) { #if PIXMAN_HAS_OP_LERP
op = PIXMAN_OP_LERP_SRC; #else return CAIRO_INT_STATUS_UNSUPPORTED; #endif
} else {
op = _pixman_operator (op);
}
} else {
op = _pixman_operator (op);
}
for (chunk = &boxes->chunks; chunk; chunk = chunk->next) { for (i = 0; i < chunk->count; i++) { int x1 = _cairo_fixed_integer_part (chunk->base[i].p1.x); int y1 = _cairo_fixed_integer_part (chunk->base[i].p1.y); int x2 = _cairo_fixed_integer_part (chunk->base[i].p2.x); int y2 = _cairo_fixed_integer_part (chunk->base[i].p2.y);
void
_pixman_image_add_traps (pixman_image_t *image, int dst_x, int dst_y,
cairo_traps_t *traps)
{
cairo_trapezoid_t *t = traps->traps; int num_traps = traps->num_traps; while (num_traps--) {
pixman_trapezoid_t trap;
/* top/bottom will be clamped to surface bounds */
trap.top = _cairo_fixed_to_16_16 (t->top);
trap.bottom = _cairo_fixed_to_16_16 (t->bottom);
/* However, all the other coordinates will have been left untouched so * as not to introduce numerical error. Recompute them if they * exceed the 16.16 limits.
*/ if (unlikely (line_exceeds_16_16 (&t->left))) {
project_line_x_onto_16_16 (&t->left, t->top, t->bottom, &trap.left);
trap.left.p1.y = trap.top;
trap.left.p2.y = trap.bottom;
} else {
trap.left.p1.x = _cairo_fixed_to_16_16 (t->left.p1.x);
trap.left.p1.y = _cairo_fixed_to_16_16 (t->left.p1.y);
trap.left.p2.x = _cairo_fixed_to_16_16 (t->left.p2.x);
trap.left.p2.y = _cairo_fixed_to_16_16 (t->left.p2.y);
}
/* pixman doesn't eliminate self-intersecting trapezoids/edges */
status = _cairo_bentley_ottmann_tessellate_traps (traps,
CAIRO_FILL_RULE_WINDING); if (status != CAIRO_INT_STATUS_SUCCESS) return status;
/* Special case adding trapezoids onto a mask surface; we want to avoid * creating an intermediate temporary mask unnecessarily. * * We make the assumption here that the portion of the trapezoids * contained within the surface is bounded by [dst_x,dst_y,width,height]; * the Cairo core code passes bounds based on the trapezoid extents.
*/
format = antialias == CAIRO_ANTIALIAS_NONE ? PIXMAN_a1 : PIXMAN_a8; if (dst->pixman_format == format &&
(abstract_src == NULL ||
(op == CAIRO_OPERATOR_ADD && src->is_opaque_solid)))
{
_pixman_image_add_traps (dst->pixman_image, dst_x, dst_y, traps); return CAIRO_STATUS_SUCCESS;
}
/* This call can actually end up recursing, so we have to * drop the mutex around it.
*/
CAIRO_MUTEX_UNLOCK (_cairo_glyph_cache_mutex);
status = _cairo_scaled_glyph_lookup (info->font, index,
CAIRO_SCALED_GLYPH_INFO_SURFACE,
NULL, /* foreground color */
&scaled_glyph);
CAIRO_MUTEX_LOCK (_cairo_glyph_cache_mutex);
/* round glyph locations to the nearest pixel */ /* XXX: FRAGILE: We're ignoring device_transform scaling here. A bug? */
x = _cairo_lround (info->glyphs[0].x -
glyph_surface->base.device_transform.x0);
y = _cairo_lround (info->glyphs[0].y -
glyph_surface->base.device_transform.y0);
pixman_image_composite32 (_pixman_operator (op),
((cairo_image_source_t *)_src)->pixman_image,
glyph_surface->pixman_image,
to_pixman_image (_dst),
x + src_x, y + src_y,
0, 0,
x - dst_x, y - dst_y,
glyph_surface->width,
glyph_surface->height);
return CAIRO_INT_STATUS_SUCCESS;
}
static cairo_int_status_t
composite_glyphs_via_mask (void *_dst,
cairo_operator_t op,
cairo_surface_t *_src, int src_x, int src_y, int dst_x, int dst_y,
cairo_composite_glyphs_info_t *info)
{
cairo_scaled_glyph_t *glyph_cache[64];
pixman_image_t *white = _pixman_image_for_color (CAIRO_COLOR_WHITE);
cairo_scaled_glyph_t *scaled_glyph;
uint8_t buf[2048];
pixman_image_t *mask;
pixman_format_code_t format;
cairo_status_t status; int i;
TRACE ((stderr, "%s\n", __FUNCTION__));
if (unlikely (white == NULL)) return _cairo_error (CAIRO_STATUS_NO_MEMORY);
/* XXX convert the glyphs to common formats a8/a8r8g8b8 to hit * optimised paths through pixman. Should we increase the bit * depth of the target surface, we should reconsider the appropriate * mask formats.
*/
status = _cairo_scaled_glyph_lookup (info->font,
info->glyphs[0].index,
CAIRO_SCALED_GLYPH_INFO_SURFACE,
NULL, /* foreground color */
&scaled_glyph); if (unlikely (status)) {
pixman_image_unref (white); return status;
}
format = PIXMAN_a8;
i = (info->extents.width + 3) & ~3; if (scaled_glyph->surface->base.content & CAIRO_CONTENT_COLOR) {
format = PIXMAN_a8r8g8b8;
i = info->extents.width * 4;
}
status = CAIRO_STATUS_SUCCESS; for (i = 0; i < info->num_glyphs; i++) { unsignedlong glyph_index = info->glyphs[i].index; int cache_index = glyph_index % ARRAY_LENGTH (glyph_cache);
cairo_image_surface_t *glyph_surface; int x, y;
scaled_glyph = glyph_cache[cache_index]; if (scaled_glyph == NULL ||
_cairo_scaled_glyph_index (scaled_glyph) != glyph_index)
{
status = _cairo_scaled_glyph_lookup (info->font, glyph_index,
CAIRO_SCALED_GLYPH_INFO_SURFACE,
NULL, /* foreground color */
&scaled_glyph);
static cairo_status_t
_cairo_image_bounded_opaque_spans (void *abstract_renderer, int y, int height, const cairo_half_open_span_t *spans, unsigned num_spans)
{
cairo_image_span_renderer_t *r = abstract_renderer;
if (num_spans == 0) return CAIRO_STATUS_SUCCESS;
do { if (spans[0].coverage)
pixman_image_compositor_blt (r->compositor,
spans[0].x, y,
spans[1].x - spans[0].x, height,
spans[0].coverage);
spans++;
} while (--num_spans > 1);
return CAIRO_STATUS_SUCCESS;
}
static cairo_status_t
_cairo_image_bounded_spans (void *abstract_renderer, int y, int height, const cairo_half_open_span_t *spans, unsigned num_spans)
{
cairo_image_span_renderer_t *r = abstract_renderer;
if (num_spans == 0) return CAIRO_STATUS_SUCCESS;
do { if (spans[0].coverage) {
pixman_image_compositor_blt (r->compositor,
spans[0].x, y,
spans[1].x - spans[0].x, height,
r->opacity * spans[0].coverage);
}
spans++;
} while (--num_spans > 1);
return CAIRO_STATUS_SUCCESS;
}
static cairo_status_t
_cairo_image_unbounded_spans (void *abstract_renderer, int y, int height, const cairo_half_open_span_t *spans, unsigned num_spans)
{
cairo_image_span_renderer_t *r = abstract_renderer;
color = &composite->source_pattern.solid.color; if (composite->op == CAIRO_OPERATOR_CLEAR)
color = CAIRO_COLOR_TRANSPARENT;
if (fill_reduces_to_source (composite->op, color, dst, &r->u.fill.pixel)) { /* Use plain C for the fill operations as the span length is * typically small, too small to payback the startup overheads of * using SSE2 etc.
*/ switch (PIXMAN_FORMAT_BPP(dst->pixman_format)) { case 8: r->base.render_rows = _fill8_spans; break; case 16: r->base.render_rows = _fill16_spans; break; case 32: r->base.render_rows = _fill32_spans; break; default: break;
}
r->u.fill.data = dst->data;
r->u.fill.stride = dst->stride;
}
} elseif ((composite->op == CAIRO_OPERATOR_SOURCE ||
(composite->op == CAIRO_OPERATOR_OVER &&
(dst->base.is_clear || (dst->base.content & CAIRO_CONTENT_ALPHA) == 0))) &&
composite->source_pattern.base.type == CAIRO_PATTERN_TYPE_SURFACE &&
composite->source_pattern.surface.surface->backend->type == CAIRO_SURFACE_TYPE_IMAGE &&
to_image_surface(composite->source_pattern.surface.surface)->format == dst->format)
{
cairo_image_surface_t *src =
to_image_surface(composite->source_pattern.surface.surface); int tx, ty;
#define ONE_HALF 0x7f #define RB_MASK 0x00ff00ff #define RB_ONE_HALF 0x007f007f #define RB_MASK_PLUS_ONE 0x01000100 #define G_SHIFT 8 staticinline uint32_t
mul8x2_8 (uint32_t a, uint8_t b)
{
uint32_t t = (a & RB_MASK) * b + RB_ONE_HALF; return ((t + ((t >> G_SHIFT) & RB_MASK)) >> G_SHIFT) & RB_MASK;
}
staticinline uint32_t
add8x2_8x2 (uint32_t a, uint32_t b)
{
uint32_t t = a + b;
t |= RB_MASK_PLUS_ONE - ((t >> G_SHIFT) & RB_MASK); return t & RB_MASK;
}
staticinline uint8_t
mul8_8 (uint8_t a, uint8_t b)
{
uint16_t t = a * (uint16_t)b + ONE_HALF; return ((t >> G_SHIFT) + t) >> G_SHIFT;
}
static cairo_status_t
_fill_a8_lerp_opaque_spans (void *abstract_renderer, int y, int h, const cairo_half_open_span_t *spans, unsigned num_spans)
{
cairo_image_span_renderer_t *r = abstract_renderer;
if (num_spans == 0) return CAIRO_STATUS_SUCCESS;
if (likely(h == 1)) {
uint8_t *d = r->u.fill.data + r->u.fill.stride*y; do {
uint8_t a = spans[0].coverage; if (a) { int len = spans[1].x - spans[0].x; if (a == 0xff) {
memset(d + spans[0].x, r->u.fill.pixel, len);
} else {
uint8_t s = mul8_8(a, r->u.fill.pixel);
uint8_t *dst = d + spans[0].x;
a = ~a; while (len-- > 0) {
uint8_t t = mul8_8(*dst, a);
*dst++ = t + s;
}
}
}
spans++;
} while (--num_spans > 1);
} else { do {
uint8_t a = spans[0].coverage; if (a) { int yy = y, hh = h; if (a == 0xff) { do { int len = spans[1].x - spans[0].x;
uint8_t *d = r->u.fill.data + r->u.fill.stride*yy + spans[0].x;
memset(d, r->u.fill.pixel, len);
yy++;
} while (--hh);
} else {
uint8_t s = mul8_8(a, r->u.fill.pixel);
a = ~a; do { int len = spans[1].x - spans[0].x;
uint8_t *d = r->u.fill.data + r->u.fill.stride*yy + spans[0].x; while (len-- > 0) {
uint8_t t = mul8_8(*d, a);
*d++ = t + s;
}
yy++;
} while (--hh);
}
}
spans++;
} while (--num_spans > 1);
}
return CAIRO_STATUS_SUCCESS;
}
static cairo_status_t
_fill_xrgb32_lerp_opaque_spans (void *abstract_renderer, int y, int h, const cairo_half_open_span_t *spans, unsigned num_spans)
{
cairo_image_span_renderer_t *r = abstract_renderer;
if (num_spans == 0) return CAIRO_STATUS_SUCCESS;
if (likely(h == 1)) { do {
uint8_t a = spans[0].coverage; if (a) { int len = spans[1].x - spans[0].x;
uint32_t *d = (uint32_t*)(r->u.fill.data + r->u.fill.stride*y + spans[0].x*4); if (a == 0xff) { if (len > 31) {
pixman_fill ((uint32_t *)r->u.fill.data, r->u.fill.stride / sizeof(uint32_t), 32,
spans[0].x, y, len, 1, r->u.fill.pixel);
} else {
uint32_t *d = (uint32_t*)(r->u.fill.data + r->u.fill.stride*y + spans[0].x*4); while (len-- > 0)
*d++ = r->u.fill.pixel;
}
} elsewhile (len-- > 0) {
*d = lerp8x4 (r->u.fill.pixel, a, *d);
d++;
}
}
spans++;
} while (--num_spans > 1);
} else { do {
uint8_t a = spans[0].coverage; if (a) { if (a == 0xff) { if (spans[1].x - spans[0].x > 16) {
pixman_fill ((uint32_t *)r->u.fill.data, r->u.fill.stride / sizeof(uint32_t), 32,
spans[0].x, y, spans[1].x - spans[0].x, h,
r->u.fill.pixel);
} else { int yy = y, hh = h; do { int len = spans[1].x - spans[0].x;
uint32_t *d = (uint32_t*)(r->u.fill.data + r->u.fill.stride*yy + spans[0].x*4); while (len-- > 0)
*d++ = r->u.fill.pixel;
yy++;
} while (--hh);
}
} else { int yy = y, hh = h; do { int len = spans[1].x - spans[0].x;
uint32_t *d = (uint32_t *)(r->u.fill.data + r->u.fill.stride*yy + spans[0].x*4); while (len-- > 0) {
*d = lerp8x4 (r->u.fill.pixel, a, *d);
d++;
}
yy++;
} while (--hh);
}
}
spans++;
} while (--num_spans > 1);
}
return CAIRO_STATUS_SUCCESS;
}
static cairo_status_t
_fill_a8_lerp_spans (void *abstract_renderer, int y, int h, const cairo_half_open_span_t *spans, unsigned num_spans)
{
cairo_image_span_renderer_t *r = abstract_renderer;
if (num_spans == 0) return CAIRO_STATUS_SUCCESS;
if (likely(h == 1)) { do {
uint8_t a = mul8_8 (spans[0].coverage, r->bpp); if (a) { int len = spans[1].x - spans[0].x;
uint8_t *d = r->u.fill.data + r->u.fill.stride*y + spans[0].x;
uint16_t p = (uint16_t)a * r->u.fill.pixel + 0x7f;
uint16_t ia = ~a; while (len-- > 0) {
uint16_t t = *d*ia + p;
*d++ = (t + (t>>8)) >> 8;
}
}
spans++;
} while (--num_spans > 1);
} else { do {
uint8_t a = mul8_8 (spans[0].coverage, r->bpp); if (a) { int yy = y, hh = h;
uint16_t p = (uint16_t)a * r->u.fill.pixel + 0x7f;
uint16_t ia = ~a; do { int len = spans[1].x - spans[0].x;
uint8_t *d = r->u.fill.data + r->u.fill.stride*yy + spans[0].x; while (len-- > 0) {
uint16_t t = *d*ia + p;
*d++ = (t + (t>>8)) >> 8;
}
yy++;
} while (--hh);
}
spans++;
} while (--num_spans > 1);
}
return CAIRO_STATUS_SUCCESS;
}
static cairo_status_t
_fill_xrgb32_lerp_spans (void *abstract_renderer, int y, int h, const cairo_half_open_span_t *spans, unsigned num_spans)
{
cairo_image_span_renderer_t *r = abstract_renderer;
if (num_spans == 0) return CAIRO_STATUS_SUCCESS;
if (likely(h == 1)) { do {
uint8_t a = mul8_8 (spans[0].coverage, r->bpp); if (a) { int len = spans[1].x - spans[0].x;
uint32_t *d = (uint32_t*)(r->u.fill.data + r->u.fill.stride*y + spans[0].x*4); while (len-- > 0) {
*d = lerp8x4 (r->u.fill.pixel, a, *d);
d++;
}
}
spans++;
} while (--num_spans > 1);
} else { do {
uint8_t a = mul8_8 (spans[0].coverage, r->bpp); if (a) { int yy = y, hh = h; do { int len = spans[1].x - spans[0].x;
uint32_t *d = (uint32_t *)(r->u.fill.data + r->u.fill.stride*yy + spans[0].x*4); while (len-- > 0) {
*d = lerp8x4 (r->u.fill.pixel, a, *d);
d++;
}
yy++;
} while (--hh);
}
spans++;
} while (--num_spans > 1);
}
return CAIRO_STATUS_SUCCESS;
}
static cairo_status_t
_blit_xrgb32_lerp_spans (void *abstract_renderer, int y, int h, const cairo_half_open_span_t *spans, unsigned num_spans)
{
cairo_image_span_renderer_t *r = abstract_renderer;
if (num_spans == 0) return CAIRO_STATUS_SUCCESS;
if (likely(h == 1)) {
uint8_t *src = r->u.blit.src_data + y*r->u.blit.src_stride;
uint8_t *dst = r->u.blit.data + y*r->u.blit.stride; do {
uint8_t a = mul8_8 (spans[0].coverage, r->bpp); if (a) {
uint32_t *s = (uint32_t*)src + spans[0].x;
uint32_t *d = (uint32_t*)dst + spans[0].x; int len = spans[1].x - spans[0].x; if (a == 0xff) { if (len == 1)
*d = *s; else
memcpy(d, s, len*4);
} else { while (len-- > 0) {
*d = lerp8x4 (*s, a, *d);
s++, d++;
}
}
}
spans++;
} while (--num_spans > 1);
} else { do {
uint8_t a = mul8_8 (spans[0].coverage, r->bpp); if (a) { int yy = y, hh = h; do {
uint32_t *s = (uint32_t *)(r->u.blit.src_data + yy*r->u.blit.src_stride + spans[0].x * 4);
uint32_t *d = (uint32_t *)(r->u.blit.data + yy*r->u.blit.stride + spans[0].x * 4); int len = spans[1].x - spans[0].x; if (a == 0xff) { if (len == 1)
*d = *s; else
memcpy(d, s, len * 4);
} else { while (len-- > 0) {
*d = lerp8x4 (*s, a, *d);
s++, d++;
}
}
yy++;
} while (--hh);
}
spans++;
} while (--num_spans > 1);
}
return CAIRO_STATUS_SUCCESS;
}
static cairo_status_t
_inplace_spans (void *abstract_renderer, int y, int h, const cairo_half_open_span_t *spans, unsigned num_spans)
{
cairo_image_span_renderer_t *r = abstract_renderer;
uint8_t *mask; int x0, x1;
if (composite->source_pattern.base.type == CAIRO_PATTERN_TYPE_SOLID) { const cairo_color_t *color;
color = &composite->source_pattern.solid.color; if (composite->op == CAIRO_OPERATOR_CLEAR)
color = CAIRO_COLOR_TRANSPARENT;
if (fill_reduces_to_source (composite->op, color, dst, &r->u.fill.pixel)) { /* Use plain C for the fill operations as the span length is * typically small, too small to payback the startup overheads of * using SSE2 etc.
*/ if (r->bpp == 0xff) { switch (dst->format) { case CAIRO_FORMAT_A8:
r->base.render_rows = _fill_a8_lerp_opaque_spans; break; case CAIRO_FORMAT_RGB24: case CAIRO_FORMAT_ARGB32:
r->base.render_rows = _fill_xrgb32_lerp_opaque_spans; break; case CAIRO_FORMAT_A1: case CAIRO_FORMAT_RGB16_565: case CAIRO_FORMAT_RGB30: case CAIRO_FORMAT_RGB96F: case CAIRO_FORMAT_RGBA128F: case CAIRO_FORMAT_INVALID: default: break;
}
} else { switch (dst->format) { case CAIRO_FORMAT_A8:
r->base.render_rows = _fill_a8_lerp_spans; break; case CAIRO_FORMAT_RGB24: case CAIRO_FORMAT_ARGB32:
r->base.render_rows = _fill_xrgb32_lerp_spans; break; case CAIRO_FORMAT_A1: case CAIRO_FORMAT_RGB16_565: case CAIRO_FORMAT_RGB30: case CAIRO_FORMAT_RGB96F: case CAIRO_FORMAT_RGBA128F: case CAIRO_FORMAT_INVALID: default: break;
}
}
r->u.fill.data = dst->data;
r->u.fill.stride = dst->stride;
}
} elseif ((dst->format == CAIRO_FORMAT_ARGB32 || dst->format == CAIRO_FORMAT_RGB24) &&
(composite->op == CAIRO_OPERATOR_SOURCE ||
(composite->op == CAIRO_OPERATOR_OVER &&
(dst->base.is_clear || (dst->base.content & CAIRO_CONTENT_ALPHA) == 0))) &&
composite->source_pattern.base.type == CAIRO_PATTERN_TYPE_SURFACE &&
composite->source_pattern.surface.surface->backend->type == CAIRO_SURFACE_TYPE_IMAGE &&
to_image_surface(composite->source_pattern.surface.surface)->format == dst->format)
{
cairo_image_surface_t *src =
to_image_surface(composite->source_pattern.surface.surface); int tx, ty;
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.