mirror of
https://github.com/thorvg/thorvg.git
synced 2025-06-14 20:14:37 +00:00
sw_engine: code refactoring
Some checks are pending
Android / build_x86_64 (push) Waiting to run
Android / build_aarch64 (push) Waiting to run
iOS / build_x86_64 (push) Waiting to run
iOS / build_arm64 (push) Waiting to run
macOS / build (push) Waiting to run
macOS / compact_test (push) Waiting to run
macOS / unit_test (push) Waiting to run
Ubuntu / build (push) Waiting to run
Ubuntu / compact_test (push) Waiting to run
Ubuntu / unit_test (push) Waiting to run
Windows / build (push) Waiting to run
Windows / compact_test (push) Waiting to run
Windows / unit_test (push) Waiting to run
Some checks are pending
Android / build_x86_64 (push) Waiting to run
Android / build_aarch64 (push) Waiting to run
iOS / build_x86_64 (push) Waiting to run
iOS / build_arm64 (push) Waiting to run
macOS / build (push) Waiting to run
macOS / compact_test (push) Waiting to run
macOS / unit_test (push) Waiting to run
Ubuntu / build (push) Waiting to run
Ubuntu / compact_test (push) Waiting to run
Ubuntu / unit_test (push) Waiting to run
Windows / build (push) Waiting to run
Windows / compact_test (push) Waiting to run
Windows / unit_test (push) Waiting to run
- removed a redundant code, sync() will take over. - deferred the sync as possible as later
This commit is contained in:
parent
ed93570756
commit
830db9ecb7
1 changed files with 7 additions and 13 deletions
|
@ -383,12 +383,6 @@ bool SwRenderer::postRender()
|
||||||
rasterUnpremultiply(surface);
|
rasterUnpremultiply(surface);
|
||||||
}
|
}
|
||||||
|
|
||||||
ARRAY_FOREACH(p, tasks) {
|
|
||||||
if ((*p)->disposed) delete(*p);
|
|
||||||
else (*p)->pushed = false;
|
|
||||||
}
|
|
||||||
tasks.clear();
|
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -718,13 +712,6 @@ void* SwRenderer::prepareCommon(SwTask* task, const Matrix& transform, const Arr
|
||||||
if (flags == RenderUpdateFlag::None) return task;
|
if (flags == RenderUpdateFlag::None) return task;
|
||||||
if ((transform.e11 == 0.0f && transform.e12 == 0.0f) || (transform.e21 == 0.0f && transform.e22 == 0.0f)) return task; //zero size?
|
if ((transform.e11 == 0.0f && transform.e12 == 0.0f) || (transform.e21 == 0.0f && transform.e22 == 0.0f)) return task; //zero size?
|
||||||
|
|
||||||
//TODO: Failed threading them. It would be better if it's possible.
|
|
||||||
//See: https://github.com/thorvg/thorvg/issues/1409
|
|
||||||
//Guarantee composition targets get ready.
|
|
||||||
ARRAY_FOREACH(p, clips) {
|
|
||||||
static_cast<SwTask*>(*p)->done();
|
|
||||||
}
|
|
||||||
|
|
||||||
task->surface = surface;
|
task->surface = surface;
|
||||||
task->mpool = mpool;
|
task->mpool = mpool;
|
||||||
task->bbox = RenderRegion::intersect(vport, {{0, 0}, {int32_t(surface->w), int32_t(surface->h)}});
|
task->bbox = RenderRegion::intersect(vport, {{0, 0}, {int32_t(surface->w), int32_t(surface->h)}});
|
||||||
|
@ -738,6 +725,13 @@ void* SwRenderer::prepareCommon(SwTask* task, const Matrix& transform, const Arr
|
||||||
tasks.push(task);
|
tasks.push(task);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//TODO: Failed threading them. It would be better if it's possible.
|
||||||
|
//See: https://github.com/thorvg/thorvg/issues/1409
|
||||||
|
//Guarantee composition targets get ready.
|
||||||
|
ARRAY_FOREACH(p, clips) {
|
||||||
|
static_cast<SwTask*>(*p)->done();
|
||||||
|
}
|
||||||
|
|
||||||
TaskScheduler::request(task);
|
TaskScheduler::request(task);
|
||||||
|
|
||||||
return task;
|
return task;
|
||||||
|
|
Loading…
Add table
Reference in a new issue