1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-27 10:47:35 +00:00

LibAccelGfx: Premultiply linear gradient colors by alpha

With this change color blending for gradients matches CPU painter.
This commit is contained in:
Aliaksandr Kalenik 2023-11-29 12:53:49 +01:00 committed by Andreas Kling
parent be8952b89d
commit 707added91
3 changed files with 37 additions and 16 deletions

View file

@ -59,7 +59,13 @@ struct Framebuffer {
};
void set_viewport(Gfx::IntRect);
void enable_blending();
enum class BlendFactor {
One,
OneMinusSrcAlpha,
SrcAlpha,
};
void enable_blending(BlendFactor source, BlendFactor destination);
void read_pixels(Gfx::IntRect, Gfx::Bitmap&);