2012-10-31 15:52:16 +00:00
|
|
|
/*
|
|
|
|
* Copyright 2012 Google Inc.
|
|
|
|
*
|
|
|
|
* Use of this source code is governed by a BSD-style license that can be
|
|
|
|
* found in the LICENSE file.
|
|
|
|
*/
|
|
|
|
|
|
|
|
#ifndef SkRunnable_DEFINED
|
|
|
|
#define SkRunnable_DEFINED
|
|
|
|
|
2014-02-28 20:31:31 +00:00
|
|
|
template <typename T>
|
|
|
|
struct SkTRunnable {
|
|
|
|
virtual ~SkTRunnable() {};
|
|
|
|
virtual void run(T&) = 0;
|
|
|
|
};
|
|
|
|
|
|
|
|
template <>
|
|
|
|
struct SkTRunnable<void> {
|
|
|
|
virtual ~SkTRunnable() {};
|
2012-10-31 15:52:16 +00:00
|
|
|
virtual void run() = 0;
|
|
|
|
};
|
|
|
|
|
2014-02-28 20:31:31 +00:00
|
|
|
typedef SkTRunnable<void> SkRunnable;
|
|
|
|
|
2012-10-31 15:52:16 +00:00
|
|
|
#endif
|