So we'r lying for now for shm buffers, and assuming they
have allways been displayed.
Also, this patch fixes so that if you attach a buffer, and the last
buffer has not gotten any damages, then it will be released.
Change-Id: Id1b9789aa8e4dcff75147f6c96220039defc0d8f
Sanity-Review: Qt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: Paul Olav Tvete <paul.tvete@nokia.com>
void setFinished() { m_is_frame_finished = true; }
inline bool isPosted() const { return m_is_posted; }
- inline bool isDisplayed() const { return m_texture || m_is_posted; }
+ inline bool isDisplayed() const { return m_texture || m_is_posted || wl_buffer_is_shm(m_buffer); }
inline bool isFinished() const { return m_is_frame_finished; }
inline QRect damageRect() const { return m_damageRect; }
d->surfaceBuffer = 0;
}
#endif
+ SurfaceBuffer *last = d->bufferQueue.size()?d->bufferQueue.last():0;
+ if (last && !last->damageRect().isValid()) {
+ last->destructBufferState();
+ d->bufferQueue.takeLast();
+ }
d->bufferQueue << newBuffer;
}