1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 1.2 +++ b/gfx/skia/trunk/include/utils/SkRunnable.h Wed Dec 31 06:09:35 2014 +0100 1.3 @@ -0,0 +1,25 @@ 1.4 +/* 1.5 + * Copyright 2012 Google Inc. 1.6 + * 1.7 + * Use of this source code is governed by a BSD-style license that can be 1.8 + * found in the LICENSE file. 1.9 + */ 1.10 + 1.11 +#ifndef SkRunnable_DEFINED 1.12 +#define SkRunnable_DEFINED 1.13 + 1.14 +template <typename T> 1.15 +struct SkTRunnable { 1.16 + virtual ~SkTRunnable() {}; 1.17 + virtual void run(T&) = 0; 1.18 +}; 1.19 + 1.20 +template <> 1.21 +struct SkTRunnable<void> { 1.22 + virtual ~SkTRunnable() {}; 1.23 + virtual void run() = 0; 1.24 +}; 1.25 + 1.26 +typedef SkTRunnable<void> SkRunnable; 1.27 + 1.28 +#endif