mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2024-09-19 09:17:38 +03:00
WebContent: Print a warning if GPU painting is enabled but not supported
This commit is contained in:
parent
ea81470fc0
commit
8fc5c8b7df
Notes:
sideshowbarker
2024-07-17 05:02:42 +09:00
Author: https://github.com/trflynn89 Commit: https://github.com/SerenityOS/serenity/commit/8fc5c8b7df Pull-request: https://github.com/SerenityOS/serenity/pull/22117
@ -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);
|
||||
|
Loading…
Reference in New Issue
Block a user