Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(600)

Unified Diff: src/utils/SkRunnable.h

Issue 533393002: Revert of SkThreadPool ~~> SkTaskGroup (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 6 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « gyp/utils.gypi ('k') | src/utils/SkTaskGroup.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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
« no previous file with comments | « gyp/utils.gypi ('k') | src/utils/SkTaskGroup.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698