From 8fc5c8b7dfc1f3fd75ef45025bfc9131f7589e73 Mon Sep 17 00:00:00 2001 From: Timothy Flynn Date: Fri, 1 Dec 2023 12:44:29 -0500 Subject: [PATCH] WebContent: Print a warning if GPU painting is enabled but not supported --- Userland/Services/WebContent/PageClient.cpp | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/Userland/Services/WebContent/PageClient.cpp b/Userland/Services/WebContent/PageClient.cpp index b16c1da3d7..681adaadd4 100644 --- a/Userland/Services/WebContent/PageClient.cpp +++ b/Userland/Services/WebContent/PageClient.cpp @@ -155,6 +155,13 @@ void PageClient::paint(Web::DevicePixelRect const& content_rect, Gfx::Bitmap& ta #ifdef HAS_ACCELERATED_GRAPHICS Web::Painting::PaintingCommandExecutorGPU painting_command_executor(target); recording_painter.execute(painting_command_executor); +#else + static bool has_warned_about_configuration = false; + + if (!has_warned_about_configuration) { + warnln("\033[31;1mConfigured to use GPU painter, but current platform does not have accelerated graphics\033[0m"); + has_warned_about_configuration = true; + } #endif } else { Web::Painting::PaintingCommandExecutorCPU painting_command_executor(target);