blob: f5bda37d09dc8947273bf0de87400af10f28145f [file] [log] [blame]
Miao Wang4772b602017-01-20 10:30:38 -08001#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
10namespace android {
11namespace hardware {
12namespace renderscript {
13namespace V1_0 {
14namespace implementation {
15
16using ::android::hardware::renderscript::V1_0::ContextType;
17using ::android::hardware::renderscript::V1_0::IContext;
18using ::android::hardware::renderscript::V1_0::IDevice;
19using ::android::hidl::base::V1_0::IBase;
20using ::android::hardware::Return;
21using ::android::sp;
22
23struct 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
36extern "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