Bug 1396474: When aSetTransform is false, do not rely on the current DT transform when returning the output transform. r=mattwoodrow

MozReview-Commit-ID: 8DbS6dzFVtp
This commit is contained in:
Bas Schouten 2017-09-05 15:13:40 +02:00
Родитель 0cbd965dd6
Коммит 41a643c958
1 изменённых файлов: 5 добавлений и 7 удалений

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

@ -302,18 +302,16 @@ RotatedContentBuffer::BorrowDrawTargetForQuadrantUpdate(const IntRect& aBounds,
IntRect quadrantRect = GetQuadrantRectangle(sideX, sideY);
NS_ASSERTION(quadrantRect.Contains(bounds), "Messed up quadrants");
mLoanedTransform = mLoanedDrawTarget->GetTransform();
Matrix transform = Matrix(mLoanedTransform)
.PreTranslate(-quadrantRect.x,
-quadrantRect.y);
if (aSetTransform) {
mLoanedTransform = mLoanedDrawTarget->GetTransform();
Matrix transform = Matrix(mLoanedTransform)
.PreTranslate(-quadrantRect.x,
-quadrantRect.y);
mLoanedDrawTarget->SetTransform(transform);
mSetTransform = true;
} else {
MOZ_ASSERT(aOutMatrix);
*aOutMatrix = transform;
*aOutMatrix = Matrix::Translation(-quadrantRect.x, -quadrantRect.y);
mSetTransform = false;
}