Bug 1304539 - Use AdjustedDrawTarget to draw text. r=mstange
☠☠ backed out by 37580f7e092f ☠ ☠
authorEthan Lin <ethlin@mozilla.com>
Fri, 23 Sep 2016 18:37:00 +0200
changeset 315823 f205f28cbcf3723aee0e302ea2ce7b71a00f4210
parent 315822 f8797c70734845bba0e918977e276f6b76e9769e
child 315824 fbfe71842bb7a17bed00854803f59f67e58c0afd
push id30757
push usercbook@mozilla.com
push dateFri, 30 Sep 2016 10:02:43 +0000
treeherdermozilla-central@5ffed033557e [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersmstange
bugs1304539
milestone52.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 1304539 - Use AdjustedDrawTarget to draw text. r=mstange
dom/canvas/CanvasRenderingContext2D.cpp
--- a/dom/canvas/CanvasRenderingContext2D.cpp
+++ b/dom/canvas/CanvasRenderingContext2D.cpp
@@ -3975,18 +3975,19 @@ struct MOZ_STACK_CLASS CanvasBidiProcess
 
     // Defer the tasks to gfxTextRun which will handle color/svg-in-ot fonts
     // appropriately.
     StrokeOptions strokeOpts;
     DrawOptions drawOpts;
     Style style = (mOp == CanvasRenderingContext2D::TextDrawOperation::FILL)
                     ? Style::FILL
                     : Style::STROKE;
+    AdjustedTarget target(mCtx);
     RefPtr<gfxContext> thebes =
-      gfxContext::CreatePreservingTransformOrNull(mCtx->mTarget);
+      gfxContext::CreatePreservingTransformOrNull(target);
     gfxTextRun::DrawParams params(thebes);
 
     if (mState->StyleIsColor(style)) { // Color
       nscolor fontColor = mState->colorStyles[style];
       if (style == Style::FILL) {
         params.context->SetColor(Color::FromABGR(fontColor));
       } else {
         params.textStrokeColor = fontColor;