From f7874d03fcdbbc861dd3e7f326716af73cbcb06a Mon Sep 17 00:00:00 2001 From: Aliaksandr Kalenik Date: Sun, 12 Nov 2023 20:16:06 +0100 Subject: [PATCH] LibWeb: Remove redundant flush() call in PaintingCommandExecutorGPU Since we already call `Painter::flush()` in `PageHost::paint()` we do not need to do that again in `PaintingCommandExecutorGPU` destructor. This makes GPU painting run noticeably faster because `flush()` does expensive `glReadPixels()` call. --- .../Libraries/LibWeb/Painting/PaintingCommandExecutorGPU.cpp | 1 - 1 file changed, 1 deletion(-) diff --git a/Userland/Libraries/LibWeb/Painting/PaintingCommandExecutorGPU.cpp b/Userland/Libraries/LibWeb/Painting/PaintingCommandExecutorGPU.cpp index 0be0e0565a..c35e8623ec 100644 --- a/Userland/Libraries/LibWeb/Painting/PaintingCommandExecutorGPU.cpp +++ b/Userland/Libraries/LibWeb/Painting/PaintingCommandExecutorGPU.cpp @@ -15,7 +15,6 @@ PaintingCommandExecutorGPU::PaintingCommandExecutorGPU(AccelGfx::Painter& painte PaintingCommandExecutorGPU::~PaintingCommandExecutorGPU() { - m_painter.flush(); } CommandResult PaintingCommandExecutorGPU::draw_glyph_run(Vector const& glyph_run, Color const& color)