mirror of
https://github.com/thorvg/thorvg.git
synced 2025-06-10 06:34:01 +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
29590b373f
commit
c8a8bb5af4
2 changed files with 5 additions and 2 deletions
|
@ -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;
|
||||
}
|
||||
|
|
|
@ -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;
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue