Miao Wang | 4772b60 | 2017-01-20 10:30:38 -0800 | [diff] [blame] | 1 | #ifndef ANDROID_HARDWARE_RENDERSCRIPT_V1_0_DEVICE_H |
| 2 | #define ANDROID_HARDWARE_RENDERSCRIPT_V1_0_DEVICE_H |
| 3 | |
| 4 | #include "cpp/rsDispatch.h" |
| 5 | #include "dlfcn.h" |
| 6 | #include <android/hardware/renderscript/1.0/IDevice.h> |
| 7 | #include <hidl/MQDescriptor.h> |
| 8 | #include <hidl/Status.h> |
| 9 | |
| 10 | namespace android { |
| 11 | namespace hardware { |
| 12 | namespace renderscript { |
| 13 | namespace V1_0 { |
| 14 | namespace implementation { |
| 15 | |
| 16 | using ::android::hardware::renderscript::V1_0::ContextType; |
| 17 | using ::android::hardware::renderscript::V1_0::IContext; |
| 18 | using ::android::hardware::renderscript::V1_0::IDevice; |
| 19 | using ::android::hidl::base::V1_0::IBase; |
| 20 | using ::android::hardware::Return; |
| 21 | using ::android::sp; |
| 22 | |
| 23 | struct Device : public IDevice { |
| 24 | Device(); |
| 25 | static dispatchTable& getHal(); |
| 26 | |
| 27 | // Methods from ::android::hardware::renderscript::V1_0::IDevice follow. |
| 28 | Return<sp<IContext>> contextCreate(uint32_t sdkVersion, ContextType ct, int32_t flags) override; |
| 29 | |
| 30 | // Methods from ::android::hidl::base::V1_0::IBase follow. |
| 31 | |
| 32 | private: |
| 33 | static dispatchTable mDispatchHal; |
| 34 | }; |
| 35 | |
| 36 | extern "C" IDevice* HIDL_FETCH_IDevice(const char* name); |
| 37 | |
| 38 | } // namespace implementation |
| 39 | } // namespace V1_0 |
| 40 | } // namespace renderscript |
| 41 | } // namespace hardware |
| 42 | } // namespace android |
| 43 | |
| 44 | #endif // ANDROID_HARDWARE_RENDERSCRIPT_V1_0_DEVICE_H |