compositor: make wl_surface::frame follow pending states (#11953)
* 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.
This commit is contained in:
parent
5a20862126
commit
5ba2d2217b
5 changed files with 97 additions and 49 deletions
|
|
@ -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);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue