[cairo-commit] 2 commits - src/cairo-surface.c

GitLab Mirror gitlab-mirror at kemper.freedesktop.org
Mon Apr 25 05:15:54 UTC 2022


 src/cairo-surface.c |    8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

New commits:
commit cdcb67ef87790ab01c4f32a432f6bd47df0434e5
Merge: 083ff4b51 402edc71a
Author: Adrian Johnson <ajohnson at redneon.com>
Date:   Mon Apr 25 05:15:52 2022 +0000

    Merge branch 'fix-color-glyph-clear-surface' into 'master'
    
    Fix rendering of color glyphs on a clear surface
    
    Closes #539
    
    See merge request cairo/cairo!283

diff --cc src/cairo-surface.c
index a103f8cb2,018436350..ec10b2cfa
--- a/src/cairo-surface.c
+++ b/src/cairo-surface.c
@@@ -2668,12 -2666,11 +2668,12 @@@ composite_one_color_glyph (cairo_surfac
  
          pattern = cairo_pattern_create_for_surface ((cairo_surface_t *)glyph_surface);
          cairo_matrix_init_translate (&matrix, - x, - y);
 +	cairo_matrix_scale (&matrix, x_scale, y_scale);
          cairo_pattern_set_matrix (pattern, &matrix);
- 	if (op == CAIRO_OPERATOR_SOURCE || op == CAIRO_OPERATOR_CLEAR || !has_color)
- 	  status = surface->backend->mask (surface, op, pattern, pattern, clip);
- 	else
- 	  status = surface->backend->paint (surface, op, pattern, clip);
+         if (op == CAIRO_OPERATOR_SOURCE || op == CAIRO_OPERATOR_CLEAR || !has_color)
+           status = _cairo_surface_mask (surface, op, pattern, pattern, clip);
+         else
+           status = _cairo_surface_paint (surface, op, pattern, clip);
          cairo_pattern_destroy (pattern);
      }
  
commit 402edc71afb0c03ad7bf046b5d0abcdd8e0497df
Author: Matthias Clasen <mclasen at redhat.com>
Date:   Tue Feb 22 19:48:49 2022 -0500

    Fix rendering of color glyphs on a clear surface
    
    We were calling the backend vfuncs directly, thereby
    missing some of the surface state bookkeeping that
    is done in the wrappers.
    
    Fixes: #539

diff --git a/src/cairo-surface.c b/src/cairo-surface.c
index 46f39cb20..018436350 100644
--- a/src/cairo-surface.c
+++ b/src/cairo-surface.c
@@ -2667,10 +2667,10 @@ composite_one_color_glyph (cairo_surface_t       *surface,
         pattern = cairo_pattern_create_for_surface ((cairo_surface_t *)glyph_surface);
         cairo_matrix_init_translate (&matrix, - x, - y);
         cairo_pattern_set_matrix (pattern, &matrix);
-	if (op == CAIRO_OPERATOR_SOURCE || op == CAIRO_OPERATOR_CLEAR || !has_color)
-	  status = surface->backend->mask (surface, op, pattern, pattern, clip);
-	else
-	  status = surface->backend->paint (surface, op, pattern, clip);
+        if (op == CAIRO_OPERATOR_SOURCE || op == CAIRO_OPERATOR_CLEAR || !has_color)
+          status = _cairo_surface_mask (surface, op, pattern, pattern, clip);
+        else
+          status = _cairo_surface_paint (surface, op, pattern, clip);
         cairo_pattern_destroy (pattern);
     }
 


More information about the cairo-commit mailing list