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

Unified Diff: include/utils/SkRunnable.h

Issue 179233005: DM: make GPU tasks multithreaded again. Big refactor. (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: default 1 GPU thread Created 6 years, 10 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.gyp ('k') | include/utils/SkThreadPool.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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
« no previous file with comments | « gyp/utils.gyp ('k') | include/utils/SkThreadPool.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698