}
bool SkBlurMaskFilterImpl::filterMaskGPU(GrTexture* src,
- const SkMatrix& matrix,
+ const SkMatrix& ctm,
const SkRect& maskRect,
GrTexture** result,
bool canOverwriteSrc) const {
GrContext::AutoWideOpenIdentityDraw awo(context, NULL);
- // FIXME: This isn't the right matrix.
- SkScalar xformedSigma = this->computeXformedSigma(context->getMatrix());
+ SkScalar xformedSigma = this->computeXformedSigma(ctm);
SkASSERT(xformedSigma > 0);
// If we're doing a normal blur, we can clobber the pathTexture in the
draw.fClip->getBounds(),
fContext->getMatrix(),
&maskRect)) {
+ // The context's matrix may change while creating the mask, so save the CTM here to
+ // pass to filterMaskGPU.
+ const SkMatrix ctm = fContext->getMatrix();
+
SkIRect finalIRect;
maskRect.roundOut(&finalIRect);
if (draw.fClip->quickReject(finalIRect)) {
GrTexture* filtered;
if (paint.getMaskFilter()->filterMaskGPU(mask.texture(),
- fContext->getMatrix(), maskRect,
- &filtered, true)) {
+ ctm, maskRect, &filtered, true)) {
// filterMaskGPU gives us ownership of a ref to the result
SkAutoTUnref<GrTexture> atu(filtered);