1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-31 14:48:14 +00:00

LibWebView: Create BGRA bitmaps instead of BGRx

This helps the GTK version of Ladybird to import them into the GTK
rendering machinery, since GdkMemoryFormat supports BGRA and BGR, but
not BGRx.
This commit is contained in:
Sergey Bugaev 2023-08-03 16:22:58 +03:00 committed by Linus Groh
parent abd53a8719
commit f0a5276063

View file

@ -207,7 +207,7 @@ void ViewImplementation::resize_backing_stores_if_needed(WindowResizeInProgress
auto reallocate_backing_store_if_needed = [&](SharedBitmap& backing_store) {
if (!backing_store.bitmap || !backing_store.bitmap->size().contains(minimum_needed_size)) {
if (auto new_bitmap_or_error = Gfx::Bitmap::create_shareable(Gfx::BitmapFormat::BGRx8888, minimum_needed_size); !new_bitmap_or_error.is_error()) {
if (auto new_bitmap_or_error = Gfx::Bitmap::create_shareable(Gfx::BitmapFormat::BGRA8888, minimum_needed_size); !new_bitmap_or_error.is_error()) {
if (backing_store.bitmap)
client().async_remove_backing_store(backing_store.id);