blob: c759faff0c084dadb75bbee008aab52802795346 [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
6#include <list>
7
8namespace android {
9namespace renderscript {
10
11class Closure;
12class Context;
13
14class ScriptGroup2 : public ScriptGroupBase {
15 public:
16 /*
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, Closure** closures, size_t numClosures) :
24 ScriptGroupBase(rsc), mClosures(closures, closures + numClosures) {}
25 virtual ~ScriptGroup2() {}
26
27 virtual SG_API_Version getApiVersion() const { return SG_V2; }
28 virtual void execute(Context* rsc);
29
30 std::list<Closure*> mClosures;
31};
32
33} // namespace renderscript
34} // namespace android
35
36#endif // ANDROID_RENDERSCRIPT_SCRIPTGROUP2_H_