1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-25 15:17:36 +00:00

LibWeb: Clear texture allocated for stacking context painting

In OpenGL newly allocated texture has undefined initial state so we
need to clear it before stacking context painting.
This commit is contained in:
Aliaksandr Kalenik 2023-11-29 21:22:09 +01:00 committed by Andreas Kling
parent 24da32c884
commit 7a0191cbe9

View file

@ -106,6 +106,7 @@ CommandResult PaintingCommandExecutorGPU::push_stacking_context(float opacity, b
auto canvas = AccelGfx::Canvas::create(source_paintable_rect.size());
painter->set_target_canvas(canvas);
painter->translate(-source_paintable_rect.location().to_type<float>());
painter->clear(Color::Transparent);
auto source_rect = source_paintable_rect.to_type<float>().translated(-transform.origin);
auto transformed_destination_rect = affine_transform.map(source_rect).translated(transform.origin);