renderer: fix clipped clippers

Fast track was applied for clippers even if they
were also clipped. As a result their clips were
omitted.

@Issue: https://github.com/thorvg/thorvg/issues/2777
This commit is contained in:
Mira Grudzinska 2024-09-27 12:21:35 +02:00 committed by Hermet Park
parent 5453e8d82b
commit 310183972e

View file

@ -278,7 +278,7 @@ RenderData Paint::Impl::update(RenderMethod* renderer, const Matrix& pm, Array<R
if (this->clipper) { if (this->clipper) {
P(this->clipper)->ctxFlag &= ~ContextFlag::FastTrack; //reset P(this->clipper)->ctxFlag &= ~ContextFlag::FastTrack; //reset
viewport = renderer->viewport(); viewport = renderer->viewport();
if ((compFastTrack = _compFastTrack(renderer, this->clipper, pm, viewport)) == Result::Success) { if (!P(this->clipper)->clipper && (compFastTrack = _compFastTrack(renderer, this->clipper, pm, viewport)) == Result::Success) {
P(this->clipper)->ctxFlag |= ContextFlag::FastTrack; P(this->clipper)->ctxFlag |= ContextFlag::FastTrack;
} }
if (compFastTrack == Result::InsufficientCondition) { if (compFastTrack == Result::InsufficientCondition) {