Bug 981627 - Glyph surface with ARGB format might not be a true color glyph. r=jrmuizel, a=lsblakk
authorJonathan Kew <jkew@mozilla.com>
Mon, 24 Mar 2014 14:35:43 +0000
changeset 191670 1e80ec83f5b320dbdcf5a9400d508effd07281f7
parent 191669 81e476d9599c88511528853a2c6597a3da2811d8
child 191671 8e92bb5cb712986be5e0cda4a653fea6fa3c3a81
push id3503
push userraliiev@mozilla.com
push dateMon, 28 Apr 2014 18:51:11 +0000
treeherdermozilla-beta@c95ac01e332e [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersjrmuizel, lsblakk
bugs981627
milestone30.0a2
Bug 981627 - Glyph surface with ARGB format might not be a true color glyph. r=jrmuizel, a=lsblakk
gfx/cairo/cairo/src/cairo-image-surface.c
--- a/gfx/cairo/cairo/src/cairo-image-surface.c
+++ b/gfx/cairo/cairo/src/cairo-image-surface.c
@@ -4004,17 +4004,19 @@ static cairo_status_t
 	    y1 = y;
 	    if (y1 < extents->y)
 		y1 = extents->y;
 	    y2 = y + glyph_surface->height;
 	    if (y2 > extents->y + extents->height)
 		y2 = extents->y + extents->height;
 
 	    if (glyph_surface->format == CAIRO_FORMAT_A8 ||
-	        glyph_surface->format == CAIRO_FORMAT_A1)
+	        glyph_surface->format == CAIRO_FORMAT_A1 ||
+	        (glyph_surface->format == CAIRO_FORMAT_ARGB32 &&
+	         pixman_image_get_component_alpha (glyph_surface->pixman_image)))
 	    {
 		if (unlikely (src == NULL)) {
 		    if (pattern != NULL) {
 			src = _pixman_image_for_pattern (pattern, FALSE, extents, &src_x, &src_y);
 			src_x -= dst_x;
 			src_y -= dst_y;
 		    } else {
 			src = _pixman_white_image ();