mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2024-09-29 08:11:13 +00:00
LibWeb: Skip AddMask in display list player if destination rect is empty
...because otherwise Skia will fail to allocate empty surface. Fixes crashing on https://null.com/games/chainstaff
This commit is contained in:
parent
a8f4ea5226
commit
9f4deb57c8
Notes:
github-actions[bot]
2024-08-06 20:17:05 +00:00
Author: https://github.com/kalenikaliaksandr Commit: https://github.com/LadybirdBrowser/ladybird/commit/9f4deb57c8b Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/995
|
@ -1280,6 +1280,9 @@ void DisplayListPlayerSkia::add_rounded_rect_clip(AddRoundedRectClip const& comm
|
|||
void DisplayListPlayerSkia::add_mask(AddMask const& command)
|
||||
{
|
||||
auto const& rect = command.rect;
|
||||
if (rect.is_empty())
|
||||
return;
|
||||
|
||||
auto mask_surface = m_surface->make_surface(rect.width(), rect.height());
|
||||
|
||||
auto previous_surface = move(m_surface);
|
||||
|
|
Loading…
Reference in a new issue