racket/draw Windows: patch Cairo for clipped DC surface creation

This commit is contained in:
Matthew Flatt 2014-09-25 15:13:59 -06:00
parent 9b4533bc3b
commit 116e06407b
4 changed files with 45 additions and 3 deletions

@ -1 +1 @@
Subproject commit 2648702ac3b6bb553573d330ac8ad6e0a00251b7
Subproject commit 4bc36e704d0ce4d84788e538ca49f71a8b73c07f

View File

@ -30,7 +30,7 @@ versions:
harfbuzz-0.9.27
fontconfig-2.11.1
freetype-2.5.3
pango-1.36.6 (current Windows and PPC binaries are 1.36.3)
pango-1.36.6 (current PPC binaries are 1.36.3)
poppler-0.24.5
mpfr-3.1.2
gmp-5.1.3

View File

@ -119,6 +119,9 @@
;; Enable "symbol" fonts, and fix off-by-one:
(define-runtime-path win32text-patch "patches/win32text.patch")
;; Fix a problem with a surface connected to a clipped drawing context
(define-runtime-path win32cairofallback-patch "patches/win32cairofallback.patch")
;; Needed when building with old GCC, such as 4.0:
(define-runtime-path gmp-weak-patch "patches/gmp-weak.patch")
@ -315,7 +318,8 @@
#:env path-flags
#:configure '("--enable-xlib=no")
#:patches (list cairo-coretext-patch
courier-new-patch))]
courier-new-patch
win32cairofallback-patch))]
[("harfbuzz") (config #:depends '("fontconfig" "freetype" "cairo")
#:configure '("--without-icu")
#:patches (if win?

View File

@ -0,0 +1,38 @@
From 844455c14f8e9e4767fd661e475a9c6fdea9d22e Mon Sep 17 00:00:00 2001
From: Massimo Valentini <mvalentini@src.gnome.org>
Date: Wed, 11 Sep 2013 18:10:38 +0200
Subject: [PATCH] Bug 53121 - My program runs successfully with...
Cairo-1.10.2, but getting SIGSEGV with 1.12.2.
---
src/win32/cairo-win32-display-surface.c | 8 ++++----
1 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/src/win32/cairo-win32-display-surface.c b/src/win32/cairo-win32-display-surface.c
index 5ecdbee..965f2c4 100644
--- a/cairo/src/win32/cairo-win32-display-surface.c
+++ b/cairo/src/win32/cairo-win32-display-surface.c
@@ -455,17 +455,17 @@ _cairo_win32_display_surface_map_to_image (void *abstract_sur
surface->fallback =
_cairo_win32_display_surface_create_for_dc (surface->win32.dc,
surface->win32.format,
- surface->win32.extents.width,
- surface->win32.extents.height);
+ surface->win32.extents.x + surface->win32.extents.width,
+ surface->win32.extents.y + surface->win32.extents.height);
if (unlikely (status = surface->fallback->status))
goto err;
if (!BitBlt (to_win32_surface(surface->fallback)->dc,
- 0, 0,
+ surface->win32.extents.x, surface->win32.extents.y,
surface->win32.extents.width,
surface->win32.extents.height,
surface->win32.dc,
- 0, 0,
+ surface->win32.extents.x, surface->win32.extents.y,
SRCCOPY)) {
status = _cairo_error (CAIRO_STATUS_DEVICE_ERROR);
goto err;
--
1.7.6.5