Index: src/utils/SkRunnable.h |
diff --git a/src/utils/SkRunnable.h b/src/utils/SkRunnable.h |
index 7a93b60c898018f6bac149c402703b442c943509..5acf4dbc61a4ec4f177c14cf594dc3274c50a26a 100644 |
--- a/src/utils/SkRunnable.h |
+++ b/src/utils/SkRunnable.h |
@@ -8,9 +8,18 @@ |
#ifndef SkRunnable_DEFINED |
#define SkRunnable_DEFINED |
-struct SkRunnable { |
- 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 |