Bug 1437620 - Webrender: fallback on non-trivial text-combine-uprights. r=jrmuizel
authorAlexis Beingessner <a.beingessner@gmail.com>
Thu, 15 Feb 2018 10:21:03 -0500
changeset 404205 48056396963a0eaa51a2e7698dcf6be60eb1392a
parent 404204 c76cfa405b0e4b96e290d440cecdae8691f077de
child 404206 7c9182876dfd94e87587a6272aaa3d086e8ffd66
push id99968
push userrgurzau@mozilla.com
push dateFri, 16 Feb 2018 22:14:56 +0000
treeherdermozilla-inbound@2e16779c96cc [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersjrmuizel
bugs1437620
milestone60.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 1437620 - Webrender: fallback on non-trivial text-combine-uprights. r=jrmuizel MozReview-Commit-ID: ES2aeegmUcK
layout/generic/nsTextFrame.cpp
--- a/layout/generic/nsTextFrame.cpp
+++ b/layout/generic/nsTextFrame.cpp
@@ -5168,16 +5168,21 @@ nsDisplayText::RenderToContext(gfxContex
   NS_ASSERTION(mVisIEndEdge >= 0, "illegal end edge");
 
   gfxContextMatrixAutoSaveRestore matrixSR;
 
   nsPoint framePt = ToReferenceFrame();
   if (f->StyleContext()->IsTextCombined()) {
     float scaleFactor = GetTextCombineScaleFactor(f);
     if (scaleFactor != 1.0f) {
+      if (auto* textDrawer = aCtx->GetTextDrawer()) {
+        // WebRender doesn't support scaling text like this yet
+        textDrawer->FoundUnsupportedFeature();
+        return;
+      }
       matrixSR.SetContext(aCtx);
       // Setup matrix to compress text for text-combine-upright if
       // necessary. This is done here because we want selection be
       // compressed at the same time as text.
       gfxPoint pt = nsLayoutUtils::PointToGfxPoint(framePt, A2D);
       gfxMatrix mat = aCtx->CurrentMatrixDouble()
         .PreTranslate(pt).PreScale(scaleFactor, 1.0).PreTranslate(-pt);
       aCtx->SetMatrixDouble(mat);