LibGfx: Make PaintingSurface::write_from_bitmap take a Bitmap const&

It makes it a little bit easier to distinguish which one of
read_into_bitmap and write_from_bitmap actually modify the Bitmap that
was passed to the method. NFC.
This commit is contained in:
Lucas CHOLLET 2024-12-01 23:45:32 -05:00 committed by Alexander Kalenik
parent 4d7b7178f9
commit 407aa629a0
Notes: github-actions[bot] 2024-12-05 16:17:53 +00:00
2 changed files with 2 additions and 2 deletions

View file

@ -85,7 +85,7 @@ void PaintingSurface::read_into_bitmap(Gfx::Bitmap& bitmap)
m_impl->surface->readPixels(pixmap, 0, 0);
}
void PaintingSurface::write_from_bitmap(Gfx::Bitmap& bitmap)
void PaintingSurface::write_from_bitmap(Gfx::Bitmap const& bitmap)
{
auto color_type = to_skia_color_type(bitmap.format());
auto alpha_type = bitmap.alpha_type() == Gfx::AlphaType::Premultiplied ? kPremul_SkAlphaType : kUnpremul_SkAlphaType;

View file

@ -32,7 +32,7 @@ public:
#endif
void read_into_bitmap(Bitmap&);
void write_from_bitmap(Bitmap&);
void write_from_bitmap(Bitmap const&);
void notify_content_will_change();