mirror of
https://github.com/love2d/love.git
synced 2026-08-16 00:02:12 +02:00
Add Data:performAtomic to lock a mutex while using a Data object.
This commit is contained in:
@@ -764,11 +764,6 @@ void ImageData::paste(ImageData *src, int dx, int dy, int sx, int sy, int sw, in
|
||||
}
|
||||
}
|
||||
|
||||
love::thread::Mutex *ImageData::getMutex() const
|
||||
{
|
||||
return mutex;
|
||||
}
|
||||
|
||||
size_t ImageData::getPixelSize() const
|
||||
{
|
||||
return getPixelFormatBlockSize(format);
|
||||
|
||||
@@ -110,8 +110,6 @@ public:
|
||||
**/
|
||||
love::filesystem::FileData *encode(FormatHandler::EncodedFormat format, const char *filename, bool writefile) const;
|
||||
|
||||
love::thread::Mutex *getMutex() const;
|
||||
|
||||
// Implements ImageDataBase.
|
||||
ImageData *clone() const override;
|
||||
void *getData() const override;
|
||||
@@ -142,8 +140,6 @@ private:
|
||||
// The actual data.
|
||||
unsigned char *data = nullptr;
|
||||
|
||||
love::thread::MutexRef mutex;
|
||||
|
||||
// The format handler that was used to decode the ImageData. We need to know
|
||||
// this so we can properly delete memory allocated by the decoder.
|
||||
StrongRef<FormatHandler> decodeHandler;
|
||||
|
||||
Reference in New Issue
Block a user