[cairo-commit] Branch '1.12' - 2 commits - src/win32

Adrian Johnson ajohnson at kemper.freedesktop.org
Sun Sep 14 05:41:59 PDT 2014


 src/win32/cairo-win32-printing-surface.c |    9 ++++++++-
 1 file changed, 8 insertions(+), 1 deletion(-)

New commits:
commit 0bb3d8664544a7856735ea8f18ae181b6817a2d3
Author: Adrian Johnson <ajohnson at redneon.com>
Date:   Sun Sep 14 22:02:12 2014 +0930

    win32 printing: fix image scale when GDI scale is not identity

diff --git a/src/win32/cairo-win32-printing-surface.c b/src/win32/cairo-win32-printing-surface.c
index c0a096c..6005cb5 100644
--- a/src/win32/cairo-win32-printing-surface.c
+++ b/src/win32/cairo-win32-printing-surface.c
@@ -726,6 +726,7 @@ _cairo_win32_printing_surface_paint_image_pattern (cairo_win32_printing_surface_
     /* _cairo_pattern_set_matrix guarantees invertibility */
     assert (status == CAIRO_STATUS_SUCCESS);
 
+    cairo_matrix_multiply (&m, &m, &surface->ctm);
     cairo_matrix_multiply (&m, &m, &surface->gdi_ctm);
     SaveDC (surface->win32.dc);
     _cairo_matrix_to_win32_xform (&m, &xform);
commit 5243541f823d9348d3bc52a173e820834fd89b42
Author: Rodrigo Rivas Costa <rodrigorivascosta at gmail.com>
Date:   Tue Aug 19 00:09:50 2014 +0930

    win32 print: fix cache_frozen assertions
    
    Bug 81709

diff --git a/src/win32/cairo-win32-printing-surface.c b/src/win32/cairo-win32-printing-surface.c
index be91445..c0a096c 100644
--- a/src/win32/cairo-win32-printing-surface.c
+++ b/src/win32/cairo-win32-printing-surface.c
@@ -1578,14 +1578,18 @@ _cairo_win32_printing_surface_show_glyphs (void                 *abstract_surfac
 	 * CAIRO_INT_STATUS_UNSUPPORTED and a fallback image will be
 	 * used.
 	 */
+        _cairo_scaled_font_freeze_cache (scaled_font);
 	for (i = 0; i < num_glyphs; i++) {
 	    status = _cairo_scaled_glyph_lookup (scaled_font,
 						 glyphs[i].index,
 						 CAIRO_SCALED_GLYPH_INFO_PATH,
 						 &scaled_glyph);
 	    if (status)
-		return status;
+                break;
 	}
+        _cairo_scaled_font_thaw_cache (scaled_font);
+        if (status)
+            return status;
 
 	return _cairo_win32_printing_surface_analyze_operation (surface, op, source);
     }
@@ -1623,6 +1627,7 @@ _cairo_win32_printing_surface_show_glyphs (void                 *abstract_surfac
     old_has_ctm = surface->has_ctm;
     surface->has_ctm = TRUE;
     surface->path_empty = TRUE;
+    _cairo_scaled_font_freeze_cache (scaled_font);
     BeginPath (surface->win32.dc);
     for (i = 0; i < num_glyphs; i++) {
 	status = _cairo_scaled_glyph_lookup (scaled_font,
@@ -1636,6 +1641,7 @@ _cairo_win32_printing_surface_show_glyphs (void                 *abstract_surfac
 	status = _cairo_win32_printing_surface_emit_path (surface, scaled_glyph->path);
     }
     EndPath (surface->win32.dc);
+    _cairo_scaled_font_thaw_cache (scaled_font);
     surface->ctm = old_ctm;
     surface->has_ctm = old_has_ctm;
     if (status == CAIRO_STATUS_SUCCESS && surface->path_empty == FALSE) {


More information about the cairo-commit mailing list