mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 1060588: Use PushClipRect when possible in ClipToRegionInternal. r=jrmuizel
This commit is contained in:
parent
8ea600f53b
commit
2778731d55
@ -709,6 +709,12 @@ static void
|
||||
ClipToRegionInternal(DrawTarget* aTarget, const nsIntRegion& aRegion,
|
||||
bool aSnap)
|
||||
{
|
||||
if (!aRegion.IsComplex()) {
|
||||
nsIntRect rect = aRegion.GetBounds();
|
||||
aTarget->PushClipRect(Rect(rect.x, rect.y, rect.width, rect.height));
|
||||
return;
|
||||
}
|
||||
|
||||
RefPtr<Path> path = PathFromRegionInternal(aTarget, aRegion, aSnap);
|
||||
aTarget->PushClip(path);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user