basegfx/source/tools/canvastools.cxx | 69 --------------------------- include/basegfx/tools/glm_canvastools.hxx | 19 +++++++ slideshow/source/engine/shapes/viewshape.cxx | 14 +++-- 3 files changed, 27 insertions(+), 75 deletions(-)
New commits: commit d25bb94103d90d440953f1339a046f200c18735a Author: Michael Jaumann <meta_...@yahoo.com> Date: Wed Feb 18 13:08:10 2015 +0000 this wrappers are alrdy in glm_canvastools.cxx Change-Id: I164c7e55c39bb33903f50c9c3792eeae616c1841 diff --git a/basegfx/source/tools/canvastools.cxx b/basegfx/source/tools/canvastools.cxx index c578e16..f59f447 100644 --- a/basegfx/source/tools/canvastools.cxx +++ b/basegfx/source/tools/canvastools.cxx @@ -334,41 +334,6 @@ namespace basegfx return output; } - 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; - } - ::basegfx::B3DHomMatrix homMatrixFromAffineMatrix3D( const ::com::sun::star::geometry::AffineMatrix3D& input ) { ::basegfx::B3DHomMatrix output; @@ -404,40 +369,6 @@ namespace basegfx 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; - } - geometry::AffineMatrix3D& affineMatrixFromHomMatrix3D( geometry::AffineMatrix3D& output, const ::basegfx::B3DHomMatrix& input) commit 4251e1a186e27f116f3958654a44d2484f41d3fe Author: Michael Jaumann <meta_...@yahoo.com> Date: Wed Feb 18 10:00:51 2015 +0000 only force sprites in case of ogl canvas, care could end in an exception Change-Id: I60c38a339ff80058f5e842d4bcfe4bf3d18b67c2 diff --git a/slideshow/source/engine/shapes/viewshape.cxx b/slideshow/source/engine/shapes/viewshape.cxx index f22699e..5e29d29 100644 --- a/slideshow/source/engine/shapes/viewshape.cxx +++ b/slideshow/source/engine/shapes/viewshape.cxx @@ -48,7 +48,7 @@ #include "tools.hxx" #include <boost/bind.hpp> - +#include <com/sun/star/lang/XServiceInfo.hpp> using namespace ::com::sun::star; @@ -853,9 +853,10 @@ namespace slideshow ENSURE_OR_RETURN_FALSE( mpViewLayer->getCanvas(), "ViewShape::update(): Invalid layer canvas" ); // Shall we render to a sprite, or to a plain canvas? - // Hack, force use of Sprites - // TODO should be only the case by using ogl canvas-> getImplementationName() - //if( isBackgroundDetached() ) + // Hack, force use of Sprites in case of ogl canvas + uno::Reference< lang::XServiceInfo > xServiceInfo(mpViewLayer->getCanvas()->getUNOCanvas(),uno::UNO_QUERY_THROW); + if( xServiceInfo->getImplementationName() == "com.sun.star.comp.rendering.SpriteCanvas.OGL" || isBackgroundDetached() ) + { return renderSprite( mpViewLayer, rMtf, rArgs.maOrigBounds, @@ -866,7 +867,8 @@ namespace slideshow rArgs.mrSubsets, rArgs.mnShapePriority, bIsVisible ); - /*else + } + else return render( mpViewLayer->getCanvas(), rMtf, rArgs.maBounds, @@ -874,7 +876,7 @@ namespace slideshow nUpdateFlags, rArgs.mrAttr, rArgs.mrSubsets, - bIsVisible );*/ + bIsVisible ); } } commit ddc7d8c0353f24ddaa88ad041fdeefabb4a3d3dc Author: Michael Jaumann <meta_...@yahoo.com> Date: Wed Feb 18 09:52:57 2015 +0000 mergeViewAndRenderTransform with glm Change-Id: I5855760456de844b9d19af3467e59fc690bf2aae diff --git a/include/basegfx/tools/glm_canvastools.hxx b/include/basegfx/tools/glm_canvastools.hxx index e9b7b43..5404198 100644 --- a/include/basegfx/tools/glm_canvastools.hxx +++ b/include/basegfx/tools/glm_canvastools.hxx @@ -25,6 +25,17 @@ #include <basegfx/basegfxdllapi.h> #include <glm/glm.hpp> +namespace com { namespace sun { namespace star { namespace geometry + { + struct AffineMatrix2D; + struct AffineMatrix3D; + } } } } + +namespace com { namespace sun { namespace star { namespace rendering + { + struct RenderState; + struct ViewState; + }}}} namespace basegfx { @@ -40,7 +51,15 @@ namespace basegfx BASEGFX_DLLPUBLIC glm::mat4 glmMatFromHomMatrix( const ::basegfx::B2DHomMatrix& input); BASEGFX_DLLPUBLIC glm::mat4 glmMatFromHomMatrix3d( const ::basegfx::B3DHomMatrix& input); + } +} +namespace canvas +{ + namespace tools + { + BASEGFX_DLLPUBLIC glm::mat4& mergeViewAndRenderTransform( const ::com::sun::star::rendering::ViewState& viewState, + const ::com::sun::star::rendering::RenderState& renderState ); } } _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits