diff options
author | Tomaž Vajngerl <tomaz.vajngerl@collabora.co.uk> | 2024-08-01 19:35:01 +0200 |
---|---|---|
committer | Miklos Vajna <vmiklos@collabora.com> | 2024-10-15 11:43:57 +0200 |
commit | 9dd7ad6e265d852416e46ee79f7b0cb6d174ca64 (patch) | |
tree | f2af0f5de2acef9208086f89abc339b5fda29878 /slideshow/source | |
parent | 0f74a4c2bf156f38e188e0a4271ba37cf688181d (diff) |
slideshow: add flag to skip animation rendering
Animations currently don't work yet, so skip rendering them by
default, or they cause infinite rendering loop in some cases.
Change-Id: Iaf6e7d67197e86c21af65ecd3bba656c23fd74eb
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/174962
Tested-by: Jenkins
Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
Diffstat (limited to 'slideshow/source')
-rw-r--r-- | slideshow/source/engine/slide/slideimpl.cxx | 19 |
1 files changed, 14 insertions, 5 deletions
diff --git a/slideshow/source/engine/slide/slideimpl.cxx b/slideshow/source/engine/slide/slideimpl.cxx index 5c8fd9e28f3a..80f652d1287a 100644 --- a/slideshow/source/engine/slide/slideimpl.cxx +++ b/slideshow/source/engine/slide/slideimpl.cxx @@ -165,7 +165,8 @@ public: const uno::Reference<drawing::XDrawPagesSupplier>& rxDrawPagesSupplier, const uno::Reference<animations::XAnimationNode>& rxRootNode, const SlideShowContext& rContext, - const std::shared_ptr<LayerManager>& pLayerManager); + const std::shared_ptr<LayerManager>& pLayerManager, + bool bSkipAnimations); void renderNextLayer(unsigned char* pBuffer); @@ -225,6 +226,7 @@ private: OUString msLastPlaceholder; bool mbIsBitmapLayer; + bool mbSkipAnimations = false; OString msLastJsonMessage; }; @@ -234,8 +236,10 @@ LOKSlideRenderer::LOKSlideRenderer(const Size& rViewSize, const Size& rSlideSize const uno::Reference<drawing::XDrawPagesSupplier>& rxDrawPagesSupplier, const uno::Reference<animations::XAnimationNode>& rxRootNode, const SlideShowContext& rContext, - const std::shared_ptr<LayerManager>& pLayerManager) : - maDeviceSize(rViewSize), + const std::shared_ptr<LayerManager>& pLayerManager, + bool bSkipAnimations) + + : maDeviceSize(rViewSize), maSlideSize(rSlideSize), //mbRenderBackground(bRenderBackground), //mbRenderMasterPageObjects(bRenderMasterPageObjects), @@ -255,7 +259,8 @@ LOKSlideRenderer::LOKSlideRenderer(const Size& rViewSize, const Size& rSlideSize mbIsPageNumberVisible(true), mbIsDateTimeVisible(true), mbIsFooterVisible(true), - mbIsBitmapLayer(false) + mbIsBitmapLayer(false), + mbSkipAnimations(bSkipAnimations) { uno::Reference< drawing::XMasterPageTarget > xMasterPageTarget( mxDrawPage, uno::UNO_QUERY ); if( xMasterPageTarget.is() ) @@ -752,6 +757,9 @@ void LOKSlideRenderer::renderLayerBitmapImpl(VirtualDevice& rDevice) void LOKSlideRenderer::collectAnimatedShapes() { + if (mbSkipAnimations) + return; + if (!mxRootNode.is()) return; @@ -1411,7 +1419,8 @@ Size SlideImpl::createLOKSlideRenderer(int nViewWidth, int nViewHeight, bRenderBackground, bRenderMasterPageObjects, mxDrawPage, mxDrawPagesSupplier, - mxRootNode, maContext, mpLayerManager); + mxRootNode, maContext, mpLayerManager, + true); if (mpLOKRenderer) { return mpLOKRenderer->getDeviceSize(); |