vcl: opengl - do some writes on the CPU to help valgrind in debug mode.
Change-Id: Ic44a458f7717647f399a9419fcdc8acc812edc97
Reviewed-on: https://gerrit.libreoffice.org/22241
Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
Tested-by: Tomaž Vajngerl <quikee@gmail.com>
diff --git a/vcl/opengl/salbmp.cxx b/vcl/opengl/salbmp.cxx
index cacd157..6c468fb 100644
--- a/vcl/opengl/salbmp.cxx
+++ b/vcl/opengl/salbmp.cxx
@@ -534,6 +534,12 @@ bool OpenGLSalBitmap::ReadTexture()
{
determineTextureFormat(mnBits, nFormat, nType);
#if OSL_DEBUG_LEVEL > 0
// help valgrind & drmemory rescue us - touch last and first bits.
pData[0] = 0;
pData[mnBits/8*mnWidth*mnHeight-1] = 0;
#endif
maTexture.Read(nFormat, nType, pData);
mnBufWidth = mnWidth;
mnBufHeight = mnHeight;