int descriptor);
} iahwc_device_t;
+typedef struct iahwc_raw_pixel_data {
+ void* buffer;
+ uint64_t width;
+ uint64_t height;
+ uint64_t stride;
+ uint32_t format;
+} iahwc_raw_pixel_data;
+
typedef enum {
IAHWC_ERROR_NONE = 0,
IAHWC_ERROR_BAD_CONFIG,
IAHWC_FUNC_PRESENT_DISPLAY,
IAHWC_FUNC_CREATE_LAYER,
IAHWC_FUNC_LAYER_SET_BO,
+ IAHWC_FUNC_LAYER_SET_RAW_PIXEL_DATA,
IAHWC_FUNC_LAYER_SET_ACQUIRE_FENCE,
IAHWC_FUNC_LAYER_SET_USAGE,
IAHWC_FUNC_LAYER_SET_TRANSFORM,
iahwc_display_t display_handle,
iahwc_layer_t layer_handle,
struct gbm_bo*);
+typedef int (*IAHWC_PFN_LAYER_SET_RAW_PIXEL_DATA)(
+ iahwc_device_t*, iahwc_display_t display_handle, iahwc_layer_t layer_handle,
+ struct iahwc_raw_pixel_data);
typedef int (*IAHWC_PFN_LAYER_SET_ACQUIRE_FENCE)(iahwc_device_t*,
iahwc_display_t display_handle,
iahwc_layer_t layer_handle,
case IAHWC_FUNC_LAYER_SET_BO:
return ToHook<IAHWC_PFN_LAYER_SET_BO>(
LayerHook<decltype(&IAHWCLayer::SetBo), &IAHWCLayer::SetBo, gbm_bo*>);
+ case IAHWC_FUNC_LAYER_SET_RAW_PIXEL_DATA:
+ return ToHook<IAHWC_PFN_LAYER_SET_RAW_PIXEL_DATA>(
+ LayerHook<decltype(&IAHWCLayer::SetRawPixelData),
+ &IAHWCLayer::SetRawPixelData, iahwc_raw_pixel_data>);
case IAHWC_FUNC_LAYER_SET_ACQUIRE_FENCE:
return ToHook<IAHWC_PFN_LAYER_SET_ACQUIRE_FENCE>(
LayerHook<decltype(&IAHWCLayer::SetAcquireFence),
return IAHWC_ERROR_NONE;
}
+int IAHWC::IAHWCLayer::SetRawPixelData(iahwc_raw_pixel_data bo) {
+ hwc_handle_.meta_data_.width_ = bo.width;
+ hwc_handle_.meta_data_.height_ = bo.height;
+ hwc_handle_.meta_data_.format_ = bo.format;
+ hwc_handle_.gbm_flags = 0;
+ hwc_handle_.is_raw_pixel_ = true;
+ hwc_handle_.pixel_memory_ = bo.buffer;
+
+ iahwc_layer_.SetNativeHandle(&hwc_handle_);
+
+ return IAHWC_ERROR_NONE;
+}
+
int IAHWC::IAHWCLayer::SetAcquireFence(int32_t acquire_fence) {
iahwc_layer_.SetAcquireFence(acquire_fence);
IAHWCLayer();
~IAHWCLayer();
int SetBo(gbm_bo* bo);
+ int SetRawPixelData(iahwc_raw_pixel_data bo);
int SetAcquireFence(int32_t acquire_fence);
int SetLayerUsage(int32_t layer_usage);
int32_t GetLayerUsage() {