mirror of
https://github.com/fergalmoran/ladybird.git
synced 2025-12-31 13:48:25 +00:00
LibGfx: Sync to_skia_color_type
This commit is contained in:
committed by
Alexander Kalenik
parent
66530086a4
commit
ed80e929e5
@@ -6,6 +6,7 @@
|
||||
|
||||
#include <LibGfx/ImmutableBitmap.h>
|
||||
#include <LibGfx/PaintingSurface.h>
|
||||
#include <LibGfx/SkiaUtils.h>
|
||||
|
||||
#include <core/SkBitmap.h>
|
||||
#include <core/SkImage.h>
|
||||
@@ -60,23 +61,6 @@ Color ImmutableBitmap::get_pixel(int x, int y) const
|
||||
return m_impl->source.get<NonnullRefPtr<Gfx::Bitmap>>()->get_pixel(x, y);
|
||||
}
|
||||
|
||||
static SkColorType to_skia_color_type(Gfx::BitmapFormat format)
|
||||
{
|
||||
switch (format) {
|
||||
case Gfx::BitmapFormat::Invalid:
|
||||
return kUnknown_SkColorType;
|
||||
case Gfx::BitmapFormat::BGRA8888:
|
||||
case Gfx::BitmapFormat::BGRx8888:
|
||||
return kBGRA_8888_SkColorType;
|
||||
case Gfx::BitmapFormat::RGBA8888:
|
||||
return kRGBA_8888_SkColorType;
|
||||
case Gfx::BitmapFormat::RGBx8888:
|
||||
return kRGB_888x_SkColorType;
|
||||
default:
|
||||
return kUnknown_SkColorType;
|
||||
}
|
||||
}
|
||||
|
||||
static SkAlphaType to_skia_alpha_type(Gfx::AlphaType alpha_type)
|
||||
{
|
||||
switch (alpha_type) {
|
||||
|
||||
Reference in New Issue
Block a user