14177ef4b229b5fb67f355569654981bb4bf8eb9cscroggo@google.com/*
24177ef4b229b5fb67f355569654981bb4bf8eb9cscroggo@google.com * Copyright 2012 Google Inc.
34177ef4b229b5fb67f355569654981bb4bf8eb9cscroggo@google.com *
44177ef4b229b5fb67f355569654981bb4bf8eb9cscroggo@google.com * Use of this source code is governed by a BSD-style license that can be
54177ef4b229b5fb67f355569654981bb4bf8eb9cscroggo@google.com * found in the LICENSE file.
64177ef4b229b5fb67f355569654981bb4bf8eb9cscroggo@google.com */
74177ef4b229b5fb67f355569654981bb4bf8eb9cscroggo@google.com
84177ef4b229b5fb67f355569654981bb4bf8eb9cscroggo@google.com#ifndef SkRunnable_DEFINED
94177ef4b229b5fb67f355569654981bb4bf8eb9cscroggo@google.com#define SkRunnable_DEFINED
104177ef4b229b5fb67f355569654981bb4bf8eb9cscroggo@google.com
11ef57b7e65330d5f794a513630517907500f1c1d0commit-bot@chromium.orgtemplate <typename T>
12ef57b7e65330d5f794a513630517907500f1c1d0commit-bot@chromium.orgstruct SkTRunnable {
13ef57b7e65330d5f794a513630517907500f1c1d0commit-bot@chromium.org    virtual ~SkTRunnable() {};
14ef57b7e65330d5f794a513630517907500f1c1d0commit-bot@chromium.org    virtual void run(T&) = 0;
15ef57b7e65330d5f794a513630517907500f1c1d0commit-bot@chromium.org};
16ef57b7e65330d5f794a513630517907500f1c1d0commit-bot@chromium.org
17ef57b7e65330d5f794a513630517907500f1c1d0commit-bot@chromium.orgtemplate <>
18ef57b7e65330d5f794a513630517907500f1c1d0commit-bot@chromium.orgstruct SkTRunnable<void> {
19ef57b7e65330d5f794a513630517907500f1c1d0commit-bot@chromium.org    virtual ~SkTRunnable() {};
204177ef4b229b5fb67f355569654981bb4bf8eb9cscroggo@google.com    virtual void run() = 0;
214177ef4b229b5fb67f355569654981bb4bf8eb9cscroggo@google.com};
224177ef4b229b5fb67f355569654981bb4bf8eb9cscroggo@google.com
23ef57b7e65330d5f794a513630517907500f1c1d0commit-bot@chromium.orgtypedef SkTRunnable<void> SkRunnable;
24ef57b7e65330d5f794a513630517907500f1c1d0commit-bot@chromium.org
254177ef4b229b5fb67f355569654981bb4bf8eb9cscroggo@google.com#endif
26