From 6787fe8933b54f9e68f123df457e502dee9be13a Mon Sep 17 00:00:00 2001 From: UjinT34 <41110182+UjinT34@users.noreply.github.com> Date: Wed, 26 Feb 2025 17:56:37 +0300 Subject: 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 --- src/protocols/core/Compositor.hpp | 24 +++++++++++++----------- 1 file changed, 13 insertions(+), 11 deletions(-) (limited to 'src/protocols/core/Compositor.hpp') 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 contentType; void breadthfirst(std::function, const Vector2D&, void*)> fn, void* data); + SP findFirstPreorder(std::function)> 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 lastBuffer; - - int stateLocks = 0; - - void destroy(); - void releaseBuffers(bool onlyCurrent = true); - void dropPendingBuffer(); - void dropCurrentBuffer(); - void commitPendingState(); - void bfHelper(std::vector> const& nodes, std::function, const Vector2D&, void*)> fn, void* data); - void updateCursorShm(CRegion damage = CBox{0, 0, INT16_MAX, INT16_MAX}); + WP lastBuffer; + + int stateLocks = 0; + + void destroy(); + void releaseBuffers(bool onlyCurrent = true); + void dropPendingBuffer(); + void dropCurrentBuffer(); + void commitPendingState(); + void bfHelper(std::vector> const& nodes, std::function, const Vector2D&, void*)> fn, void* data); + SP findFirstPreorderHelper(SP root, std::function)> fn); + void updateCursorShm(CRegion damage = CBox{0, 0, INT16_MAX, INT16_MAX}); friend class CWLPointerResource; }; -- cgit v1.2.3