Bug 1385239 - Part 1. Correct the transform matix of the given draw target in nsFilterInstance::Render.
The translation vector in nsFilterInstance::mPaintTransform does not apply to
the transform matrix of the given draw target after the patches in
bug 1224207
landed. Most of time, we apply translation vector onto layer, so there is no
translation vector pass to this function, except drawing of indirect paint
objects, such as svg mask or pattern.
This patch is trying to fix it by bringing disappeared translation vector back.
MozReview-Commit-ID: 4rorOotGLD5
--- a/layout/svg/nsFilterInstance.cpp
+++ b/layout/svg/nsFilterInstance.cpp
@@ -485,16 +485,17 @@ nsFilterInstance::Render(DrawTarget* aDr
nsIntRect filterRect =
mPostFilterDirtyRegion.GetBounds().Intersect(OutputFilterSpaceBounds());
if (filterRect.IsEmpty() || mPaintTransform.IsSingular()) {
return;
}
AutoRestoreTransform autoRestoreTransform(aDrawTarget);
Matrix newTM =
+ Matrix::Translation(ToPoint(mPaintTransform.GetTranslation())) *
aDrawTarget->GetTransform().PreTranslate(filterRect.x, filterRect.y);
aDrawTarget->SetTransform(newTM);
ComputeNeededBoxes();
BuildSourceImage(aImgParams);
BuildSourcePaints(aImgParams);