/* * Copyright (c) Hisilicon Technologies Co., Ltd.. 2019-2020. All rights reserved. * Description: overlay create win/queue buffer by VO * Author: Original Media Software Group * Create: 2019-07-15 */ #ifndef OVERLAY_ADAPTER_H #define OVERLAY_ADAPTER_H #include #include #include #include namespace android { class VendorWindowAdp; using OverlayRect = struct { int left; int top; int right; int bottom; }; using LayerInfo = struct { int visible; int displayId; buffer_handle_t handle; int sequence; }; class OverlayAdapter { public: OverlayAdapter(); virtual ~OverlayAdapter(); /** * Interfaces used in HWC * prepare overlay layers */ int PrepareOverlayLayer(const LayerInfo &info); /** * queue a buffer handle to overlay device for displaying. */ int QueueBuffer(buffer_handle_t handle, int &releaseFence, const int &dataSpace); /** * area of the source to consider, the origin is the top-left corner of * the buffer. */ int SetCrop(const OverlayRect &sourceCrop) const; int SetPosition(const OverlayRect &displayFrame) const; int SetTransform(uint32_t transform) const; int SetZorder(int32_t zorder) const; /** * get displayID */ int GetDisplayID() const; private: int displayId; std::unique_ptr impl; }; } #endif /* OVERLAY_ADAPTER_H */