mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2024-11-22 23:50:19 +00:00
LibGfx: Remove unused GrayscaleBitmap class
This commit is contained in:
parent
345ae18929
commit
d3a8f9ba9a
Notes:
sideshowbarker
2024-07-16 22:18:54 +09:00
Author: https://github.com/awesomekling Commit: https://github.com/LadybirdBrowser/ladybird/commit/d3a8f9ba9a Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/229
6 changed files with 0 additions and 43 deletions
|
@ -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 {};
|
|
||||||
};
|
|
||||||
|
|
||||||
}
|
|
|
@ -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>
|
||||||
|
|
|
@ -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>
|
||||||
|
|
|
@ -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>
|
||||||
|
|
|
@ -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>
|
||||||
|
|
|
@ -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>
|
||||||
|
|
Loading…
Reference in a new issue