mirror of
https://github.com/izzy2lost/ppsspp.git
synced 2026-03-10 12:43:04 -07:00
softgpu: Use persistent bin task state.
It's constant, so it's better to avoid the copying and allocation. A small win, but removes new from the profile.
This commit is contained in:
@@ -105,7 +105,7 @@ bool ThreadManager::TeardownTask(Task *task, bool enqueue) {
|
||||
|
||||
if (task->Cancellable()) {
|
||||
task->Cancel();
|
||||
delete task;
|
||||
task->Release();
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -174,7 +174,7 @@ static void WorkerThreadFunc(GlobalThreadContext *global, ThreadContext *thread)
|
||||
// responsibility of the ThreadManager (although it could be!).
|
||||
if (task) {
|
||||
task->Run();
|
||||
delete task;
|
||||
task->Release();
|
||||
|
||||
// Reduce the queue size once complete.
|
||||
thread->queue_size--;
|
||||
|
||||
Reference in New Issue
Block a user