mirror of
https://gitee.com/openharmony/graphic_graphic_2d
synced 2024-11-27 01:00:50 +00:00
window buffer share
Signed-off-by: huyanchao@huawei.com <huyanchao@huawei.com>
This commit is contained in:
parent
0b3faab181
commit
45a01bce97
@ -33,6 +33,7 @@ public:
|
||||
GSError QueueBuffer(int32_t slot, int32_t acquireFence);
|
||||
GSError ReleaseBuffer(const sptr<SurfaceBuffer> &buffer, const sptr<SyncFence> &fence);
|
||||
GSError ClearBufferSlot(int32_t slot);
|
||||
GSError ClearAllBuffers();
|
||||
GSError CancelBuffer(int32_t slot, int32_t fenceFd);
|
||||
GSError DetachBuffer(int32_t slot);
|
||||
int OnDequeueBuffer(MessageParcel &data, MessageParcel &reply);
|
||||
@ -43,6 +44,10 @@ private:
|
||||
std::vector<sptr<SurfaceBuffer>> pendingReleaseBuffer_;
|
||||
std::mutex mapMutex_;
|
||||
std::mutex mstate_;
|
||||
|
||||
void AddBufferLocked(const sptr<SurfaceBuffer>& buffer, int32_t slot);
|
||||
sptr<SurfaceBuffer> GetBufferLocked(int32_t slot);
|
||||
int32_t GetSlotLocked(const sptr<SurfaceBuffer>& buffer);
|
||||
};
|
||||
} // namespace OHOS
|
||||
#endif // PRODUCER_SURFACE_DELEGATOR_H
|
||||
|
@ -39,6 +39,31 @@ GSError ProducerSurfaceDelegator::ClearBufferSlot(int32_t slot)
|
||||
return GSERROR_OK;
|
||||
}
|
||||
|
||||
GSError ClearBufferSlot(int32_t slot)
|
||||
{
|
||||
(void)slot;
|
||||
return GSERROR_OK;
|
||||
}
|
||||
|
||||
void AddBufferLocked(const sptr<SurfaceBuffer>& buffer, int32_t slot)
|
||||
{
|
||||
(void)buffer;
|
||||
(void)slot;
|
||||
return;
|
||||
}
|
||||
|
||||
sptr<SurfaceBuffer> GetBufferLocked(int32_t slot)
|
||||
{
|
||||
(void)slot;
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
int32_t GetSlotLocked(const sptr<SurfaceBuffer>& buffer)
|
||||
{
|
||||
(void)buffer;
|
||||
return 0;
|
||||
}
|
||||
|
||||
GSError ProducerSurfaceDelegator::CancelBuffer(int32_t slot, int32_t fenceFd)
|
||||
{
|
||||
return GSERROR_OK;
|
||||
|
Loading…
Reference in New Issue
Block a user