Bug 1060951: Properly unset the transform when doing the custom blend in FinalizeDrawing. r=jrmuizel
authorBas Schouten <bschouten@mozilla.com>
Sun, 14 Sep 2014 23:51:29 +0200
changeset 205254 2c2c856713d2e56c71ea68da3b5c43bdb1179707
parent 205253 7f54f4539363a62ae77ba8fa24ea1fdf9342b90b
child 205255 3706401f8cc93082d68cc55db3a04a59086ba988
push id27483
push usercbook@mozilla.com
push dateMon, 15 Sep 2014 12:07:08 +0000
treeherdermozilla-central@77127f875559 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersjrmuizel
bugs1060951
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 1060951: Properly unset the transform when doing the custom blend in FinalizeDrawing. r=jrmuizel
gfx/2d/DrawTargetD2D1.cpp
--- a/gfx/2d/DrawTargetD2D1.cpp
+++ b/gfx/2d/DrawTargetD2D1.cpp
@@ -789,24 +789,24 @@ DrawTargetD2D1::FinalizeDrawing(Composit
     return;
   }
 
   RefPtr<ID2D1Image> image;
   mDC->GetTarget(byRef(image));
 
   mDC->SetTarget(mBitmap);
 
+  mDC->SetTransform(D2D1::IdentityMatrix());
+  mTransformDirty = true;
+
   if (patternSupported) {
     mDC->DrawImage(image, D2D1_INTERPOLATION_MODE_NEAREST_NEIGHBOR, D2DCompositionMode(aOp));
     return;
   }
 
-  mDC->SetTransform(D2D1::IdentityMatrix());
-  mTransformDirty = true;
-
   RefPtr<ID2D1Effect> radialGradientEffect;
 
   mDC->CreateEffect(CLSID_RadialGradientEffect, byRef(radialGradientEffect));
   const RadialGradientPattern *pat = static_cast<const RadialGradientPattern*>(&aPattern);
 
   radialGradientEffect->SetValue(RADIAL_PROP_STOP_COLLECTION,
                                  static_cast<const GradientStopsD2D*>(pat->mStops.get())->mStopCollection);
   radialGradientEffect->SetValue(RADIAL_PROP_CENTER_1, D2D1::Vector2F(pat->mCenter1.x, pat->mCenter1.y));