From f0a52760634bd3929440ad48295c44a2b7083f4d Mon Sep 17 00:00:00 2001 From: Sergey Bugaev Date: Thu, 3 Aug 2023 16:22:58 +0300 Subject: [PATCH] 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. --- Userland/Libraries/LibWebView/ViewImplementation.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Userland/Libraries/LibWebView/ViewImplementation.cpp b/Userland/Libraries/LibWebView/ViewImplementation.cpp index 63e67c2fcf..d6f154c6aa 100644 --- a/Userland/Libraries/LibWebView/ViewImplementation.cpp +++ b/Userland/Libraries/LibWebView/ViewImplementation.cpp @@ -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);