LibGfx: Remove unused GrayscaleBitmap class

This commit is contained in:
Andreas Kling 2024-06-21 08:16:21 +02:00 committed by Andreas Kling
parent 345ae18929
commit d3a8f9ba9a
Notes: sideshowbarker 2024-07-16 22:18:54 +09:00
6 changed files with 0 additions and 43 deletions

View file

@ -1,38 +0,0 @@
/*
* Copyright (c) 2023, MacDue <macdue@dueutil.tech>
*
* SPDX-License-Identifier: BSD-2-Clause
*/
#pragma once
#include "Size.h"
#include <AK/RefCounted.h>
#include <AK/RefPtr.h>
#include <AK/StringView.h>
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 {};
};
}

View file

@ -13,7 +13,6 @@
#include <LibGfx/Color.h> #include <LibGfx/Color.h>
#include <LibGfx/Forward.h> #include <LibGfx/Forward.h>
#include <LibGfx/Gradients.h> #include <LibGfx/Gradients.h>
#include <LibGfx/GrayscaleBitmap.h>
#include <LibGfx/LineStyle.h> #include <LibGfx/LineStyle.h>
#include <LibGfx/PaintStyle.h> #include <LibGfx/PaintStyle.h>
#include <LibGfx/Point.h> #include <LibGfx/Point.h>

View file

@ -7,7 +7,6 @@
#include <LibGfx/AntiAliasingPainter.h> #include <LibGfx/AntiAliasingPainter.h>
#include <LibGfx/Bitmap.h> #include <LibGfx/Bitmap.h>
#include <LibGfx/GrayscaleBitmap.h>
#include <LibWeb/HTML/BrowsingContext.h> #include <LibWeb/HTML/BrowsingContext.h>
#include <LibWeb/HTML/HTMLImageElement.h> #include <LibWeb/HTML/HTMLImageElement.h>
#include <LibWeb/Layout/CheckBox.h> #include <LibWeb/Layout/CheckBox.h>

View file

@ -15,7 +15,6 @@
#include <LibGfx/Color.h> #include <LibGfx/Color.h>
#include <LibGfx/Forward.h> #include <LibGfx/Forward.h>
#include <LibGfx/Gradients.h> #include <LibGfx/Gradients.h>
#include <LibGfx/GrayscaleBitmap.h>
#include <LibGfx/ImmutableBitmap.h> #include <LibGfx/ImmutableBitmap.h>
#include <LibGfx/PaintStyle.h> #include <LibGfx/PaintStyle.h>
#include <LibGfx/Palette.h> #include <LibGfx/Palette.h>

View file

@ -15,7 +15,6 @@
#include <LibGfx/Color.h> #include <LibGfx/Color.h>
#include <LibGfx/Forward.h> #include <LibGfx/Forward.h>
#include <LibGfx/Gradients.h> #include <LibGfx/Gradients.h>
#include <LibGfx/GrayscaleBitmap.h>
#include <LibGfx/ImmutableBitmap.h> #include <LibGfx/ImmutableBitmap.h>
#include <LibGfx/PaintStyle.h> #include <LibGfx/PaintStyle.h>
#include <LibGfx/Palette.h> #include <LibGfx/Palette.h>

View file

@ -15,7 +15,6 @@
#include <LibGfx/Color.h> #include <LibGfx/Color.h>
#include <LibGfx/Forward.h> #include <LibGfx/Forward.h>
#include <LibGfx/Gradients.h> #include <LibGfx/Gradients.h>
#include <LibGfx/GrayscaleBitmap.h>
#include <LibGfx/ImmutableBitmap.h> #include <LibGfx/ImmutableBitmap.h>
#include <LibGfx/PaintStyle.h> #include <LibGfx/PaintStyle.h>
#include <LibGfx/Palette.h> #include <LibGfx/Palette.h>