[cairo-commit] 3 commits - src/cairo-gl-private.h src/cairo-tor-scan-converter.c src/cairo-xlib-render-compositor.c
Chris Wilson
ickle at kemper.freedesktop.org
Fri Oct 14 05:37:06 PDT 2011
src/cairo-gl-private.h | 4 ++--
src/cairo-tor-scan-converter.c | 7 +++++--
src/cairo-xlib-render-compositor.c | 6 ++++++
3 files changed, 13 insertions(+), 4 deletions(-)
New commits:
commit 10ebda8698425a23f07b3062233500ec22ebc347
Author: Chris Wilson <chris at chris-wilson.co.uk>
Date: Fri Oct 14 13:21:40 2011 +0100
xlib: Reduce the composite traps operator for when the dest is clear
Signed-off-by: Chris Wilson <chris at chris-wilson.co.uk>
diff --git a/src/cairo-xlib-render-compositor.c b/src/cairo-xlib-render-compositor.c
index 60d9984..4088281 100644
--- a/src/cairo-xlib-render-compositor.c
+++ b/src/cairo-xlib-render-compositor.c
@@ -1517,6 +1517,12 @@ composite_traps (void *abstract_dst,
//X_DEBUG ((display->display, "composite_trapezoids (dst=%x)", (unsigned int) dst->drawable));
+ if (dst->base.is_clear &&
+ (op == CAIRO_OPERATOR_OVER || op == CAIRO_OPERATOR_ADD))
+ {
+ op = CAIRO_OPERATOR_SOURCE;
+ }
+
pict_format =
_cairo_xlib_display_get_xrender_format (display,
antialias == CAIRO_ANTIALIAS_NONE ? CAIRO_FORMAT_A1 : CAIRO_FORMAT_A8);
commit a8c3a22f2d98d0d1e9fd182857222d304d83dc22
Author: Chris Wilson <chris at chris-wilson.co.uk>
Date: Fri Oct 14 13:14:14 2011 +0100
gl/msaa: Markup the new symbols as private for PLT hiding
Signed-off-by: Chris Wilson <chris at chris-wilson.co.uk>
diff --git a/src/cairo-gl-private.h b/src/cairo-gl-private.h
index ec7f8b2..cd7c8ae 100644
--- a/src/cairo-gl-private.h
+++ b/src/cairo-gl-private.h
@@ -504,12 +504,12 @@ cairo_private cairo_status_t
_cairo_gl_composite_begin_tristrip (cairo_gl_composite_t *setup,
cairo_gl_context_t **ctx_out);
-cairo_int_status_t
+cairo_private cairo_int_status_t
_cairo_gl_composite_emit_quad_as_tristrip (cairo_gl_context_t *ctx,
cairo_gl_composite_t *setup,
const cairo_point_t quad[4]);
-cairo_int_status_t
+cairo_private cairo_int_status_t
_cairo_gl_composite_emit_triangle_as_tristrip (cairo_gl_context_t *ctx,
cairo_gl_composite_t *setup,
const cairo_point_t triangle[3]);
commit e8dd13c8fa39c1e3118a4f197ee8865237be7e09
Author: Taekyun Kim <tkq.kim at samsung.com>
Date: Wed Oct 12 20:31:33 2011 +0900
image: Maximum number of spans can be upto (extents->width + 1)
The range of span's x coordinate is between xmin and xmax. So we
have to allocate the span array with size of xmax - xmin + 1.
diff --git a/src/cairo-tor-scan-converter.c b/src/cairo-tor-scan-converter.c
index b001bbd..d6ea778 100644
--- a/src/cairo-tor-scan-converter.c
+++ b/src/cairo-tor-scan-converter.c
@@ -1428,12 +1428,15 @@ glitter_scan_converter_reset(
int xmax, int ymax)
{
glitter_status_t status;
+ int max_num_spans;
converter->xmin = 0; converter->xmax = 0;
converter->ymin = 0; converter->ymax = 0;
- if (xmax - xmin > ARRAY_LENGTH(converter->spans_embedded)) {
- converter->spans = _cairo_malloc_ab (xmax - xmin,
+ max_num_spans = xmax - xmin + 1;
+
+ if (max_num_spans > ARRAY_LENGTH(converter->spans_embedded)) {
+ converter->spans = _cairo_malloc_ab (max_num_spans,
sizeof (cairo_half_open_span_t));
if (unlikely (converter->spans == NULL))
return _cairo_error (CAIRO_STATUS_NO_MEMORY);
More information about the cairo-commit
mailing list