1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-27 06:37:44 +00:00

LibTTF: Propagate glyph bitmap allocation failure in rasterizer

This commit is contained in:
Andreas Kling 2021-07-19 20:47:29 +02:00
parent 7b3a4f8281
commit d8f435fa50

View file

@ -208,6 +208,8 @@ void Rasterizer::draw_path(Gfx::Path& path)
RefPtr<Gfx::Bitmap> Rasterizer::accumulate()
{
auto bitmap = Gfx::Bitmap::create(Gfx::BitmapFormat::BGRA8888, m_size);
if (!bitmap)
return {};
Color base_color = Color::from_rgb(0xffffff);
for (int y = 0; y < m_size.height(); y++) {
float accumulator = 0.0;