mirror of
https://github.com/thorvg/thorvg.git
synced 2025-06-11 15:12:08 +00:00
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:
parent
c77ef98fef
commit
baee5ec767
2 changed files with 5 additions and 2 deletions
|
@ -451,7 +451,10 @@ uint32_t Paint::identifier() const noexcept
|
||||||
|
|
||||||
Result Paint::blend(BlendMethod method) 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;
|
return Result::Success;
|
||||||
}
|
}
|
||||||
|
|
|
@ -32,7 +32,7 @@ namespace tvg
|
||||||
using RenderData = void*;
|
using RenderData = void*;
|
||||||
using pixel_t = uint32_t;
|
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;
|
struct Surface;
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue