diff options
| author | UjinT34 <41110182+UjinT34@users.noreply.github.com> | 2025-02-26 17:56:37 +0300 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2025-02-26 15:56:37 +0100 |
| commit | 6787fe8933b54f9e68f123df457e502dee9be13a (patch) | |
| tree | f77f71d739e8d403347b83fde4377bc519acea3e /src/protocols/core/Compositor.hpp | |
| parent | f0850905f0275922340035f62b6d808c2980ceda (diff) | |
protocols: Support wp color management proto (#9444)
Adds support for the recently merged w-p CM protocol alongside the (now deprecated) old CM WIP protocols
Diffstat (limited to 'src/protocols/core/Compositor.hpp')
| -rw-r--r-- | src/protocols/core/Compositor.hpp | 24 |
1 files changed, 13 insertions, 11 deletions
diff --git a/src/protocols/core/Compositor.hpp b/src/protocols/core/Compositor.hpp index aaaf9b1a..39690017 100644 --- a/src/protocols/core/Compositor.hpp +++ b/src/protocols/core/Compositor.hpp @@ -127,6 +127,7 @@ class CWLSurfaceResource { WP<CContentType> contentType; void breadthfirst(std::function<void(SP<CWLSurfaceResource>, const Vector2D&, void*)> fn, void* data); + SP<CWLSurfaceResource> findFirstPreorder(std::function<bool(SP<CWLSurfaceResource>)> fn); CRegion accumulateCurrentBufferDamage(); void presentFeedback(timespec* when, PHLMONITOR pMonitor, bool discarded = false); void lockPendingState(); @@ -142,17 +143,18 @@ class CWLSurfaceResource { // this is for cursor dumb copy. Due to our (and wayland's...) architecture, // this stupid-ass hack is used - WP<IHLBuffer> lastBuffer; - - int stateLocks = 0; - - void destroy(); - void releaseBuffers(bool onlyCurrent = true); - void dropPendingBuffer(); - void dropCurrentBuffer(); - void commitPendingState(); - void bfHelper(std::vector<SP<CWLSurfaceResource>> const& nodes, std::function<void(SP<CWLSurfaceResource>, const Vector2D&, void*)> fn, void* data); - void updateCursorShm(CRegion damage = CBox{0, 0, INT16_MAX, INT16_MAX}); + WP<IHLBuffer> lastBuffer; + + int stateLocks = 0; + + void destroy(); + void releaseBuffers(bool onlyCurrent = true); + void dropPendingBuffer(); + void dropCurrentBuffer(); + void commitPendingState(); + void bfHelper(std::vector<SP<CWLSurfaceResource>> const& nodes, std::function<void(SP<CWLSurfaceResource>, const Vector2D&, void*)> fn, void* data); + SP<CWLSurfaceResource> findFirstPreorderHelper(SP<CWLSurfaceResource> root, std::function<bool(SP<CWLSurfaceResource>)> fn); + void updateCursorShm(CRegion damage = CBox{0, 0, INT16_MAX, INT16_MAX}); friend class CWLPointerResource; }; |
