From 2626f89ea6fe0df585df28052bf1fcca2c50fe8e Mon Sep 17 00:00:00 2001 From: davc0n Date: Sun, 4 May 2025 19:21:36 +0200 Subject: protocols: refactor class member vars (n-t) (#10273) --- src/protocols/Screencopy.hpp | 49 ++++++++++++++++++++++---------------------- 1 file changed, 24 insertions(+), 25 deletions(-) (limited to 'src/protocols/Screencopy.hpp') diff --git a/src/protocols/Screencopy.hpp b/src/protocols/Screencopy.hpp index a69fce3a..ead8b2ed 100644 --- a/src/protocols/Screencopy.hpp +++ b/src/protocols/Screencopy.hpp @@ -28,20 +28,20 @@ class CScreencopyClient { bool good(); - WP self; - eClientOwners clientOwner = CLIENT_SCREENCOPY; + WP m_self; + eClientOwners m_clientOwner = CLIENT_SCREENCOPY; - CTimer lastFrame; - int frameCounter = 0; + CTimer m_lastFrame; + int m_frameCounter = 0; private: - SP resource; + SP m_resource; - int framesInLastHalfSecond = 0; - CTimer lastMeasure; - bool sentScreencast = false; + int m_framesInLastHalfSecond = 0; + CTimer m_lastMeasure; + bool m_sentScreencast = false; - SP tickCallback; + SP m_tickCallback; void onTick(); void captureOutput(uint32_t frame, int32_t overlayCursor, wl_resource* output, CBox box); @@ -55,23 +55,22 @@ class CScreencopyFrame { bool good(); - WP self; - WP client; + WP m_self; + WP m_client; private: - SP resource; + SP m_resource; - PHLMONITORREF pMonitor; - bool overlayCursor = false; - bool withDamage = false; - bool lockedSWCursors = false; + PHLMONITORREF m_monitor; + bool m_overlayCursor = false; + bool m_withDamage = false; - CHLBufferReference buffer; - bool bufferDMA = false; - uint32_t shmFormat = 0; - uint32_t dmabufFormat = 0; - int shmStride = 0; - CBox box = {}; + CHLBufferReference m_buffer; + bool m_bufferDMA = false; + uint32_t m_shmFormat = 0; + uint32_t m_dmabufFormat = 0; + int m_shmStride = 0; + CBox m_box = {}; void copy(CZwlrScreencopyFrameV1* pFrame, wl_resource* buffer); void copyDmabuf(std::function callback); @@ -92,9 +91,9 @@ class CScreencopyProtocol : public IWaylandProtocol { void onOutputCommit(PHLMONITOR pMonitor); private: - std::vector> m_vFrames; - std::vector> m_vFramesAwaitingWrite; - std::vector> m_vClients; + std::vector> m_frames; + std::vector> m_framesAwaitingWrite; + std::vector> m_clients; void shareAllFrames(PHLMONITOR pMonitor); void shareFrame(CScreencopyFrame* frame); -- cgit v1.2.3