Bug 352876

Summary: [PATCH] Presentation: correct durations for "Fade" transition effect by doing 20 FPS instead of 100 frames total
Product: [Applications] okular Reporter: Arseniy Lartsev <receive-spam>
Component: generalAssignee: Okular developers <okular-devel>
Status: RESOLVED FIXED    
Severity: normal CC: luigi.toscano
Priority: NOR    
Version: 0.23.0   
Target Milestone: ---   
Platform: Compiled Sources   
OS: Linux   
Latest Commit: Version Fixed In:
Attachments: The patch
Test case (2 slides, 0.3 s long fade transition)

Description Arseniy Lartsev 2015-09-18 13:53:40 UTC
Right now, fade transition is always done in 100 frames. If the intended duration is, say, 1 second, the actual duration can easily be a few seconds instead, due to the limited CPU power (on my laptop with core i5, those 100 frames take 2 seconds).

I propose a patch that changes the number of frames to 20*(duration in seconds). 20 FPS still looks completely smooth to me.

Reproducible: Always

Steps to Reproduce:
1. Open a PDF with 1 second long fade transitions
2. Start a presentation


Actual Results:  
Transitions take 2 seconds, limited by the CPU power

Expected Results:  
Transitions take 1 second
Comment 1 Arseniy Lartsev 2015-09-18 13:54:50 UTC
Created attachment 94630 [details]
The patch
Comment 2 Luigi Toscano 2015-09-18 13:58:30 UTC
Please submit the patch through https://git.reviewboard.kde.org/
Comment 3 Arseniy Lartsev 2015-09-27 19:35:52 UTC
Created attachment 94748 [details]
Test case (2 slides, 0.3 s long fade transition)
Comment 4 Albert Astals Cid 2015-10-14 22:11:39 UTC
Git commit 9f0ff21a22cd6618034e42f77d7796169a9db606 by Albert Astals Cid, on behalf of Arseniy Lartsev.
Committed on 14/10/2015 at 22:11.
Pushed by aacid into branch 'master'.

Presentation: correct durations for "Fade" transition effect by doing 20 FPS instead of 100 frames total

Right now, fade transition is always done in 100 frames. If the intended duration is, say, 1 second, the actual duration can easily be a few seconds instead, due to the limited CPU power (on my laptop with core i5, those 100 frames take 2 seconds).

I propose a patch that changes the number of frames to 20 * (duration in seconds). 20 FPS still looks completely smooth to me.

REVIEW: 125310

M  +4    -2    ui/presentationwidget.cpp
M  +1    -0    ui/presentationwidget.h

http://commits.kde.org/okular/9f0ff21a22cd6618034e42f77d7796169a9db606