opengl: Fix cached size check in GLTexture::render()

`destinationSize` is stored in `d->m_cachedSize` so we need to test
`d->m_cachedSize` against `destinationSize` rather than `targetSize`.
wilder/Plasma/6.3
Vlad Zahorodnii 1 year ago
parent 00a0531c5b
commit 10aaf96572
  1. 2
      src/opengl/gltexture.cpp

@ -282,7 +282,7 @@ void GLTexture::render(const QRectF &source, const QRegion &region, const QSizeF
}
const QSize destinationSize = targetSize.toSize(); // TODO: toSize is not enough to snap to the pixel grid, fix render() users and drop this toSize
if (targetSize != d->m_cachedSize || d->m_cachedSource != source || d->m_cachedContentTransform != d->m_textureToBufferTransform) {
if (destinationSize != d->m_cachedSize || d->m_cachedSource != source || d->m_cachedContentTransform != d->m_textureToBufferTransform) {
d->m_cachedSize = destinationSize;
d->m_cachedSource = source;
d->m_cachedContentTransform = d->m_textureToBufferTransform;

Loading…
Cancel
Save