From d3a8f9ba9a40b208e81b13a9c78791fca74c5997 Mon Sep 17 00:00:00 2001 From: Andreas Kling Date: Fri, 21 Jun 2024 08:16:21 +0200 Subject: [PATCH] LibGfx: Remove unused GrayscaleBitmap class --- Userland/Libraries/LibGfx/GrayscaleBitmap.h | 38 ------------------- Userland/Libraries/LibGfx/Painter.h | 1 - .../LibWeb/Painting/CheckBoxPaintable.cpp | 1 - Userland/Libraries/LibWeb/Painting/Command.h | 1 - .../Libraries/LibWeb/Painting/CommandList.h | 1 - .../LibWeb/Painting/RecordingPainter.h | 1 - 6 files changed, 43 deletions(-) delete mode 100644 Userland/Libraries/LibGfx/GrayscaleBitmap.h diff --git a/Userland/Libraries/LibGfx/GrayscaleBitmap.h b/Userland/Libraries/LibGfx/GrayscaleBitmap.h deleted file mode 100644 index a779c5a4cd6..00000000000 --- a/Userland/Libraries/LibGfx/GrayscaleBitmap.h +++ /dev/null @@ -1,38 +0,0 @@ -/* - * Copyright (c) 2023, MacDue - * - * SPDX-License-Identifier: BSD-2-Clause - */ - -#pragma once - -#include "Size.h" -#include -#include -#include - -namespace Gfx { - -class GrayscaleBitmap { -public: - GrayscaleBitmap() = delete; - constexpr GrayscaleBitmap(ReadonlyBytes data, unsigned width, unsigned height) - : m_data(data) - , m_size(width, height) - { - VERIFY(width * height == data.size()); - } - - constexpr u8 pixel_at(unsigned x, unsigned y) const { return m_data[y * width() + x]; } - constexpr ReadonlyBytes data() const { return m_data; } - - constexpr IntSize size() const { return m_size; } - constexpr unsigned width() const { return m_size.width(); } - constexpr unsigned height() const { return m_size.height(); } - -private: - ReadonlyBytes m_data {}; - IntSize m_size {}; -}; - -} diff --git a/Userland/Libraries/LibGfx/Painter.h b/Userland/Libraries/LibGfx/Painter.h index 20ac01d1420..a45749d6293 100644 --- a/Userland/Libraries/LibGfx/Painter.h +++ b/Userland/Libraries/LibGfx/Painter.h @@ -13,7 +13,6 @@ #include #include #include -#include #include #include #include diff --git a/Userland/Libraries/LibWeb/Painting/CheckBoxPaintable.cpp b/Userland/Libraries/LibWeb/Painting/CheckBoxPaintable.cpp index db42462d9ba..f5600e23089 100644 --- a/Userland/Libraries/LibWeb/Painting/CheckBoxPaintable.cpp +++ b/Userland/Libraries/LibWeb/Painting/CheckBoxPaintable.cpp @@ -7,7 +7,6 @@ #include #include -#include #include #include #include diff --git a/Userland/Libraries/LibWeb/Painting/Command.h b/Userland/Libraries/LibWeb/Painting/Command.h index 497ad417027..111124dfe83 100644 --- a/Userland/Libraries/LibWeb/Painting/Command.h +++ b/Userland/Libraries/LibWeb/Painting/Command.h @@ -15,7 +15,6 @@ #include #include #include -#include #include #include #include diff --git a/Userland/Libraries/LibWeb/Painting/CommandList.h b/Userland/Libraries/LibWeb/Painting/CommandList.h index c1f4b227443..89c34c26823 100644 --- a/Userland/Libraries/LibWeb/Painting/CommandList.h +++ b/Userland/Libraries/LibWeb/Painting/CommandList.h @@ -15,7 +15,6 @@ #include #include #include -#include #include #include #include diff --git a/Userland/Libraries/LibWeb/Painting/RecordingPainter.h b/Userland/Libraries/LibWeb/Painting/RecordingPainter.h index 667b03d8e62..f99917c8cbb 100644 --- a/Userland/Libraries/LibWeb/Painting/RecordingPainter.h +++ b/Userland/Libraries/LibWeb/Painting/RecordingPainter.h @@ -15,7 +15,6 @@ #include #include #include -#include #include #include #include