mark SkAutoMutexExclusive unmovable

The automatic copy and move constructors and such are not appropriate
for this type.  It could be refactored to be movable but not copyable,
but as written it's neither.

Change-Id: I398a1f91238530c7a6ae2aaf3e7e8455691655fa
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/377536
Reviewed-by: Mike Klein <mtklein@google.com>
Commit-Queue: Mike Klein <mtklein@google.com>
This commit is contained in:
Mike Klein 2021-02-28 09:00:29 -06:00 committed by Skia Commit-Bot
parent 40da13b777
commit 033da99803

View File

@ -43,6 +43,12 @@ public:
SkAutoMutexExclusive(SkMutex& mutex) SK_ACQUIRE(mutex) : fMutex(mutex) { fMutex.acquire(); }
~SkAutoMutexExclusive() SK_RELEASE_CAPABILITY() { fMutex.release(); }
SkAutoMutexExclusive(const SkAutoMutexExclusive&) = delete;
SkAutoMutexExclusive(SkAutoMutexExclusive&&) = delete;
SkAutoMutexExclusive& operator=(const SkAutoMutexExclusive&) = delete;
SkAutoMutexExclusive& operator=(SkAutoMutexExclusive&&) = delete;
private:
SkMutex& fMutex;
};