platform: Use damage tracked by SurfaceItem
There is no need for both kwin and kwaylandserver track damage.
This commit is contained in:
parent
2ade92d69b
commit
326d211691
3 changed files with 1 additions and 19 deletions
|
@ -424,9 +424,6 @@ bool AbstractEglTexture::loadTexture(WindowPixmap *pixmap)
|
|||
return false;
|
||||
}
|
||||
// try Wayland loading
|
||||
if (auto s = pixmap->surface()) {
|
||||
s->resetTrackedDamage();
|
||||
}
|
||||
if (buffer->linuxDmabufBuffer()) {
|
||||
return loadDmabufTexture(buffer);
|
||||
} else if (buffer->shmBuffer()) {
|
||||
|
@ -461,9 +458,6 @@ void AbstractEglTexture::updateTexture(WindowPixmap *pixmap, const QRegion ®i
|
|||
// The origin in a dmabuf-buffer is at the upper-left corner, so the meaning
|
||||
// of Y-inverted is the inverse of OpenGL.
|
||||
q->setYInverted(!(dmabuf->flags() & KWaylandServer::LinuxDmabufUnstableV1Interface::YInverted));
|
||||
if (s) {
|
||||
s->resetTrackedDamage();
|
||||
}
|
||||
return;
|
||||
}
|
||||
if (!buffer->shmBuffer()) {
|
||||
|
@ -476,9 +470,6 @@ void AbstractEglTexture::updateTexture(WindowPixmap *pixmap, const QRegion ®i
|
|||
}
|
||||
m_image = image;
|
||||
}
|
||||
if (s) {
|
||||
s->resetTrackedDamage();
|
||||
}
|
||||
return;
|
||||
}
|
||||
// shm fallback
|
||||
|
@ -487,8 +478,7 @@ void AbstractEglTexture::updateTexture(WindowPixmap *pixmap, const QRegion ®i
|
|||
return;
|
||||
}
|
||||
Q_ASSERT(image.size() == m_size);
|
||||
const QRegion damage = s->mapToBuffer(s->trackedDamage());
|
||||
s->resetTrackedDamage();
|
||||
const QRegion damage = s->mapToBuffer(region);
|
||||
|
||||
// TODO: this should be shared with GLTexture::update
|
||||
createTextureSubImage(image, damage);
|
||||
|
|
|
@ -599,7 +599,6 @@ bool EglStreamTexture::loadTexture(WindowPixmap *pixmap)
|
|||
|
||||
attachBuffer(surface->buffer());
|
||||
createFbo();
|
||||
surface->resetTrackedDamage();
|
||||
|
||||
if (acquireStreamFrame(st->stream)) {
|
||||
copyExternalTexture(st->texture);
|
||||
|
@ -624,7 +623,6 @@ void EglStreamTexture::updateTexture(WindowPixmap *pixmap, const QRegion ®ion
|
|||
if (attachBuffer(surface->buffer())) {
|
||||
createFbo();
|
||||
}
|
||||
surface->resetTrackedDamage();
|
||||
|
||||
if (acquireStreamFrame(st->stream)) {
|
||||
copyExternalTexture(st->texture);
|
||||
|
|
|
@ -370,9 +370,6 @@ void QPainterWindowPixmap::create()
|
|||
}
|
||||
// performing deep copy, this could probably be improved
|
||||
m_image = buffer()->data().copy();
|
||||
if (auto s = surface()) {
|
||||
s->resetTrackedDamage();
|
||||
}
|
||||
}
|
||||
|
||||
void QPainterWindowPixmap::update()
|
||||
|
@ -394,9 +391,6 @@ void QPainterWindowPixmap::update()
|
|||
}
|
||||
// perform deep copy
|
||||
m_image = b->data().copy();
|
||||
if (auto s = surface()) {
|
||||
s->resetTrackedDamage();
|
||||
}
|
||||
}
|
||||
|
||||
bool QPainterWindowPixmap::isValid() const
|
||||
|
|
Loading…
Reference in a new issue