Bug 1403259 - TextDrawTarget: fallback on -webrender-text-stroke. r?jrmuizel draft
authorAlexis Beingessner <a.beingessner@gmail.com>
Tue, 26 Sep 2017 14:12:12 -0400
changeset 670707 30470f2f6fbfe2dac2eeea746bf819d780e14f68
parent 670404 bc56729898954e32d3a3731d03d178ed78924c33
child 733285 a94d7f49c24a5d29655232d2c28f2bcaf3264876
push id81685
push userbmo:a.beingessner@gmail.com
push dateTue, 26 Sep 2017 18:18:44 +0000
reviewersjrmuizel
bugs1403259
milestone58.0a1
Bug 1403259 - TextDrawTarget: fallback on -webrender-text-stroke. r?jrmuizel MozReview-Commit-ID: 9taTLk0RLQq
layout/generic/nsTextFrame.cpp
--- a/layout/generic/nsTextFrame.cpp
+++ b/layout/generic/nsTextFrame.cpp
@@ -7257,16 +7257,20 @@ DrawTextRun(const gfxTextRun* aTextRun,
     if (NS_GET_A(aParams.textColor) != 0 || textDrawer) {
       aParams.context->SetColor(Color::FromABGR(aParams.textColor));
     } else {
       params.drawMode = DrawMode::GLYPH_STROKE;
     }
 
     if ((NS_GET_A(aParams.textStrokeColor) != 0 || textDrawer) &&
         aParams.textStrokeWidth != 0.0f) {
+      if (textDrawer) {
+        textDrawer->FoundUnsupportedFeature();
+        return;
+      }
       StrokeOptions strokeOpts;
       params.drawMode |= DrawMode::GLYPH_STROKE;
       params.textStrokeColor = aParams.textStrokeColor;
       strokeOpts.mLineWidth = aParams.textStrokeWidth;
       params.strokeOpts = &strokeOpts;
       aTextRun->Draw(aRange, aTextBaselinePt, params);
     } else {
       aTextRun->Draw(aRange, aTextBaselinePt, params);