Index: src/core/SkTaskGroup.h |
diff --git a/src/core/SkTaskGroup.h b/src/core/SkTaskGroup.h |
index 0d86cdb82934fefa17274c4a99e714f7751aa8b0..ce9a7b2b3326035ab67602cf7f5e7c08326073ef 100644 |
--- a/src/core/SkTaskGroup.h |
+++ b/src/core/SkTaskGroup.h |
@@ -18,8 +18,13 @@ class SkTaskGroup : SkNoncopyable { |
public: |
// Create one of these in main() to enable SkTaskGroups globally. |
struct Enabler : SkNoncopyable { |
- explicit Enabler(int threads = -1); // Default is system-reported core count. |
+ // @param threads Default is system-reported core count. |
+ // @param cleanupFn Function to call in each thread that may have |
+ // scheduled SkTaskGroup tasks. |
+ explicit Enabler(int threads = -1, std::function<void(void)> cleanupFn = nullptr); |
~Enabler(); |
+ private: |
+ std::function<void(void)> fCleanupFn; |
}; |
SkTaskGroup(); |