mirror of
https://repo.dactyloidae.xyz/Dactyloidae/UXP.git
synced 2026-09-26 02:17:34 +09:00
[gfx][Skia] Hold mutex while accessing shared SkImage data.
This commit is contained in:
parent
2924d30a83
commit
3cac4d852d
3 changed files with 54 additions and 17 deletions
|
|
@ -10,6 +10,10 @@
|
|||
#include <vector>
|
||||
#include "skia/include/core/SkCanvas.h"
|
||||
#include "skia/include/core/SkImage.h"
|
||||
#include "mozilla/Maybe.h"
|
||||
#include "mozilla/Mutex.h"
|
||||
|
||||
typedef mozilla::MutexAutoLock MutexAutoLock;
|
||||
|
||||
namespace mozilla {
|
||||
|
||||
|
|
@ -28,7 +32,7 @@ public:
|
|||
virtual IntSize GetSize() const;
|
||||
virtual SurfaceFormat GetFormat() const;
|
||||
|
||||
sk_sp<SkImage>& GetImage() { return mImage; }
|
||||
sk_sp<SkImage> GetImage(Maybe<MutexAutoLock>* aLock);
|
||||
|
||||
bool InitFromData(unsigned char* aData,
|
||||
const IntSize &aSize,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue