[Libreoffice-commits] core.git: Branch 'libreoffice-6-1' - canvas/Library_vclcanvas.mk canvas/source

Libreoffice Gerrit user logerrit at kemper.freedesktop.org
Fri Jul 27 15:46:33 UTC 2018


 canvas/Library_vclcanvas.mk        |    5 ++++-
 canvas/source/vcl/spritehelper.cxx |    6 +++++-
 2 files changed, 9 insertions(+), 2 deletions(-)

New commits:
commit a44843e8e324e00995dd4be0bd3244c85d91bd85
Author:     Miklos Vajna <vmiklos at collabora.co.uk>
AuthorDate: Fri Jul 20 14:09:36 2018 +0200
Commit:     Michael Meeks <michael.meeks at collabora.com>
CommitDate: Fri Jul 27 17:46:08 2018 +0200

    tdf#118107 canvas opengl: avoid assertion failure with negative widths
    
    In case an Impress shape has a "Fade in and Swivel" animation attached,
    canvas calls OutputDevice::DrawBitmapEx() with a negative width. This
    results in a call to OutputDevice::DrawDeviceAlphaBitmap(), which
    asserts that the height/width is not negative.
    
    Fix the problem by transforming the bitmap before calling
    OutputDevice::DrawBitmapEx() in the GL case, similarly to how "complex"
    transformations are handled already.
    
    (cherry picked from commit 76b43425d764fbc9bf4dac52054b1d94344f26b0)
    
    Change-Id: I65ccc8a984132c5921d6096bfe9c7a8fcfacd8dd
    Reviewed-on: https://gerrit.libreoffice.org/57781
    Tested-by: Jenkins
    Reviewed-by: Michael Meeks <michael.meeks at collabora.com>

diff --git a/canvas/Library_vclcanvas.mk b/canvas/Library_vclcanvas.mk
index 805cefc43c77..6ff19eba6130 100644
--- a/canvas/Library_vclcanvas.mk
+++ b/canvas/Library_vclcanvas.mk
@@ -21,7 +21,10 @@ $(eval $(call gb_Library_Library,vclcanvas))
 
 $(eval $(call gb_Library_set_componentfile,vclcanvas,canvas/source/vcl/vclcanvas))
 
-$(eval $(call gb_Library_use_external,vclcanvas,boost_headers))
+$(eval $(call gb_Library_use_externals,vclcanvas,\
+	boost_headers \
+	epoxy \
+))
 
 $(eval $(call gb_Library_use_sdk_api,vclcanvas))
 
diff --git a/canvas/source/vcl/spritehelper.cxx b/canvas/source/vcl/spritehelper.cxx
index 9424d4ec54b9..be70d6e2ff6b 100644
--- a/canvas/source/vcl/spritehelper.cxx
+++ b/canvas/source/vcl/spritehelper.cxx
@@ -37,6 +37,7 @@
 #include <vcl/canvastools.hxx>
 #include <vcl/outdev.hxx>
 #include <vcl/BitmapMonochromeFilter.hxx>
+#include <vcl/opengl/OpenGLHelper.hxx>
 
 #include <canvas/canvastools.hxx>
 
@@ -182,8 +183,11 @@ namespace vclcanvas
 
             if( !bIdentityTransform )
             {
+                // Avoid the trick with the negative width in the OpenGL case,
+                // OutputDevice::DrawDeviceAlphaBitmap() doesn't like it.
                 if( !::basegfx::fTools::equalZero( aTransform.get(0,1) ) ||
-                    !::basegfx::fTools::equalZero( aTransform.get(1,0) ) )
+                    !::basegfx::fTools::equalZero( aTransform.get(1,0) ) ||
+                    OpenGLHelper::isVCLOpenGLEnabled())
                 {
                     // "complex" transformation, employ affine
                     // transformator


More information about the Libreoffice-commits mailing list