.gitignore                                   |    9 ++
 basegfx/Library_basegfx.mk                   |    6 +
 basegfx/source/tools/glm_canvastools.cxx     |  112 +++++++++++++++++++++++++++
 canvas/Library_oglcanvas.mk                  |    1 
 include/basegfx/tools/canvastools.hxx        |   12 --
 include/basegfx/tools/glm_canvastools.hxx    |   49 +++++++++++
 slideshow/source/engine/shapes/viewshape.cxx |    8 +
 7 files changed, 182 insertions(+), 15 deletions(-)

New commits:
commit 4be8205ed4c715e0ac6ed382f0011f38363e2005
Author: Michael Jaumann <meta_...@yahoo.com>
Date:   Mon Feb 16 14:44:32 2015 +0000

    Hack! force using sprites
    
    Change-Id: If601a687a9c39394cc39b3b35956380378db4071

diff --git a/slideshow/source/engine/shapes/viewshape.cxx 
b/slideshow/source/engine/shapes/viewshape.cxx
index edbd666..f22699e 100644
--- a/slideshow/source/engine/shapes/viewshape.cxx
+++ b/slideshow/source/engine/shapes/viewshape.cxx
@@ -853,7 +853,9 @@ namespace slideshow
             ENSURE_OR_RETURN_FALSE( mpViewLayer->getCanvas(), 
"ViewShape::update(): Invalid layer canvas" );
 
             // Shall we render to a sprite, or to a plain canvas?
-            if( isBackgroundDetached() )
+            // Hack, force use of Sprites
+            // TODO should be only the case by using ogl canvas-> 
getImplementationName()
+            //if( isBackgroundDetached() )
                 return renderSprite( mpViewLayer,
                                      rMtf,
                                      rArgs.maOrigBounds,
@@ -864,7 +866,7 @@ namespace slideshow
                                      rArgs.mrSubsets,
                                      rArgs.mnShapePriority,
                                      bIsVisible );
-            else
+            /*else
                 return render( mpViewLayer->getCanvas(),
                                rMtf,
                                rArgs.maBounds,
@@ -872,7 +874,7 @@ namespace slideshow
                                nUpdateFlags,
                                rArgs.mrAttr,
                                rArgs.mrSubsets,
-                               bIsVisible );
+                               bIsVisible );*/
         }
 
     }
commit c3f893291e71b65554934bc439aa1a8de1b7826a
Author: Michael Jaumann <meta_...@yahoo.com>
Date:   Tue Nov 4 08:18:40 2014 +0000

    fdo#86190 glmwrappers for bdhommatrix/affinematrix
    
    Conflicts:
    
        include/basegfx/tools/canvastools.hxx
    
    Change-Id: I0ff0b5ed82bbe9dc0ed264b71f6cea5a72809aff

diff --git a/.gitignore b/.gitignore
index 1e29927..0b8efd2 100644
--- a/.gitignore
+++ b/.gitignore
@@ -56,6 +56,9 @@
 /AUTHORS
 /MAINTAINERS
 
+#lhm stuff
+build-lhm.sh
+
 # make tags
 
 /tags
@@ -105,3 +108,9 @@ xcuserdata
 # gdb config
 /.gdbinit
 /.gdb_history
+
+#ctags
+/canvas/.tags
+/canvas/.tags_sorted_by_file
+/extras/source/gallery/gallery_system/sg1.sdv
+
diff --git a/basegfx/Library_basegfx.mk b/basegfx/Library_basegfx.mk
index 95ba931..7fd5541 100644
--- a/basegfx/Library_basegfx.mk
+++ b/basegfx/Library_basegfx.mk
@@ -9,7 +9,10 @@
 
 $(eval $(call gb_Library_Library,basegfx))
 
-$(eval $(call gb_Library_use_external,basegfx,boost_headers))
+$(eval $(call gb_Library_use_externals,basegfx, \
+    boost_headers \
+    glm_headers \
+))
 
 $(eval $(call 
gb_Library_set_precompiled_header,basegfx,$(SRCDIR)/basegfx/inc/pch/precompiled_basegfx))
 
