direct2d: Fix window resize with translucent windows
If the size of the window has changed, the backing bitmap should be reset with the new geometry. Change-Id: I1ca430cd7b5df1845b4fef31f5bf8f05d889a2fc Reviewed-by: Louai Al-Khanji <louai.al-khanji@theqtcompany.com>bb10
parent
a570e8b0f6
commit
d6c1a9cb26
|
|
@ -199,12 +199,13 @@ void QWindowsDirect2DWindow::setupSwapChain()
|
|||
|
||||
void QWindowsDirect2DWindow::resizeSwapChain(const QSize &size)
|
||||
{
|
||||
if (!m_swapChain)
|
||||
return;
|
||||
|
||||
m_pixmap.reset();
|
||||
m_bitmap.reset();
|
||||
m_deviceContext->SetTarget(Q_NULLPTR);
|
||||
m_needsFullFlush = true;
|
||||
|
||||
if (!m_swapChain)
|
||||
return;
|
||||
|
||||
HRESULT hr = m_swapChain->ResizeBuffers(0,
|
||||
size.width(), size.height(),
|
||||
|
|
@ -212,8 +213,6 @@ void QWindowsDirect2DWindow::resizeSwapChain(const QSize &size)
|
|||
0);
|
||||
if (FAILED(hr))
|
||||
qWarning("%s: Could not resize swap chain: %#x", __FUNCTION__, hr);
|
||||
|
||||
m_needsFullFlush = true;
|
||||
}
|
||||
|
||||
QSharedPointer<QWindowsDirect2DBitmap> QWindowsDirect2DWindow::copyBackBuffer() const
|
||||
|
|
|
|||
Loading…
Reference in New Issue