summaryrefslogtreecommitdiff
path: root/slideshow
diff options
context:
space:
mode:
authorZolnai Tamás <tamas.zolnai@collabora.com>2014-06-30 16:59:42 +0200
committerZolnai Tamás <tamas.zolnai@collabora.com>2014-06-30 18:17:19 +0200
commit358d6006f1d9652aaf01661ea8dba4d7ec46d508 (patch)
tree9963759cdb745a3f0af81ad646dcd5393d29c667 /slideshow
parent1caad856de1c1c5b0a8c31d2226416a2db9632cd (diff)
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). Change-Id: Ia93e771e92cc7630480c665dea66fbf571dfa2a0
Diffstat (limited to 'slideshow')
-rw-r--r--slideshow/source/engine/shapes/viewmediashape.cxx8
1 files changed, 3 insertions, 5 deletions
diff --git a/slideshow/source/engine/shapes/viewmediashape.cxx b/slideshow/source/engine/shapes/viewmediashape.cxx
index c11aaf525a25..9ebc0149456c 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(