mirror of
https://github.com/RGBCube/serenity
synced 2025-05-14 09:14:58 +00:00
WebContent: Print a warning if GPU painting is enabled but not supported
This commit is contained in:
parent
ea81470fc0
commit
8fc5c8b7df
1 changed files with 7 additions and 0 deletions
|
@ -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…
Add table
Add a link
Reference in a new issue