Fix tlw source rect transformation for backingstore blit.

The srcRect is already in device window coordinates. Converting it
again via deviceRect(QRect, QWindow) causes it to be overly large.

Task-number: QTBUG-50613
Change-Id: Iaae390499c0d1add842bde6eec22fb07c8de663b
Reviewed-by: Laszlo Agocs <laszlo.agocs@theqtcompany.com>
This commit is contained in:
Dyami Caliri 2016-01-22 21:41:40 -08:00
parent 2fed43d843
commit c820692fc0

View File

@ -385,7 +385,7 @@ void QPlatformBackingStore::composeAndFlush(QWindow *window, const QRegion &regi
// The backingstore is for the entire tlw. // The backingstore is for the entire tlw.
// In case of native children offset tells the position relative to the tlw. // In case of native children offset tells the position relative to the tlw.
const QRect srcRect = toBottomLeftRect(deviceWindowRect.translated(offset), d_ptr->textureSize.height()); const QRect srcRect = toBottomLeftRect(deviceWindowRect.translated(offset), d_ptr->textureSize.height());
const QMatrix3x3 source = QOpenGLTextureBlitter::sourceTransform(deviceRect(srcRect, window), const QMatrix3x3 source = QOpenGLTextureBlitter::sourceTransform(srcRect,
d_ptr->textureSize, d_ptr->textureSize,
origin); origin);
d_ptr->blitter->blit(textureId, QMatrix4x4(), source); d_ptr->blitter->blit(textureId, QMatrix4x4(), source);