mirror of
https://github.com/thorvg/thorvg.git
synced 2025-06-16 04:54:39 +00:00
sw_engine: skip the rendering if possible.
zero scale would not produce any visible artifacts. we can skip the further processing sonner.
This commit is contained in:
parent
2257211852
commit
46d831ead7
1 changed files with 6 additions and 0 deletions
|
@ -741,6 +741,12 @@ void* SwRenderer::prepareCommon(SwTask* task, const RenderTransform* transform,
|
||||||
task->transform = nullptr;
|
task->transform = nullptr;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//zero size?
|
||||||
|
if (task->transform) {
|
||||||
|
if (task->transform->e11 == 0.0f && task->transform->e12 == 0.0f) return task; //zero width
|
||||||
|
if (task->transform->e21 == 0.0f && task->transform->e22 == 0.0f) return task; //zero height
|
||||||
|
}
|
||||||
|
|
||||||
task->opacity = opacity;
|
task->opacity = opacity;
|
||||||
task->surface = surface;
|
task->surface = surface;
|
||||||
task->mpool = mpool;
|
task->mpool = mpool;
|
||||||
|
|
Loading…
Add table
Reference in a new issue