summaryrefslogtreecommitdiff
path: root/Userland/Libraries/LibWeb/HTML/ImageData.cpp
diff options
context:
space:
mode:
authorAndreas Kling <kling@serenityos.org>2021-03-16 11:48:42 +0100
committerAndreas Kling <kling@serenityos.org>2021-03-16 11:50:03 +0100
commite0f32626bcae634528327e43bcfa59c810c5a3ef (patch)
tree072c22a299de5df27324e9174818298b9d34845d /Userland/Libraries/LibWeb/HTML/ImageData.cpp
parent0bfdf95af6afa4ed32cea574eaec661b63263c94 (diff)
downloadserenity-e0f32626bcae634528327e43bcfa59c810c5a3ef.zip
LibGfx: Rename 32-bit BitmapFormats to BGRA8888 and BGRx888x
The previous names (RGBA32 and RGB32) were misleading since that's not the actual byte order in memory. The new names reflect exactly how the color values get laid out in bitmap data.
Diffstat (limited to 'Userland/Libraries/LibWeb/HTML/ImageData.cpp')
-rw-r--r--Userland/Libraries/LibWeb/HTML/ImageData.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/Userland/Libraries/LibWeb/HTML/ImageData.cpp b/Userland/Libraries/LibWeb/HTML/ImageData.cpp
index 81a76594ed..fd39fbf43d 100644
--- a/Userland/Libraries/LibWeb/HTML/ImageData.cpp
+++ b/Userland/Libraries/LibWeb/HTML/ImageData.cpp
@@ -46,7 +46,7 @@ RefPtr<ImageData> ImageData::create_with_size(JS::GlobalObject& global_object, i
auto data_handle = JS::make_handle(data);
- auto bitmap = Gfx::Bitmap::create_wrapper(Gfx::BitmapFormat::RGBA32, Gfx::IntSize(width, height), 1, width * sizeof(u32), (u32*)data->data());
+ auto bitmap = Gfx::Bitmap::create_wrapper(Gfx::BitmapFormat::BGRA8888, Gfx::IntSize(width, height), 1, width * sizeof(u32), (u32*)data->data());
if (!bitmap)
return nullptr;
return adopt(*new ImageData(bitmap.release_nonnull(), move(data_handle)));