Bug 1304353 - part 2 - Initialize font's DrawOptions from the textrun's options when painting, so we don't drop any opacity that has already been set. r=bas, a=ritu
authorJonathan Kew <jkew@mozilla.com>
Fri, 23 Sep 2016 13:38:06 +0100
changeset 357986 c0c615ba525b599947e497f31874caf75fda9998
parent 357985 130a83f1c885540bf15a8f755ca968d3bba656b9
child 357987 3a82ff00dbb82a18dc3eb000a9df86177e640323
push id1324
push usermtabara@mozilla.com
push dateMon, 16 Jan 2017 13:07:44 +0000
treeherdermozilla-release@a01c49833940 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersbas, ritu
bugs1304353
milestone51.0a2
Bug 1304353 - part 2 - Initialize font's DrawOptions from the textrun's options when painting, so we don't drop any opacity that has already been set. r=bas, a=ritu
gfx/thebes/gfxFont.cpp
--- a/gfx/thebes/gfxFont.cpp
+++ b/gfx/thebes/gfxFont.cpp
@@ -2017,16 +2017,20 @@ gfxFont::Draw(const gfxTextRun *aTextRun
                  "GLYPH_PATH cannot be used with GLYPH_FILL, GLYPH_STROKE or GLYPH_STROKE_UNDERNEATH");
 
     if (aStart >= aEnd) {
         return;
     }
 
     FontDrawParams fontParams;
 
+    if (aRunParams.drawOpts) {
+        fontParams.drawOptions = *aRunParams.drawOpts;
+    }
+
     fontParams.scaledFont = GetScaledFont(aRunParams.dt);
     if (!fontParams.scaledFont) {
         return;
     }
 
     fontParams.haveSVGGlyphs = GetFontEntry()->TryGetSVGData(this);
     fontParams.haveColorGlyphs = GetFontEntry()->TryGetColorGlyphs();
     fontParams.contextPaint = aRunParams.runContextPaint;