summaryrefslogtreecommitdiff
path: root/Source/Core/VideoCommon/TextureDecoder_Common.cpp
diff options
context:
space:
mode:
authorLéo Lam <leo@innovatetechnologi.es>2017-07-21 14:06:02 +0800
committerLéo Lam <leo@innovatetechnologi.es>2017-07-21 16:45:59 +0800
commitf106a9637df3f1cb31a09d451729cae1acdc63cb (patch)
treeb4519263d46f4ad6ef38830666857107e3981a88 /Source/Core/VideoCommon/TextureDecoder_Common.cpp
parent2f0bec93cb3eb02f159461f13557bde4bd2771bb (diff)
Replace balanced Core::PauseAndLock calls with RunAsCPUThread
Core::PauseAndLock requires all calls to it to be balanced, like this: const bool was_unpaused = Core::PauseAndLock(true); // do stuff on the CPU thread Core::PauseAndLock(false, was_unpaused); Aside from being a bit cumbersome, it turns out all callers really don't need to know about was_unpaused at all. They just need to do something on the CPU thread safely, including locking/unlocking. So this commit replaces Core::PauseAndLock with a function that makes both the purpose and the scope of what is being run on the CPU thread visually clear. This makes it harder to accidentally run something on the wrong thread, or forget the second call to PauseAndLock to unpause, or forget that it needs to be passed was_unpaused at the end. We also don't need comments to indicate code X is being run on the CPU thread anymore, as the function name makes it obvious.
Diffstat (limited to 'Source/Core/VideoCommon/TextureDecoder_Common.cpp')
0 files changed, 0 insertions, 0 deletions