aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorVaxry <[email protected]>2024-08-06 14:51:39 +0200
committerVaxry <[email protected]>2024-08-06 14:51:39 +0200
commitfa069bc4ce7ebc844817e1ace22ea7d7391af4ff (patch)
tree1f206330fe641c86bb81071dcefa3864fb372dd7
parent683a0e158405b229e29578775661109f24d67331 (diff)
downloadHyprland-fa069bc4ce7ebc844817e1ace22ea7d7391af4ff.tar.gz
Hyprland-fa069bc4ce7ebc844817e1ace22ea7d7391af4ff.zip
-rw-r--r--src/protocols/DRMSyncobj.cpp2
-rw-r--r--src/protocols/core/Compositor.cpp6
-rw-r--r--src/protocols/core/Compositor.hpp3
3 files changed, 6 insertions, 5 deletions
diff --git a/src/protocols/DRMSyncobj.cpp b/src/protocols/DRMSyncobj.cpp
index e0ff01ae..8b0330de 100644
--- a/src/protocols/DRMSyncobj.cpp
+++ b/src/protocols/DRMSyncobj.cpp
@@ -47,7 +47,7 @@ CDRMSyncobjSurfaceResource::CDRMSyncobjSurfaceResource(SP<CWpLinuxDrmSyncobjSurf
return;
}
- if (!surface->pending.texture)
+ if (!surface->pending.newBuffer)
return; // this commit does not change the state here
if (!!pending.acquireTimeline != !!pending.releaseTimeline) {
diff --git a/src/protocols/core/Compositor.cpp b/src/protocols/core/Compositor.cpp
index 58839929..b0111032 100644
--- a/src/protocols/core/Compositor.cpp
+++ b/src/protocols/core/Compositor.cpp
@@ -70,7 +70,8 @@ CWLSurfaceResource::CWLSurfaceResource(SP<CWlSurface> resource_) : resource(reso
resource->setOnDestroy([this](CWlSurface* r) { destroy(); });
resource->setAttach([this](CWlSurface* r, wl_resource* buffer, int32_t x, int32_t y) {
- pending.offset = {x, y};
+ pending.offset = {x, y};
+ pending.newBuffer = true;
if (!buffer) {
pending.buffer.reset();
@@ -429,8 +430,7 @@ void CWLSurfaceResource::commitPendingState() {
current = pending;
pending.damage.clear();
pending.bufferDamage.clear();
- pending.texture.reset();
- pending.buffer.reset();
+ pending.newBuffer = false;
if (syncobj && syncobj->current.releaseTimeline && syncobj->current.releaseTimeline->timeline && current.buffer && current.buffer->buffer)
current.buffer->releaser = makeShared<CSyncReleaser>(syncobj->current.releaseTimeline->timeline, syncobj->current.releasePoint);
diff --git a/src/protocols/core/Compositor.hpp b/src/protocols/core/Compositor.hpp
index 368f36fd..af0dfa58 100644
--- a/src/protocols/core/Compositor.hpp
+++ b/src/protocols/core/Compositor.hpp
@@ -97,7 +97,8 @@ class CWLSurfaceResource {
Vector2D destination;
CBox source;
} viewport;
- bool rejected = false;
+ bool rejected = false;
+ bool newBuffer = false;
//
void reset() {