mirror of
https://github.com/thorvg/thorvg.git
synced 2025-06-07 21:23:32 +00:00
sw_engine: properly set shared pool and don't flush memory pool
This commit is contained in:
parent
bb2cefe9bc
commit
bdb71f18db
2 changed files with 2 additions and 3 deletions
|
@ -325,8 +325,6 @@ bool SwRenderer::sync()
|
||||||
}
|
}
|
||||||
tasks.clear();
|
tasks.clear();
|
||||||
|
|
||||||
if (!sharedMpool) mpoolClear(mpool);
|
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -796,6 +794,7 @@ SwRenderer::SwRenderer()
|
||||||
if (TaskScheduler::onthread()) {
|
if (TaskScheduler::onthread()) {
|
||||||
TVGLOG("SW_RENDERER", "Running on a non-dominant thread!, Renderer(%p)", this);
|
TVGLOG("SW_RENDERER", "Running on a non-dominant thread!, Renderer(%p)", this);
|
||||||
mpool = mpoolInit(threadsCnt);
|
mpool = mpoolInit(threadsCnt);
|
||||||
|
sharedMpool = false;
|
||||||
} else {
|
} else {
|
||||||
mpool = globalMpool;
|
mpool = globalMpool;
|
||||||
sharedMpool = true;
|
sharedMpool = true;
|
||||||
|
|
|
@ -77,7 +77,7 @@ private:
|
||||||
Array<SwSurface*> compositors; //render targets cache list
|
Array<SwSurface*> compositors; //render targets cache list
|
||||||
SwMpool* mpool; //private memory pool
|
SwMpool* mpool; //private memory pool
|
||||||
RenderRegion vport; //viewport
|
RenderRegion vport; //viewport
|
||||||
bool sharedMpool = true; //memory-pool behavior policy
|
bool sharedMpool; //memory-pool behavior policy
|
||||||
|
|
||||||
SwRenderer();
|
SwRenderer();
|
||||||
~SwRenderer();
|
~SwRenderer();
|
||||||
|
|
Loading…
Add table
Reference in a new issue