mirror of
https://github.com/love2d/love.git
synced 2026-08-13 17:10:54 +02:00
Improved performance when using ImageData methods in multiple threads when ImageData:encode is called
This commit is contained in:
@@ -202,6 +202,7 @@ int w_ImageData_mapPixel(lua_State *L)
|
||||
lua_pushvalue(L, 2);
|
||||
|
||||
// Manually lock this ImageData's mutex during the entire mapPixel.
|
||||
// Using the lock methods because lua_error won't trigger object destructors.
|
||||
mutex->lock();
|
||||
int ret = lua_pcall(L, 2, 0, 0);
|
||||
mutex->unlock();
|
||||
|
||||
Reference in New Issue
Block a user