Bug 1287705 - Part 1. Do not paint text shadow while generating text mask. r=jfkthame
authorcku <cku@mozilla.com>
Tue, 19 Jul 2016 20:41:18 +0800
changeset 305773 14bb443d532d532a83e11d2f0f1f53e651f5fc62
parent 305772 77e960d65f6422b5c55d5c33e257066f59b5b8e1
child 305774 0f248b2827af1e35d1894462d89f59ee9eb53c39
push id79665
push usercbook@mozilla.com
push dateWed, 20 Jul 2016 09:36:22 +0000
treeherdermozilla-inbound@744232e7c04a [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersjfkthame
bugs1287705
milestone50.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1287705 - Part 1. Do not paint text shadow while generating text mask. r=jfkthame MozReview-Commit-ID: C3auIlugrFY
layout/generic/nsTextFrame.cpp
--- a/layout/generic/nsTextFrame.cpp
+++ b/layout/generic/nsTextFrame.cpp
@@ -6631,17 +6631,17 @@ nsTextFrame::PaintText(const PaintTextPa
                             : textPaintStyle.GetWebkitTextStrokeColor();
   if (aOpacity != 1.0f) {
     gfx::Color gfxColor = gfx::Color::FromABGR(textStrokeColor);
     gfxColor.a *= aOpacity;
     textStrokeColor = gfxColor.ToABGR();
   }
 
   range = Range(startOffset, startOffset + maxLength);
-  if (!aParams.callbacks) {
+  if (!aParams.callbacks && !aParams.generateTextMask) {
     const nsStyleText* textStyle = StyleText();
     PaintShadowParams shadowParams(aParams);
     shadowParams.range = range;
     shadowParams.textBaselinePt = textBaselinePt;
     shadowParams.leftSideOffset = snappedStartEdge;
     shadowParams.provider = &provider;
     shadowParams.foregroundColor = foregroundColor;
     shadowParams.clipEdges = &clipEdges;