Index: include/utils/SkRunnable.h |
diff --git a/include/utils/SkRunnable.h b/include/utils/SkRunnable.h |
index 84e43750f66dfec64984bc714280575bb3ba155f..5acf4dbc61a4ec4f177c14cf594dc3274c50a26a 100644 |
--- a/include/utils/SkRunnable.h |
+++ b/include/utils/SkRunnable.h |
@@ -8,10 +8,18 @@ |
#ifndef SkRunnable_DEFINED |
#define SkRunnable_DEFINED |
-class SkRunnable { |
-public: |
- virtual ~SkRunnable() {}; |
+template <typename T> |
+struct SkTRunnable { |
+ virtual ~SkTRunnable() {}; |
+ virtual void run(T&) = 0; |
+}; |
+ |
+template <> |
+struct SkTRunnable<void> { |
+ virtual ~SkTRunnable() {}; |
virtual void run() = 0; |
}; |
+typedef SkTRunnable<void> SkRunnable; |
+ |
#endif |