Bug 1157984 - Part 3: Correct bounding box transformations to support projections and correct clipping when transforming behind the camera,r=vlad
- Update callsites of Matrix4x4::TransformBounds to use Matrix4x4::TransformAndClipBounds.
This commit is contained in:
@@ -761,14 +761,12 @@ Transform3D(RefPtr<SourceSurface> aSource,
|
||||
const Matrix4x4& aTransform,
|
||||
gfxRect& aDestRect)
|
||||
{
|
||||
// Find the transformed rectangle of our layer.
|
||||
gfxRect offsetRect = aBounds;
|
||||
offsetRect.TransformBounds(aTransform);
|
||||
|
||||
// Intersect the transformed layer with the destination rectangle.
|
||||
// Find the transformed rectangle of our layer, intersected with the
|
||||
// destination rectangle.
|
||||
// This is in device space since we have an identity transform set on aTarget.
|
||||
aDestRect = aDest->GetClipExtents();
|
||||
aDestRect.IntersectRect(aDestRect, offsetRect);
|
||||
aDestRect = ThebesRect(aTransform.TransformAndClipBounds(
|
||||
ToRectDouble(aBounds),
|
||||
ToRectDouble(aDest->GetClipExtents())));
|
||||
aDestRect.RoundOut();
|
||||
|
||||
// Create a surface the size of the transformed object.
|
||||
|
||||
Reference in New Issue
Block a user