mirror of
https://github.com/hrydgard/ppsspp.git
synced 2026-11-15 02:29:51 +01:00
ThreadManager: Make TaskType a property of a Task.
This commit is contained in:
1 parent
f9bab64bdf
commit
8b5173350f
6 files changed
+30
-12
No files matched your search
@@ -785,6 +785,10 @@ public:
|
||||
ReplacedTextureTask(ReplacedTexture &tex, LimitedWaitable *w) : tex_(tex), waitable_(w) {
|
||||
}
|
||||
|
||||
TaskType Type() const override {
|
||||
return TaskType::IO_BLOCKING;
|
||||
}
|
||||
|
||||
void Run() override {
|
||||
tex_.Prepare();
|
||||
waitable_->Notify();
|
||||
@@ -815,7 +819,7 @@ bool ReplacedTexture::IsReady(double budget) {
|
||||
|
||||
if (g_Config.bReplaceTexturesAllowLate) {
|
||||
threadWaitable_ = new LimitedWaitable();
|
||||
g_threadManager.EnqueueTask(new ReplacedTextureTask(*this, threadWaitable_), TaskType::IO_BLOCKING);
|
||||
g_threadManager.EnqueueTask(new ReplacedTextureTask(*this, threadWaitable_));
|
||||
|
||||
if (threadWaitable_->WaitFor(budget)) {
|
||||
threadWaitable_->WaitAndRelease();
|
||||
|
||||
Reference in new issue
Block a user