[Libreoffice-commits] core.git: Branch 'libreoffice-4-3-0' - slideshow/source

Zolnai Tamás tamas.zolnai at collabora.com
Tue Jul 15 09:34:27 PDT 2014


 slideshow/source/engine/shapes/viewmediashape.cxx |    8 +++-----
 1 file changed, 3 insertions(+), 5 deletions(-)

New commits:
commit 0553a23b502d05c34e2618d2df5441191f0d0433
Author: Zolnai Tamás <tamas.zolnai at collabora.com>
Date:   Tue Jul 15 16:59:34 2014 +0200

    Optimize media rendering during slideshow: save one grabFrame() call
    
    'FallbackGraphic' property introduced in:
    b862a216f769d10e726ad759762b5e6a412acdaf
    contains the previously called grabFrame's
    result, so we can use that instead of render the media
    frame again (it affects glTF models too).
    
    In case of huge glTF models it can avoid run out of memory
    problem.
    
    (cherry picked from commit 358d6006f1d9652aaf01661ea8dba4d7ec46d508)
    
    Change-Id: Ia93e771e92cc7630480c665dea66fbf571dfa2a0
    Reviewed-on: https://gerrit.libreoffice.org/10338
    Reviewed-by: Michael Meeks <michael.meeks at collabora.com>
    Reviewed-by: Markus Mohrhard <markus.mohrhard at googlemail.com>
    Reviewed-by: Jan Holesovsky <kendy at collabora.com>
    Tested-by: Jan Holesovsky <kendy at collabora.com>

diff --git a/slideshow/source/engine/shapes/viewmediashape.cxx b/slideshow/source/engine/shapes/viewmediashape.cxx
index 45e29f7..2839300 100644
--- a/slideshow/source/engine/shapes/viewmediashape.cxx
+++ b/slideshow/source/engine/shapes/viewmediashape.cxx
@@ -196,16 +196,14 @@ namespace slideshow
 
             if( !mpMediaWindow.get() && !mxPlayerWindow.is() )
             {
-                OUString sURL;
-                OUString sMimeType;
+                uno::Reference< graphic::XGraphic > xGraphic;
                 uno::Reference< beans::XPropertySet > xPropSet( mxShape, uno::UNO_QUERY );
                 if (xPropSet.is())
                 {
-                    xPropSet->getPropertyValue("PrivateTempFileURL") >>= sURL;
-                    xPropSet->getPropertyValue("MediaMimeType") >>= sMimeType;
+                    xPropSet->getPropertyValue("FallbackGraphic") >>= xGraphic;
                 }
 
-                const Graphic aGraphic(avmedia::MediaWindow::grabFrame(sURL,"",sMimeType));
+                Graphic aGraphic(xGraphic);
                 const BitmapEx aBmp = aGraphic.GetBitmapEx();
 
                 uno::Reference< rendering::XBitmap > xBitmap(vcl::unotools::xBitmapFromBitmapEx(


More information about the Libreoffice-commits mailing list