renderer/paint: added a blend update flag.

Keep track of the update changes accurately.
We can utilize this value change in the backend engine.
This commit is contained in:
Hermet Park 2023-10-27 11:30:23 +09:00
parent 9b9889b228
commit d60b5b1721
2 changed files with 5 additions and 2 deletions

View file

@ -457,7 +457,10 @@ uint32_t Paint::identifier() const noexcept
Result Paint::blend(BlendMethod method) const noexcept
{
pImpl->blendMethod = method;
if (pImpl->blendMethod != method) {
pImpl->blendMethod = method;
pImpl->renderFlag |= RenderUpdateFlag::Blend;
}
return Result::Success;
}

View file

@ -32,7 +32,7 @@ namespace tvg
using RenderData = void*;
using pixel_t = uint32_t;
enum RenderUpdateFlag : uint8_t {None = 0, Path = 1, Color = 2, Gradient = 4, Stroke = 8, Transform = 16, Image = 32, GradientStroke = 64, All = 255};
enum RenderUpdateFlag : uint8_t {None = 0, Path = 1, Color = 2, Gradient = 4, Stroke = 8, Transform = 16, Image = 32, GradientStroke = 64, Blend = 128, All = 255};
struct Surface;