Bug 1061241 - Unref our LocalMatrixShader when building our mask SkPaint r=mattwoodrow
☠☠ backed out by 83828ef2601e ☠ ☠
authorGeorge Wright <george@mozilla.com>
Tue, 02 Sep 2014 15:18:15 -0400
changeset 203306 89f1659784384020de65414437fda7636cd3dd46
parent 203305 547076d4a357727f9d882580a49d29927a0b95fa
child 203307 1d03b29bd1051408b89a0037e83cc256e55ace81
push id27425
push userryanvm@gmail.com
push dateWed, 03 Sep 2014 20:38:59 +0000
treeherdermozilla-central@acbdce59da2f [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersmattwoodrow
bugs1061241
milestone35.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 1061241 - Unref our LocalMatrixShader when building our mask SkPaint r=mattwoodrow
gfx/2d/DrawTargetSkia.cpp
--- a/gfx/2d/DrawTargetSkia.cpp
+++ b/gfx/2d/DrawTargetSkia.cpp
@@ -580,17 +580,17 @@ DrawTargetSkia::MaskSurface(const Patter
   } else {
     SkPaint maskPaint;
     TempBitmap tmpBitmap;
     SetPaintPattern(maskPaint, SurfacePattern(aMask, ExtendMode::CLAMP), tmpBitmap);
 
     SkMatrix transform = maskPaint.getShader()->getLocalMatrix();
     transform.postTranslate(SkFloatToScalar(aOffset.x), SkFloatToScalar(aOffset.y));
     SkShader* matrixShader = SkShader::CreateLocalMatrixShader(maskPaint.getShader(), transform);
-    maskPaint.setShader(matrixShader);
+    SkSafeUnref(maskPaint.setShader(matrixShader));
 
     SkLayerRasterizer::Builder builder;
     builder.addLayer(maskPaint);
     SkAutoTUnref<SkRasterizer> raster(builder.detachRasterizer());
     paint.mPaint.setRasterizer(raster.get());
 
     IntSize size = aMask->GetSize();
     Rect rect = Rect(aOffset.x, aOffset.y, size.width, size.height);