Bug 950490 - Don't apply the transform twice when doing blurring in user-space. r=roc
authorMatt Woodrow <mwoodrow@mozilla.com>
Wed, 18 Dec 2013 14:58:21 +1300
changeset 160961 2babdc3bdb94a2c3b5814ca564176cdda50bb694
parent 160960 b643c662a65796afeeb16d0476ae2aae771ea230
child 160962 c867eb65bd5ebd688011dbef3529882ad5747dbc
push id25860
push usercbook@mozilla.com
push dateWed, 18 Dec 2013 11:34:10 +0000
treeherdermozilla-central@78f9ba2c0f02 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersroc
bugs950490
milestone29.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 950490 - Don't apply the transform twice when doing blurring in user-space. r=roc
layout/base/nsCSSRendering.cpp
--- a/layout/base/nsCSSRendering.cpp
+++ b/layout/base/nsCSSRendering.cpp
@@ -4857,16 +4857,18 @@ nsContextBoxBlur::BlurRectangle(gfxConte
   // Chrome/Skia always does the blurs in device space
   // and will sometimes get incorrect results (e.g. rotated blurs)
   gfxMatrix transform = aDestinationCtx->CurrentMatrix();
   // XXX: we could probably handle negative scales but for now it's easier just to fallback
   if (!transform.HasNonAxisAlignedTransform() && transform.xx > 0.0 && transform.yy > 0.0) {
     scaleX = transform.xx;
     scaleY = transform.yy;
     aDestinationCtx->IdentityMatrix();
+  } else {
+    transform = gfxMatrix();
   }
 
   gfxPoint blurStdDev = ComputeBlurStdDev(aBlurRadius, aAppUnitsPerDevPixel, scaleX, scaleY);
 
   gfxRect dirtyRect =
     nsLayoutUtils::RectToGfxRect(aDirtyRect, aAppUnitsPerDevPixel);
   dirtyRect.RoundOut();