Преглед на файлове

LibGfx: Make Bitmap::has_alpha_channel() return true for RGBA8888

Andreas Kling преди 3 години
родител
ревизия
81216c51d1
променени са 1 файла, в които са добавени 1 реда и са изтрити 1 реда
  1. 1 1
      Userland/Libraries/LibGfx/Bitmap.h

+ 1 - 1
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&);