Yang Ni | 1ffd86b | 2015-01-07 09:16:40 -0800 | [diff] [blame] | 1 | #ifndef ANDROID_RENDERSCRIPT_SCRIPTGROUP2_H_ |
| 2 | #define ANDROID_RENDERSCRIPT_SCRIPTGROUP2_H_ |
| 3 | |
| 4 | #include "rsScriptGroupBase.h" |
| 5 | |
| 6 | #include <list> |
| 7 | |
| 8 | namespace android { |
| 9 | namespace renderscript { |
| 10 | |
| 11 | class Closure; |
| 12 | class Context; |
| 13 | |
| 14 | class 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_ |