[Libreoffice-commits] core.git: vcl/opengl

Michael Meeks michael.meeks at collabora.com
Tue Feb 9 18:27:17 UTC 2016


 vcl/opengl/salbmp.cxx |    6 ++++++
 1 file changed, 6 insertions(+)

New commits:
commit a6ce77b508cdcda0a65fa3802daf7a6ef757af43
Author: Michael Meeks <michael.meeks at collabora.com>
Date:   Tue Feb 9 17:04:42 2016 +0000

    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 at gmail.com>
    Tested-by: Tomaž Vajngerl <quikee at 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;


More information about the Libreoffice-commits mailing list