List Info

Thread: Slideshow and (current?) inability to render in busy loops




Slideshow and (current?) inability to render in busy loops
user name
2007-05-22 15:44:15
Hi,

had a look at the non-functioning slideshow animations today
- the
reason is that those are mostly rendered from a busy loop
(i.e. different states of the animation are drawn without
going
through the main application loop).

Screen updates currently happen only during main loop
processing, so
this was bound to fail. Quick fix:

--- sd/source/ui/slideshow/slideshowimpl.cxx	2007-04-26
16:58:09.438549000 +0200
+++ sd/source/ui/slideshow/slideshowimpl.cxx	2007-05-22
22:24:29.543802000 +0200
 -1988,6
+1988,11 
 				 break;
 			 }
 
+#if defined(MACOSX) && defined(QUARTZ)
+             // busy loops currently render nothing on OSX
- have to
+             // go through main loop each time
+             break;
+#else
              // if UI input pending: quit busy loop (and
setup timer
              // below)
 			 if(
Application::AnyInput(INPUT_MOUSE|INPUT_KEYBOARD|INPUT_PAINT
) )
 -1998,6
+2003,7 
 			 // get CPU (e.g. X11).
 			 TimeValue aTimeout={0,1000};
 			 osl_waitThread(&aTimeout);
+#endif
 		}
 		if( mxShow.is() && ( fUpdate >= 0.0 ) )
 		{

In the long run, though, we should somehow make this work on
OSX -
IIRC, there are a few more places using this idiom (writer
& calc) ...

Cheers,

-- Thorsten

------------------------------------------------------------
---------
To unsubscribe, e-mail: mac-unsubscribeporting.openoffice.org
For additional commands, e-mail: mac-helpporting.openoffice.org


Re: Slideshow and (current?) inability to render in busy loops
user name
2007-05-22 16:37:47
Oh dear, if I only had known such "optimizations"
exist in OOo... (and
I thought my code was broken :/)

Somehow I get this feeling that the term
"cross-platform" has entirely
new meaning in OOo.

BR,

      cws cairoquartz (which is of course slightly broken in
many
other ways, still)

On 22 May 2007 22:44:15 +0200, Thorsten Behrens
<Thorsten.Behrenssun.com> wrote:
> Hi,
>
> had a look at the non-functioning slideshow animations
today - the
> reason is that those are mostly rendered from a busy
loop
> (i.e. different states of the animation are drawn
without going
> through the main application loop).
>
> Screen updates currently happen only during main loop
processing, so
> this was bound to fail. Quick fix:
>
> --- sd/source/ui/slideshow/slideshowimpl.cxx   
2007-04-26 16:58:09.438549000 +0200
> +++ sd/source/ui/slideshow/slideshowimpl.cxx   
2007-05-22 22:24:29.543802000 +0200
>  -1988,6 +1988,11 
>                                  break;
>                          }
>
> +#if defined(MACOSX) && defined(QUARTZ)
> +             // busy loops currently render nothing on
OSX - have to
> +             // go through main loop each time
> +             break;
> +#else
>               // if UI input pending: quit busy loop
(and setup timer
>               // below)
>                          if(
Application::AnyInput(INPUT_MOUSE|INPUT_KEYBOARD|INPUT_PAINT
) )
>  -1998,6 +2003,7 
>                          // get CPU (e.g. X11).
>                          TimeValue aTimeout={0,1000};
>                         
osl_waitThread(&aTimeout);
> +#endif
>                 }
>                 if( mxShow.is() && ( fUpdate
>= 0.0 ) )
>                 {
>
> In the long run, though, we should somehow make this
work on OSX -
> IIRC, there are a few more places using this idiom
(writer & calc) ...
>
> Cheers,
>
> -- Thorsten
>
>
------------------------------------------------------------
---------
> To unsubscribe, e-mail: mac-unsubscribeporting.openoffice.org
> For additional commands, e-mail: mac-helpporting.openoffice.org
>
>


-- 
Mox on G

------------------------------------------------------------
---------
To unsubscribe, e-mail: mac-unsubscribeporting.openoffice.org
For additional commands, e-mail: mac-helpporting.openoffice.org


Re: Slideshow and (current?) inability to render in busy loops
user name
2007-05-22 16:43:49
Hi Thorsten,

Thank you very much !  I have tested several anima	tions,
and looks like 
it works 

Issue 77692 created : 
http://www.openoffice.org/issues/show_bug.cgi?id=77692


(patch is attached)


Regards,
Eric Bachard

------------------------------------------------------------
---------
To unsubscribe, e-mail: mac-unsubscribeporting.openoffice.org
For additional commands, e-mail: mac-helpporting.openoffice.org


[1-3]

about | contact  Other archives ( Real Estate discussion Medical topics )