mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 1239137 - Return early from BasicCompositor::DrawQuad if transformBounds is empty. r=mattwoodrow
This commit is contained in:
parent
ef6a3d9855
commit
1d0822d24b
@ -352,7 +352,6 @@ BasicCompositor::DrawQuad(const gfx::Rect& aRect,
|
||||
// |dest| is a temporary surface.
|
||||
RefPtr<DrawTarget> dest = buffer;
|
||||
|
||||
buffer->PushClipRect(aClipRect);
|
||||
AutoRestoreTransform autoRestoreTransform(dest);
|
||||
|
||||
Matrix newTransform;
|
||||
@ -375,6 +374,10 @@ BasicCompositor::DrawQuad(const gfx::Rect& aRect,
|
||||
transformBounds = aTransform.TransformAndClipBounds(aRect, Rect(offset.x, offset.y, buffer->GetSize().width, buffer->GetSize().height));
|
||||
transformBounds.RoundOut();
|
||||
|
||||
if (transformBounds.IsEmpty()) {
|
||||
return;
|
||||
}
|
||||
|
||||
// Propagate the coordinate offset to our 2D draw target.
|
||||
newTransform = Matrix::Translation(transformBounds.x, transformBounds.y);
|
||||
|
||||
@ -383,6 +386,8 @@ BasicCompositor::DrawQuad(const gfx::Rect& aRect,
|
||||
new3DTransform = Matrix4x4::Translation(aRect.x, aRect.y, 0) * aTransform;
|
||||
}
|
||||
|
||||
buffer->PushClipRect(aClipRect);
|
||||
|
||||
newTransform.PostTranslate(-offset.x, -offset.y);
|
||||
buffer->SetTransform(newTransform);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user