Index: src/ports/SkMutex_win.h |
diff --git a/src/ports/SkMutex_win.h b/src/ports/SkMutex_win.h |
index d12fd033f3d6d6a457d1b9022987572f8be9690f..745a3e33d6ee96009facbdb13f4c4bf5f2eaa808 100644 |
--- a/src/ports/SkMutex_win.h |
+++ b/src/ports/SkMutex_win.h |
@@ -31,8 +31,14 @@ |
#endif |
// On Windows, SkBaseMutex and SkMutex are the same thing, |
-// we can't easily get rid of static initializers. |
-class SkMutex { |
+// we can't easily get rid of static initializers. However, |
+// we preserve the same inheritance pattern as other platforms |
+// so that we can forward-declare cleanly. |
+struct SkBaseMutex { |
mtklein
2014/06/30 22:24:01
Don't you have to do it the other way around? SkB
|
+ |
+}; |
+ |
+class SkMutex : public SkBaseMutex { |
public: |
SkMutex() { |
InitializeCriticalSection(&fStorage); |
@@ -67,8 +73,6 @@ private: |
SkDEBUGCODE(DWORD fOwner;) |
}; |
-typedef SkMutex SkBaseMutex; |
- |
// Windows currently provides no documented means of POD initializing a CRITICAL_SECTION. |
#define SK_DECLARE_STATIC_MUTEX(name) static SkBaseMutex name |
#define SK_DECLARE_GLOBAL_MUTEX(name) SkBaseMutex name |