mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 1117304 - Make sure the tile filter doesn't call CopyRect on surfaces with different formats. r=Bas
This commit is contained in:
parent
df12076373
commit
9995deb9d0
@ -1547,7 +1547,16 @@ FilterNodeTileSoftware::Render(const IntRect& aRect)
|
||||
return nullptr;
|
||||
}
|
||||
}
|
||||
MOZ_ASSERT(input->GetFormat() == target->GetFormat(), "different surface formats from the same input?");
|
||||
|
||||
if (input->GetFormat() != target->GetFormat()) {
|
||||
// Different rectangles of the input can have different formats. If
|
||||
// that happens, just convert everything to B8G8R8A8.
|
||||
target = FilterProcessing::ConvertToB8G8R8A8(target);
|
||||
input = FilterProcessing::ConvertToB8G8R8A8(input);
|
||||
if (MOZ2D_WARN_IF(!target) || MOZ2D_WARN_IF(!input)) {
|
||||
return nullptr;
|
||||
}
|
||||
}
|
||||
|
||||
CopyRect(input, target, srcRect - srcRect.TopLeft(), destRect.TopLeft() - aRect.TopLeft());
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user