From 81216c51d1e06ce68a192b3cec9db61ecec6c4b2 Mon Sep 17 00:00:00 2001 From: Andreas Kling Date: Mon, 14 Feb 2022 17:30:34 +0100 Subject: [PATCH] LibGfx: Make Bitmap::has_alpha_channel() return true for RGBA8888 --- Userland/Libraries/LibGfx/Bitmap.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Userland/Libraries/LibGfx/Bitmap.h b/Userland/Libraries/LibGfx/Bitmap.h index 398aaffb74..d6e58959c0 100644 --- a/Userland/Libraries/LibGfx/Bitmap.h +++ b/Userland/Libraries/LibGfx/Bitmap.h @@ -199,7 +199,7 @@ public: void fill(Color); - [[nodiscard]] bool has_alpha_channel() const { return m_format == BitmapFormat::BGRA8888; } + [[nodiscard]] bool has_alpha_channel() const { return m_format == BitmapFormat::BGRA8888 || m_format == BitmapFormat::RGBA8888; } [[nodiscard]] BitmapFormat format() const { return m_format; } void set_mmap_name(String const&);