diff options
author | 2014-01-09 00:02:52 +0000 | |
---|---|---|
committer | 2014-01-09 00:02:52 +0000 | |
commit | ca38f2c86ef06c5d19b80fb5577f4574b552061f (patch) | |
tree | 05b6c352d0a7b5c5c2e6eac87ba8b4b48dcb3af2 /src | |
parent | 41bf930039314cc71039b12957195f1c65c30ce1 (diff) |
Fix TODO in SkMutex_win.h to prevent accidental copying.
R=mtklein@google.com
Review URL: https://codereview.chromium.org/129533002
git-svn-id: http://skia.googlecode.com/svn/trunk@12979 2bbb7eff-a529-9590-31e7-b0007b416f81
Diffstat (limited to 'src')
-rw-r--r-- | src/ports/SkMutex_win.h | 18 |
1 files changed, 4 insertions, 14 deletions
diff --git a/src/ports/SkMutex_win.h b/src/ports/SkMutex_win.h index f38e504a9c..f4b8234e85 100644 --- a/src/ports/SkMutex_win.h +++ b/src/ports/SkMutex_win.h @@ -30,22 +30,9 @@ # undef NOMINMAX #endif -// TODO: this exists because SK_DECLARE_STATIC_ONCE in methods is currently -// relying on a compiler bug which allows the '=' to work. -// All use of SK_DECLARE_STATIC_ONCE in methods is unsafe, and must be removed. -// To find these cases, make SkMutex's copy and assignement private directly. -class SkNoncopyableMutex { -public: - SkNoncopyableMutex() { } - -private: - SkNoncopyableMutex(const SkNoncopyableMutex&); - SkNoncopyableMutex& operator=(const SkNoncopyableMutex&); -}; - // On Windows, SkBaseMutex and SkMutex are the same thing, // we can't easily get rid of static initializers. -class SkMutex : SkNoncopyableMutex { +class SkMutex { public: SkMutex() { InitializeCriticalSection(&fStorage); @@ -64,6 +51,9 @@ public: } private: + SkMutex(const SkMutex&); + SkMutex& operator=(const SkMutex&); + CRITICAL_SECTION fStorage; }; |