summaryrefslogtreecommitdiff
path: root/src/render/Texture.cpp
diff options
context:
space:
mode:
authorTom Englund <tomenglund26@gmail.com>2025-10-06 13:20:04 +0200
committerGitHub <noreply@github.com>2025-10-06 12:20:04 +0100
commit17e77e0407bebd5d24521012ee1d04b156d6b9f4 (patch)
tree4b91aa7af6da7fab5be0e4f71362d265bc56f5ca /src/render/Texture.cpp
parentcfac27251af5df4352f747c4539ea9f65450f05a (diff)
core/compositor: make wl_surface::frame follow pending states (#11896)
* compositor: make pending states store frame callbacks move frame callbacks to pending states so they are only committed in the order they came depending on the buffer wait for readyness. * buffer: damage is relative to current commit ensure the damage is only used once, or we are constantly redrawing things on state commits that isnt a buffer. thanks PlasmaPower. * compositor: move callbacks back to compositor move SSurfaceStateFrameCB back to compositor in the class CWLCallbackResource as per request, but still keep the state as owning. * compositor: ensure commits come in order if a buffer is waiting any commits after it might be non buffer commits from the "future" and applying directly. and when the old buffer that was waiting becomes ready it applies its states and overwrites the future changes. move things to scheduleState and add a m_pendingWaiting guard. and schedule the next pending state from the old buffer commit when done. and as such it loops itself and keeps thing orderly.
Diffstat (limited to 'src/render/Texture.cpp')
-rw-r--r--src/render/Texture.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/render/Texture.cpp b/src/render/Texture.cpp
index b9797751..17c416c7 100644
--- a/src/render/Texture.cpp
+++ b/src/render/Texture.cpp
@@ -111,6 +111,9 @@ void CTexture::createFromDma(const Aquamarine::SDMABUFAttrs& attrs, void* image)
}
void CTexture::update(uint32_t drmFormat, uint8_t* pixels, uint32_t stride, const CRegion& damage) {
+ if (damage.empty())
+ return;
+
g_pHyprRenderer->makeEGLCurrent();
const auto format = NFormatUtils::getPixelFormatFromDRM(drmFormat);