summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJan Holesovsky <kendy@collabora.com>2014-12-03 16:57:42 +0100
committerJan Holesovsky <kendy@collabora.com>2014-12-03 17:01:15 +0100
commit21f755aad421927ed622ba48d567205121500e57 (patch)
tree5f7f5b91437d0ff4cfedee391dcd037b1724454f
parent24ffd0d942716b7652bb89d1a1a7d171b1bf7bfa (diff)
windows opengl: Call PreDraw() earlier.
Change-Id: I30ceb29cc0321022733385f902685ceac78869f2
-rw-r--r--vcl/win/source/gdi/salnativewidgets-luna.cxx17
1 files changed, 8 insertions, 9 deletions
diff --git a/vcl/win/source/gdi/salnativewidgets-luna.cxx b/vcl/win/source/gdi/salnativewidgets-luna.cxx
index 401e0678d8d3..67c5a75c14e5 100644
--- a/vcl/win/source/gdi/salnativewidgets-luna.cxx
+++ b/vcl/win/source/gdi/salnativewidgets-luna.cxx
@@ -1288,19 +1288,18 @@ bool WinSalGraphics::drawNativeControl( ControlType nType,
if (ImplDrawNativeControl(aBlackDC.getCompatibleHDC(), hTheme, rc, nType, nPart, nState, aValue, aCaptionStr) &&
ImplDrawNativeControl(aWhiteDC.getCompatibleHDC(), hTheme, rc, nType, nPart, nState, aValue, aCaptionStr))
{
- boost::scoped_ptr<OpenGLTexture> pBlackTexture(aBlackDC.getTexture());
- if (!pBlackTexture)
- return false;
+ pImpl->PreDraw();
+ boost::scoped_ptr<OpenGLTexture> pBlackTexture(aBlackDC.getTexture());
boost::scoped_ptr<OpenGLTexture> pWhiteTexture(aWhiteDC.getTexture());
- if (!pWhiteTexture)
- return false;
- pImpl->PreDraw();
- pImpl->DrawTextureDiff(*pWhiteTexture, *pBlackTexture, aBlackDC.getTwoRect());
- pImpl->PostDraw();
+ if (pBlackTexture && pWhiteTexture)
+ {
+ pImpl->DrawTextureDiff(*pWhiteTexture, *pBlackTexture, aBlackDC.getTwoRect());
+ bOk = true;
+ }
- bOk = true;
+ pImpl->PostDraw();
}
}