[cairo-commit] 2 commits - src/cairo-image-compositor.c src/win32
Chris Wilson
ickle at kemper.freedesktop.org
Thu Feb 7 02:03:35 PST 2013
src/cairo-image-compositor.c | 12 ++++++++++--
src/win32/cairo-win32-device.c | 6 +++---
2 files changed, 13 insertions(+), 5 deletions(-)
New commits:
commit 4b6b28b5e8b9020c72a60b01ff3340a70dd59478
Author: Chris Wilson <chris at chris-wilson.co.uk>
Date: Thu Feb 7 10:00:47 2013 +0000
win32: Fix is_win98()
Since the translation into a separate function, its condition was
reversed: that is almost everybody thought they were on a win98 machine
and so had no working AlphaBlend().
Signed-off-by: Chris Wilson <chris at chris-wilson.co.uk>
diff --git a/src/win32/cairo-win32-device.c b/src/win32/cairo-win32-device.c
index b3ee573..741e49e 100644
--- a/src/win32/cairo-win32-device.c
+++ b/src/win32/cairo-win32-device.c
@@ -106,9 +106,9 @@ static cairo_bool_t is_win98 (void)
os.dwOSVersionInfoSize = sizeof (os);
GetVersionEx (&os);
- return (VER_PLATFORM_WIN32_WINDOWS != os.dwPlatformId &&
- os.dwMajorVersion != 4 &&
- os.dwMinorVersion != 10);
+ return (VER_PLATFORM_WIN32_WINDOWS == os.dwPlatformId &&
+ os.dwMajorVersion == 4 &&
+ os.dwMinorVersion == 10);
}
static void *
commit 4b54c09c056e5dee65f2cf4e87835eb9127e5b1c
Author: Chris Wilson <chris at chris-wilson.co.uk>
Date: Wed Feb 6 22:16:12 2013 +0000
image: Substitute OVER spans for SOURCE with an opaque pattern
Based on an idea from Ravi Nanjundappa
Signed-off-by: Chris Wilson <chris at chris-wilson.co.uk>
diff --git a/src/cairo-image-compositor.c b/src/cairo-image-compositor.c
index 150efdb..be3db98 100644
--- a/src/cairo-image-compositor.c
+++ b/src/cairo-image-compositor.c
@@ -2933,11 +2933,19 @@ span_renderer_init (cairo_abstract_span_renderer_t *_r,
op == CAIRO_OPERATOR_ADD)) {
op = PIXMAN_OP_SRC;
} else if (op == CAIRO_OPERATOR_SOURCE) {
+ if (_cairo_pattern_is_opaque (&composite->source_pattern.base,
+ &composite->source_sample_area))
+ {
+ op = PIXMAN_OP_OVER;
+ }
+ else
+ {
#if PIXMAN_HAS_OP_LERP
- op = PIXMAN_OP_LERP_SRC;
+ op = PIXMAN_OP_LERP_SRC;
#else
- return CAIRO_INT_STATUS_UNSUPPORTED;
+ return CAIRO_INT_STATUS_UNSUPPORTED;
#endif
+ }
} else {
op = _pixman_operator (op);
}
More information about the cairo-commit
mailing list