[Libreoffice-commits] core.git: vcl/headless vcl/qt5 vcl/quartz vcl/source vcl/unx vcl/win

Noel Grandin noel.grandin at collabora.co.uk
Mon Apr 16 10:20:45 UTC 2018


 vcl/headless/svpbmp.cxx        |    4 +++-
 vcl/qt5/Qt5Bitmap.cxx          |    2 ++
 vcl/quartz/salbmp.cxx          |    1 +
 vcl/source/gdi/impbmp.cxx      |    3 ---
 vcl/unx/generic/gdi/salbmp.cxx |    1 +
 vcl/win/gdi/salbmp.cxx         |    2 ++
 6 files changed, 9 insertions(+), 4 deletions(-)

New commits:
commit b36ea44dcbdb862b0ac6e6cdaf27225b43dc0c7e
Author: Noel Grandin <noel.grandin at collabora.co.uk>
Date:   Mon Apr 16 10:04:36 2018 +0200

    push logic from ImpBitmap::ImplReleaseBuffer down
    
    in preparation for removing ImpBitmap
    
    Change-Id: Icae48c081d821518103d08a7b62bcb4d64654c35
    Reviewed-on: https://gerrit.libreoffice.org/52939
    Tested-by: Jenkins <ci at libreoffice.org>
    Reviewed-by: Noel Grandin <noel.grandin at collabora.co.uk>

diff --git a/vcl/headless/svpbmp.cxx b/vcl/headless/svpbmp.cxx
index 28b64508bd81..3228e03bf036 100644
--- a/vcl/headless/svpbmp.cxx
+++ b/vcl/headless/svpbmp.cxx
@@ -271,8 +271,10 @@ BitmapBuffer* SvpSalBitmap::AcquireBuffer(BitmapAccessMode)
     return mpDIB;
 }
 
-void SvpSalBitmap::ReleaseBuffer(BitmapBuffer*, BitmapAccessMode)
+void SvpSalBitmap::ReleaseBuffer(BitmapBuffer*, BitmapAccessMode nMode)
 {
+    if( nMode == BitmapAccessMode::Write )
+        InvalidateChecksum();
 }
 
 bool SvpSalBitmap::GetSystemData( BitmapSystemData& )
diff --git a/vcl/qt5/Qt5Bitmap.cxx b/vcl/qt5/Qt5Bitmap.cxx
index f14479fd9419..f5c943d80877 100644
--- a/vcl/qt5/Qt5Bitmap.cxx
+++ b/vcl/qt5/Qt5Bitmap.cxx
@@ -228,6 +228,8 @@ void Qt5Bitmap::ReleaseBuffer(BitmapBuffer* pBuffer, BitmapAccessMode /*nMode*/)
         m_pImage->setColorTable(aColorTable);
     }
     delete pBuffer;
+    if (nMode == BitmapAccessMode::Write)
+        InvalidateChecksum();
 }
 
 bool Qt5Bitmap::GetSystemData(BitmapSystemData& /*rData*/) { return false; }
diff --git a/vcl/quartz/salbmp.cxx b/vcl/quartz/salbmp.cxx
index 5333eca2b961..891370a96833 100644
--- a/vcl/quartz/salbmp.cxx
+++ b/vcl/quartz/salbmp.cxx
@@ -805,6 +805,7 @@ void QuartzSalBitmap::ReleaseBuffer( BitmapBuffer* pBuffer, BitmapAccessMode nMo
         {
             DestroyContext();
         }
+        InvalidateChecksum();
     }
 
     delete pBuffer;
diff --git a/vcl/source/gdi/impbmp.cxx b/vcl/source/gdi/impbmp.cxx
index f82d80d88a4c..ffd7f4cb45cf 100644
--- a/vcl/source/gdi/impbmp.cxx
+++ b/vcl/source/gdi/impbmp.cxx
@@ -85,9 +85,6 @@ BitmapBuffer* ImpBitmap::ImplAcquireBuffer( BitmapAccessMode nMode )
 void ImpBitmap::ImplReleaseBuffer( BitmapBuffer* pBuffer, BitmapAccessMode nMode )
 {
     mpSalBitmap->ReleaseBuffer( pBuffer, nMode );
-
-    if( nMode == BitmapAccessMode::Write )
-        ImplInvalidateChecksum();
 }
 
 BitmapChecksum ImpBitmap::ImplGetChecksum() const
diff --git a/vcl/unx/generic/gdi/salbmp.cxx b/vcl/unx/generic/gdi/salbmp.cxx
index e5db7853548f..e0a43e3e7a6d 100644
--- a/vcl/unx/generic/gdi/salbmp.cxx
+++ b/vcl/unx/generic/gdi/salbmp.cxx
@@ -887,6 +887,7 @@ void X11SalBitmap::ReleaseBuffer( BitmapBuffer*, BitmapAccessMode nMode )
 
         if( mpCache )
             mpCache->ImplRemove( this );
+        InvalidateChecksum();
     }
 }
 
diff --git a/vcl/win/gdi/salbmp.cxx b/vcl/win/gdi/salbmp.cxx
index e33005efea6a..d9a3603a9ea8 100644
--- a/vcl/win/gdi/salbmp.cxx
+++ b/vcl/win/gdi/salbmp.cxx
@@ -957,6 +957,8 @@ void WinSalBitmap::ReleaseBuffer( BitmapBuffer* pBuffer, BitmapAccessMode nMode
 
         delete pBuffer;
     }
+    if( nMode == BitmapAccessMode::Write )
+        InvalidateChecksum();
 }
 
 void WinSalBitmap::ImplDecodeRLEBuffer( const BYTE* pSrcBuf, BYTE* pDstBuf,


More information about the Libreoffice-commits mailing list