screencopy: implement dmabuf

This commit is contained in:
vaxerski 2023-04-12 21:40:51 +01:00
parent 985764c8db
commit a22e1174ee
6 changed files with 65 additions and 9 deletions

View file

@ -54,6 +54,7 @@ class CScreencopyProtocolManager {
void copyFrame(wl_client* client, wl_resource* resource, wl_resource* buffer);
void onRenderEnd(CMonitor* pMonitor);
void onOutputCommit(CMonitor* pMonitor, wlr_output_event_commit* e);
private:
wl_global* m_pGlobal = nullptr;
@ -64,6 +65,9 @@ class CScreencopyProtocolManager {
std::vector<SScreencopyFrame*> m_vFramesAwaitingWrite;
wlr_buffer* m_pLastMonitorBackBuffer = nullptr;
void shareAllFrames(CMonitor* pMonitor, bool dmabuf);
void shareFrame(SScreencopyFrame* frame);
void sendFrameDamage(SScreencopyFrame* frame);
bool copyFrameDmabuf(SScreencopyFrame* frame);