[Libreoffice-commits] core.git: canvas/source include/vcl vcl/source

Noel Grandin noel.grandin at collabora.co.uk
Wed Mar 28 20:16:52 UTC 2018


 canvas/source/cairo/cairo_canvashelper.cxx |    6 +++---
 include/vcl/BitmapTools.hxx                |    2 +-
 vcl/source/bitmap/BitmapTools.cxx          |    6 +++---
 3 files changed, 7 insertions(+), 7 deletions(-)

New commits:
commit 290a954a355852a967a0e7e8a28447b0b9d2a46b
Author: Noel Grandin <noel.grandin at collabora.co.uk>
Date:   Wed Mar 28 15:32:54 2018 +0200

    tdf#116646 Slideshows with transitions page swap rendering issues
    
    regression from
        commit 5b75a1697250d8b2b6003c37067f39270a5ad828
        move cairo extract bitmap code from canvas to vcl
    
    Change-Id: Ic8d7cd9d54010ae272073877da18a985e931e22a
    Reviewed-on: https://gerrit.libreoffice.org/52005
    Tested-by: Jenkins <ci at libreoffice.org>
    Tested-by: Xisco FaulĂ­ <xiscofauli at libreoffice.org>
    Reviewed-by: Noel Grandin <noel.grandin at collabora.co.uk>

diff --git a/canvas/source/cairo/cairo_canvashelper.cxx b/canvas/source/cairo/cairo_canvashelper.cxx
index 2ed3d0472c04..ec76b51bacb5 100644
--- a/canvas/source/cairo/cairo_canvashelper.cxx
+++ b/canvas/source/cairo/cairo_canvashelper.cxx
@@ -363,10 +363,10 @@ namespace cairocanvas
 
             if( !pSurface )
             {
-                vcl::bitmap::CanvasCairoExtractBitmapData(aBmpEx, aBitmap, data, bHasAlpha);
+                long nWidth;
+                long nHeight;
+                vcl::bitmap::CanvasCairoExtractBitmapData(aBmpEx, aBitmap, data, bHasAlpha, nWidth, nHeight);
 
-                const long nWidth = aBmpEx.GetPrefSize().Width();
-                const long nHeight = aBmpEx.GetPrefSize().Height();
                 SurfaceSharedPtr pImageSurface = rSurfaceProvider->getOutputDevice()->CreateSurface(
                     CairoSurfaceSharedPtr(
                         cairo_image_surface_create_for_data(
diff --git a/include/vcl/BitmapTools.hxx b/include/vcl/BitmapTools.hxx
index 43f0d07579f7..75c68e9ab67a 100644
--- a/include/vcl/BitmapTools.hxx
+++ b/include/vcl/BitmapTools.hxx
@@ -102,7 +102,7 @@ VCL_DLLPUBLIC css::uno::Sequence< sal_Int8 > GetMaskDIB(BitmapEx const & aBmpEx)
  * @param data will be filled with alpha data, if xBitmap is alpha/transparent image
  * @param bHasAlpha will be set to true if resulting surface has alpha
  **/
-VCL_DLLPUBLIC void CanvasCairoExtractBitmapData( BitmapEx & rBmpEx, Bitmap & rBitmap, unsigned char*& data, bool& bHasAlpha );
+VCL_DLLPUBLIC void CanvasCairoExtractBitmapData( BitmapEx & rBmpEx, Bitmap & rBitmap, unsigned char*& data, bool& bHasAlpha, long& rnWidth, long& rnHeight );
 
 VCL_DLLPUBLIC css::uno::Sequence< sal_Int8 > CanvasExtractBitmapData(BitmapEx & rBitmapEx, const css::geometry::IntegerRectangle2D& rect);
 
diff --git a/vcl/source/bitmap/BitmapTools.cxx b/vcl/source/bitmap/BitmapTools.cxx
index cfc4734c8aa0..28fc6f0b962a 100644
--- a/vcl/source/bitmap/BitmapTools.cxx
+++ b/vcl/source/bitmap/BitmapTools.cxx
@@ -719,14 +719,14 @@ static bool readAlpha( BitmapReadAccess const * pAlphaReadAcc, long nY, const lo
  * @param data will be filled with alpha data, if xBitmap is alpha/transparent image
  * @param bHasAlpha will be set to true if resulting surface has alpha
  **/
-void CanvasCairoExtractBitmapData( BitmapEx & aBmpEx, Bitmap & aBitmap, unsigned char*& data, bool& bHasAlpha )
+void CanvasCairoExtractBitmapData( BitmapEx & aBmpEx, Bitmap & aBitmap, unsigned char*& data, bool& bHasAlpha, long& rnWidth, long& rnHeight )
 {
     AlphaMask aAlpha = aBmpEx.GetAlpha();
 
     ::BitmapReadAccess* pBitmapReadAcc = aBitmap.AcquireReadAccess();
     ::BitmapReadAccess* pAlphaReadAcc = nullptr;
-    const long      nWidth = pBitmapReadAcc->Width();
-    const long      nHeight = pBitmapReadAcc->Height();
+    const long      nWidth = rnWidth = pBitmapReadAcc->Width();
+    const long      nHeight = rnHeight = pBitmapReadAcc->Height();
     long nX, nY;
     bool bIsAlpha = false;
 


More information about the Libreoffice-commits mailing list