mirror of
https://github.com/hyprwm/Hyprland.git
synced 2025-09-01 12:23:48 -07:00
Core: Move to aquamarine (#6608)
Moves Hyprland from wlroots to aquamarine for the backend. --------- Signed-off-by: Vaxry <vaxry@vaxry.net> Co-authored-by: Mihai Fufezan <mihai@fufexan.net> Co-authored-by: Jan Beich <jbeich@FreeBSD.org> Co-authored-by: vaxerski <vaxerski@users.noreply.github.com> Co-authored-by: UjinT34 <41110182+UjinT34@users.noreply.github.com> Co-authored-by: Tom Englund <tomenglund26@gmail.com> Co-authored-by: Ikalco <73481042+ikalco@users.noreply.github.com> Co-authored-by: diniamo <diniamo53@gmail.com>
This commit is contained in:
@@ -24,6 +24,7 @@ class CWLSurface;
|
||||
class CWLSurfaceResource;
|
||||
class CWLSubsurfaceResource;
|
||||
class CViewportResource;
|
||||
class CDRMSyncobjSurfaceResource;
|
||||
|
||||
class CWLCallbackResource {
|
||||
public:
|
||||
@@ -74,6 +75,7 @@ class CWLSurfaceResource {
|
||||
Vector2D sourceSize();
|
||||
|
||||
struct {
|
||||
CSignal precommit;
|
||||
CSignal commit;
|
||||
CSignal map;
|
||||
CSignal unmap;
|
||||
@@ -81,11 +83,11 @@ class CWLSurfaceResource {
|
||||
CSignal destroy;
|
||||
} events;
|
||||
|
||||
struct {
|
||||
struct SState {
|
||||
CRegion opaque, input = CBox{{}, {INT32_MAX, INT32_MAX}}, damage, bufferDamage = CBox{{}, {INT32_MAX, INT32_MAX}} /* initial damage */;
|
||||
wl_output_transform transform = WL_OUTPUT_TRANSFORM_NORMAL;
|
||||
int scale = 1;
|
||||
SP<IWLBuffer> buffer;
|
||||
SP<IHLBuffer> buffer;
|
||||
SP<CTexture> texture;
|
||||
Vector2D offset;
|
||||
Vector2D size;
|
||||
@@ -95,6 +97,7 @@ class CWLSurfaceResource {
|
||||
Vector2D destination;
|
||||
CBox source;
|
||||
} viewport;
|
||||
bool rejected = false;
|
||||
|
||||
//
|
||||
void reset() {
|
||||
@@ -115,9 +118,13 @@ class CWLSurfaceResource {
|
||||
std::vector<WP<CWLSubsurfaceResource>> subsurfaces;
|
||||
WP<ISurfaceRole> role;
|
||||
WP<CViewportResource> viewportResource;
|
||||
WP<CDRMSyncobjSurfaceResource> syncobj; // may not be present
|
||||
|
||||
void breadthfirst(std::function<void(SP<CWLSurfaceResource>, const Vector2D&, void*)> fn, void* data);
|
||||
CRegion accumulateCurrentBufferDamage();
|
||||
void presentFeedback(timespec* when, CMonitor* pMonitor, bool needsExplicitSync = false);
|
||||
void lockPendingState();
|
||||
void unlockPendingState();
|
||||
|
||||
// returns a pair: found surface (null if not found) and surface local coords.
|
||||
// localCoords param is relative to 0,0 of this surface
|
||||
@@ -130,7 +137,10 @@ class CWLSurfaceResource {
|
||||
// tracks whether we should release the buffer
|
||||
bool bufferReleased = false;
|
||||
|
||||
int stateLocks = 0;
|
||||
|
||||
void destroy();
|
||||
void commitPendingState();
|
||||
void bfHelper(std::vector<SP<CWLSurfaceResource>> nodes, std::function<void(SP<CWLSurfaceResource>, const Vector2D&, void*)> fn, void* data);
|
||||
};
|
||||
|
||||
|
Reference in New Issue
Block a user