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

Vladimir Vukicevic vladimir at kemper.freedesktop.org
Fri Mar 14 23:23:21 PDT 2008


 src/cairo-quartz-surface.c |    7 ++-----
 1 file changed, 2 insertions(+), 5 deletions(-)

New commits:
commit 0a8478ca1aa37695e84b4875e1efb3d93c7b8434
Author: Vladimir Vukicevic <vladimir at pobox.com>
Date:   Fri Mar 14 23:23:16 2008 -0700

    [quartz] don't say we forced subpixel AA when we didn't
    
    Whoops.  Net result was that this was disabling subpixel AA on
    contexts if CAIRO_ANTIALIAS_DEFAULT was being used.

diff --git a/src/cairo-quartz-surface.c b/src/cairo-quartz-surface.c
index 16b571f..257c5da 100644
--- a/src/cairo-quartz-surface.c
+++ b/src/cairo-quartz-surface.c
@@ -1841,7 +1841,7 @@ _cairo_quartz_surface_show_glyphs (void *abstract_surface,
     CGFontRef cgfref = NULL;
 
     cairo_bool_t isClipping = FALSE;
-    cairo_bool_t didForceFontSmoothing = TRUE;
+    cairo_bool_t didForceFontSmoothing = FALSE;
 
     if (IS_EMPTY(surface))
 	return CAIRO_STATUS_SUCCESS;
commit 028d352286991f7ec1da168f7f91bed6449f64e4
Author: Vladimir Vukicevic <vladimir at pobox.com>
Date:   Fri Mar 14 23:22:08 2008 -0700

    [quartz] compare gradient stops as doubles, not as fixed point
    
    We use the floating-point value later, and we can end up with weirdness
    such as negative colors due to the precision mismatch of our fixed
    point vs. floating point type.  So just do everything in floating
    point.

diff --git a/src/cairo-quartz-surface.c b/src/cairo-quartz-surface.c
index a96b0fb..16b571f 100644
--- a/src/cairo-quartz-surface.c
+++ b/src/cairo-quartz-surface.c
@@ -537,7 +537,6 @@ static void
 ComputeGradientValue (void *info, const float *in, float *out)
 {
     double fdist = *in;
-    cairo_fixed_t fdist_fix;
     cairo_gradient_pattern_t *grad = (cairo_gradient_pattern_t*) info;
     unsigned int i;
 
@@ -553,10 +552,8 @@ ComputeGradientValue (void *info, const float *in, float *out)
 	}
     }
 
-    fdist_fix = _cairo_fixed_from_double(fdist);
-
     for (i = 0; i < grad->n_stops; i++) {
-	if (grad->stops[i].x > fdist_fix)
+	if (_cairo_fixed_to_double (grad->stops[i].x) > fdist)
 	    break;
     }
 


More information about the cairo-commit mailing list