Bug 703872 - Use different scale factors for X and Y when determining the resolution for transformed filter rendering. r=jwatt

This commit is contained in:
Markus Stange 2013-10-24 10:09:09 +02:00
parent f3a791c68e
commit b570e91848

View File

@ -221,16 +221,16 @@ nsAutoFilterInstance::nsAutoFilterInstance(nsIFrame *aTarget,
// nothing to draw
return;
}
float scale = nsSVGUtils::MaxExpansion(canvasTM);
filterRegion.Scale(scale);
gfxSize scale = canvasTM.ScaleFactors(true);
filterRegion.Scale(scale.width, scale.height);
filterRegion.RoundOut();
// We don't care if this overflows, because we can handle upscaling/
// downscaling to filterRes
bool overflow;
filterRes = nsSVGUtils::ConvertToSurfaceSize(filterRegion.Size(),
&overflow);
filterRegion.Scale(1.0 / scale);
filterRegion.Scale(1.0 / scale.width, 1.0 / scale.height);
}
// Get various transforms: