sw_engine: properly set shared pool and don't flush memory pool

This commit is contained in:
Hermet Park 2025-02-17 14:59:33 +09:00 committed by Hermet Park
parent bb2cefe9bc
commit bdb71f18db
2 changed files with 2 additions and 3 deletions

View file

@ -325,8 +325,6 @@ bool SwRenderer::sync()
}
tasks.clear();
if (!sharedMpool) mpoolClear(mpool);
return true;
}
@ -796,6 +794,7 @@ SwRenderer::SwRenderer()
if (TaskScheduler::onthread()) {
TVGLOG("SW_RENDERER", "Running on a non-dominant thread!, Renderer(%p)", this);
mpool = mpoolInit(threadsCnt);
sharedMpool = false;
} else {
mpool = globalMpool;
sharedMpool = true;

View file

@ -77,7 +77,7 @@ private:
Array<SwSurface*> compositors; //render targets cache list
SwMpool* mpool; //private memory pool
RenderRegion vport; //viewport
bool sharedMpool = true; //memory-pool behavior policy
bool sharedMpool; //memory-pool behavior policy
SwRenderer();
~SwRenderer();