blob: 92a0f100116e77d456602dc618118cb3ce233e7d [file] [log] [blame]
Yang Ni1ffd86b2015-01-07 09:16:40 -08001#ifndef ANDROID_RENDERSCRIPT_SCRIPTGROUP2_H_
2#define ANDROID_RENDERSCRIPT_SCRIPTGROUP2_H_
3
4#include "rsScriptGroupBase.h"
5
Yang Niff2bb542015-02-02 14:33:47 -08006#include "rsList.h"
Yang Ni1ffd86b2015-01-07 09:16:40 -08007
8namespace android {
9namespace renderscript {
10
11class Closure;
12class Context;
13
14class ScriptGroup2 : public ScriptGroupBase {
15 public:
Yang Nieb9aa672015-01-27 14:32:25 -080016 /*
17 TODO:
18 Inputs and outputs are set and retrieved in Java runtime.
19 They are opaque in the C++ runtime.
20 For better compiler optimizations (of a script group), we need to include
21 input and output information in the C++ runtime.
22 */
23 ScriptGroup2(Context* rsc, const char* cacheDir, Closure** closures,
24 size_t numClosures) :
Yang Niff2bb542015-02-02 14:33:47 -080025 ScriptGroupBase(rsc), mClosures(closures, closures + numClosures),
26 mCacheDir(cacheDir) {}
Yang Nieb9aa672015-01-27 14:32:25 -080027 virtual ~ScriptGroup2() {}
Yang Ni1ffd86b2015-01-07 09:16:40 -080028
Yang Nieb9aa672015-01-27 14:32:25 -080029 virtual SG_API_Version getApiVersion() const { return SG_V2; }
30 virtual void execute(Context* rsc);
Yang Ni1ffd86b2015-01-07 09:16:40 -080031
Yang Niff2bb542015-02-02 14:33:47 -080032 List<Closure*> mClosures;
33 const char* mCacheDir;
Yang Ni1ffd86b2015-01-07 09:16:40 -080034};
35
36} // namespace renderscript
37} // namespace android
38
39#endif // ANDROID_RENDERSCRIPT_SCRIPTGROUP2_H_