1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-25 22:57:44 +00:00

LibWeb: Make sure painter's context is active before executing commands

In the upcoming changes, the AccelGfx context will be used for WebGL, so
we can no longer assume that the WebContent process has a single global
context.
This commit is contained in:
Aliaksandr Kalenik 2024-01-18 20:26:31 +01:00 committed by Andreas Kling
parent aac439edb1
commit c6289fad49
4 changed files with 13 additions and 0 deletions

View file

@ -448,6 +448,8 @@ void RecordingPainter::apply_scroll_offsets(Vector<Gfx::IntPoint> const& offsets
void RecordingPainter::execute(PaintingCommandExecutor& executor)
{
executor.prepare_to_execute();
if (executor.needs_prepare_glyphs_texture()) {
HashMap<Gfx::Font const*, HashTable<u32>> unique_glyphs;
for (auto& command_with_scroll_id : m_painting_commands) {