Bug 1631214 - Fix oriented image invalidation rectangle calculation when a Flip is present. r=tnikkel

Differential Revision: https://phabricator.services.mozilla.com/D75647
This commit is contained in:
Cameron McCormack 2020-05-15 23:43:42 +00:00
Родитель cac2780d42
Коммит d009767bb6
1 изменённых файлов: 4 добавлений и 1 удалений

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

@ -1914,7 +1914,10 @@ OrientedIntRect RasterImage::ToOriented(UnorientedIntRect aRect) const {
// negation of the given angle.
Angle angle = Orientation::InvertAngle(UsedOrientation().rotation);
Rotate(rect, size.ToUnknownSize(), angle);
Flip(rect, size.ToUnknownSize(), UsedOrientation().flip);
// Use mSize instead of size, since after the Rotate call, the size of the
// space that rect is in has had its width and height swapped.
Flip(rect, mSize.ToUnknownSize(), UsedOrientation().flip);
return OrientedIntRect::FromUnknownRect(rect);
}