diff --git a/AK/BitmapView.h b/AK/BitmapView.h index 6ae5ddeae6e..83108440127 100644 --- a/AK/BitmapView.h +++ b/AK/BitmapView.h @@ -362,6 +362,17 @@ public: static constexpr size_t max_size = 0xffffffff; + [[nodiscard]] bool operator==(BitmapView const& other) const + { + if (size() != other.size()) + return false; + for (size_t i = 0; i < size_in_bytes(); ++i) { + if (m_data[i] != other.m_data[i]) + return false; + } + return true; + } + protected: u8* m_data { nullptr }; size_t m_size { 0 };