@@ -70,6 +73,7 @@ $(eval $(call gb_Library_add_exception_objects,basegfx,\
     basegfx/source/raster/rasterconvert3d \
     basegfx/source/tools/b2dclipstate \
     basegfx/source/tools/canvastools \
+    basegfx/source/tools/glm_canvastools \
     basegfx/source/tools/gradienttools \
     basegfx/source/tools/keystoplerp \
     basegfx/source/tools/numbertools \
diff --git a/basegfx/source/tools/glm_canvastools.cxx 
b/basegfx/source/tools/glm_canvastools.cxx
new file mode 100644
index 0000000..e4a3907
--- /dev/null
+++ b/basegfx/source/tools/glm_canvastools.cxx
@@ -0,0 +1,112 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ *   Licensed to the Apache Software Foundation (ASF) under one or more
+ *   contributor license agreements. See the NOTICE file distributed
+ *   with this work for additional information regarding copyright
+ *   ownership. The ASF licenses this file to you under the Apache
+ *   License, Version 2.0 (the "License"); you may not use this file
+ *   except in compliance with the License. You may obtain a copy of
+ *   the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ */
+
+#include <com/sun/star/geometry/AffineMatrix2D.hpp>
+#include <com/sun/star/geometry/AffineMatrix3D.hpp>
+#include <basegfx/matrix/b2dhommatrix.hxx>
+#include <basegfx/matrix/b3dhommatrix.hxx>
+#include <basegfx/tools/glm_canvastools.hxx>
+#include <limits>
+
+using namespace ::com::sun::star;
+
+namespace basegfx
+{
+
+    namespace unotools
+    {
+        namespace
+        {
+
+
+        glm::mat4 glmMatrixFromAffineMatrix( const 
::com::sun::star::geometry::AffineMatrix2D& input )
+        {
+            // ensure last row is [0,0,1] (and optimized away)
+            glm::mat4 output;
+            output[0][0] = input.m00;
+            output[1][0] = input.m01;
+            output[2][0] = input.m02;
+            output[0][1] = input.m10;
+            output[1][1] = input.m11;
+            output[2][1] = input.m12;
+
+            return output;
+        }
+
+        glm::mat4 glmMatrixFromAffineMatrix3D( const 
::com::sun::star::geometry::AffineMatrix3D& input )
+        {
+            glm::mat4 output;
+            output[0][0] = input.m00;
+            output[1][0] = input.m01;
+            output[2][0] = input.m02;
+            output[3][0] = input.m03;
+
+            output[0][1] = input.m10;
+            output[1][1] = input.m11;
+            output[2][1] = input.m12;
+            output[3][1] = input.m13;
+
+            output[0][2] = input.m20;
+            output[1][2] = input.m21;
+            output[2][2] = input.m22;
+            output[3][2] = input.m23;
+
+            return output;
+        }
+
+
+        glm::mat4 glmMatFromHomMatrix( const ::basegfx::B2DHomMatrix& input)
+        {
+            glm::mat4 output;
+            output[0][0] = input.get(0,0);
+            output[1][0] = input.get(0,1);
+            output[2][0] = input.get(0,2);
+            output[0][1] = input.get(1,0);
+            output[1][1] = input.get(1,1);
+            output[2][1] = input.get(1,2);
+
+            return output;
+        }
+
+        glm::mat4 glmMatFromHomMatrix3d( const ::basegfx::B3DHomMatrix& input)
+        {
+            glm::mat4 output;
+            output[0][0] = input.get(0,0);
+            output[1][0] = input.get(0,1);
+            output[2][0] = input.get(0,2);
+            output[3][0] = input.get(0,3);
+
+            output[0][1] = input.get(1,0);
+            output[1][1] = input.get(1,1);
+            output[2][1] = input.get(1,2);
+            output[3][1] = input.get(1,3);
+
+            output[0][2] = input.get(2,0);
+            output[1][2] = input.get(2,1);
+            output[2][2] = input.get(2,2);
+            output[3][2] = input.get(2,3);
+
+            return output;
+        }
+    } // namespace bgfxtools
+
+} // namespace canvas
+}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/canvas/Library_oglcanvas.mk b/canvas/Library_oglcanvas.mk
index 17edbb1..bf2e06c 100644
--- a/canvas/Library_oglcanvas.mk
+++ b/canvas/Library_oglcanvas.mk
@@ -46,6 +46,7 @@ $(eval $(call gb_Library_use_externals,oglcanvas,\
        boost_headers \
        glew \
        mesa_headers \
+       glm_headers \
 ))
 
 ifeq ($(strip $(OS)),MACOSX)
diff --git a/include/basegfx/tools/canvastools.hxx 
b/include/basegfx/tools/canvastools.hxx
index 2a3030a..c1143fc 100644
--- a/include/basegfx/tools/canvastools.hxx
+++ b/include/basegfx/tools/canvastools.hxx
@@ -23,7 +23,6 @@
 #include <com/sun/star/uno/Reference.hxx>
 #include <com/sun/star/uno/Sequence.hxx>
 #include <basegfx/basegfxdllapi.h>
-#include <glm/glm.hpp>
 
 
 namespace com { namespace sun { namespace star { namespace geometry
@@ -129,21 +128,12 @@ namespace basegfx
         BASEGFX_DLLPUBLIC ::basegfx::B2DHomMatrix&
             homMatrixFromAffineMatrix( ::basegfx::B2DHomMatrix&                
             transform,
                                        const 
::com::sun::star::geometry::AffineMatrix2D&    matrix );
-       BASEGFX_DLLPUBLIC ::basegfx::B3DHomMatrix
+        BASEGFX_DLLPUBLIC ::basegfx::B3DHomMatrix
             homMatrixFromAffineMatrix3D( const 
::com::sun::star::geometry::AffineMatrix3D& matrix );
 
-
-
-        BASEGFX_DLLPUBLIC glm::mat4 glmMatrixFromAffineMatrix( const 
::com::sun::star::geometry::AffineMatrix2D&   matrix );
-
-        BASEGFX_DLLPUBLIC glm::mat4 glmMatrixFromAffineMatrix3D( const 
::com::sun::star::geometry::AffineMatrix3D& matrix );
-
         BASEGFX_DLLPUBLIC ::com::sun::star::geometry::Matrix2D&
             matrixFromHomMatrix( ::com::sun::star::geometry::Matrix2D& matrix,
                                  const ::basegfx::B2DHomMatrix&        
transform);
-        BASEGFX_DLLPUBLIC glm::mat4 glmMatFromHomMatrix( const 
::basegfx::B2DHomMatrix& input);
-
-        BASEGFX_DLLPUBLIC glm::mat4 glmMatFromHomMatrix3d( const 
::basegfx::B3DHomMatrix& input);
 
         // Geometry conversions
 
diff --git a/include/basegfx/tools/glm_canvastools.hxx 
b/include/basegfx/tools/glm_canvastools.hxx
new file mode 100644
index 0000000..e9b7b43
--- /dev/null
+++ b/include/basegfx/tools/glm_canvastools.hxx
@@ -0,0 +1,49 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ *   Licensed to the Apache Software Foundation (ASF) under one or more
+ *   contributor license agreements. See the NOTICE file distributed
+ *   with this work for additional information regarding copyright
+ *   ownership. The ASF licenses this file to you under the Apache
+ *   License, Version 2.0 (the "License"); you may not use this file
+ *   except in compliance with the License. You may obtain a copy of
+ *   the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ */
+
+#ifndef INCLUDED_BASEGFX_TOOLS_GLM_CANVASTOOLS_HXX
+#define INCLUDED_BASEGFX_TOOLS_GLM_CANVASTOOLS_HXX
+
+#include <com/sun/star/uno/Reference.hxx>
+#include <com/sun/star/uno/Sequence.hxx>
+#include <basegfx/basegfxdllapi.h>
+#include <glm/glm.hpp>
+
+
+namespace basegfx
+{
+
+
+    namespace unotools
+    {
+
+        BASEGFX_DLLPUBLIC glm::mat4 glmMatrixFromAffineMatrix( const 
::com::sun::star::geometry::AffineMatrix2D&   matrix );
+
+        BASEGFX_DLLPUBLIC glm::mat4 glmMatrixFromAffineMatrix3D( const 
::com::sun::star::geometry::AffineMatrix3D& matrix );
+
+        BASEGFX_DLLPUBLIC glm::mat4 glmMatFromHomMatrix( const 
::basegfx::B2DHomMatrix& input);
+
+        BASEGFX_DLLPUBLIC glm::mat4 glmMatFromHomMatrix3d( const 
::basegfx::B3DHomMatrix& input);
+
+    }
+}
+
+#endif // INCLUDED_BASEGFX_TOOLS_GLM_CANVASTOOLS_HXX
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
_______________________________________________
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits

Reply via email to