Bug 1263685 - Check if paint has a shader before modifying local matrix in DrawTargetSkia::MaskSurface. r=mchang, a=ritu

This commit is contained in:
Lee Salzman 2016-04-11 22:16:57 -04:00
parent 7a4212e85c
commit a52202886b

View File

@ -665,7 +665,8 @@ DrawTargetSkia::MaskSurface(const Pattern &aSource,
return;
}
if (aOffset != Point(0, 0)) {
if (aOffset != Point(0, 0) &&
paint.mPaint.getShader()) {
SkMatrix transform;
transform.setTranslate(PointToSkPoint(-aOffset));
SkShader* matrixShader = paint.mPaint.getShader()->newWithLocalMatrix(transform);