Bug 958086 - Adjust matrix in gfxPattern::GetPattern for Moz2D. r=bas

The pattern transform was not taking in to account the transform
that was set on the draw target.
This commit is contained in:
Ali Akhtarzada 2014-01-10 08:48:56 -05:00
Родитель 93de71edaa
Коммит ec4c441fec
1 изменённых файлов: 4 добавлений и 1 удалений

Просмотреть файл

@ -179,8 +179,11 @@ gfxPattern::GetPattern(DrawTarget *aTarget, Matrix *aPatternTransform)
}
if (!mPattern) {
Matrix adjustedMatrix = mTransform;
if (aPatternTransform)
AdjustTransformForPattern(adjustedMatrix, aTarget->GetTransform(), aPatternTransform);
mGfxPattern = new (mSurfacePattern.addr())
SurfacePattern(mSourceSurface, ToExtendMode(mExtend), mTransform, mFilter);
SurfacePattern(mSourceSurface, ToExtendMode(mExtend), adjustedMatrix, mFilter);
return mGfxPattern;
}