hicms / cefpython

Automatically exported from code.google.com/p/cefpython
0 stars 0 forks source link

Stuttering of animations introduced in 31.0, worked fine in 29.4. #137

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?

1. Upgrade from cefpython 29.4 to 31.0.
2. Display any animation with velocity.js.
3. Animation stutters.

What is the expected output? What do you see instead?

I'm using velocity.js to animate HTML/CSS-based elements on a page. With the 
exact same codebase, animations in 31.0 stutter, but do not stutter in 29.4. 
velocity.js uses window.requestAnimationFrame to determine the exact tick at 
which an animation should proceed to the next animation step. Apparently, 
cefpython 31.0 introduced a change somewhere in the rendering layer or timer 
frequency which causes the issue.

What version of the product are you using? On what operating system?

cefpython 31.0
Windows 7 64-bit

Original issue reported on code.google.com by n.klaric@gmail.com on 27 Aug 2014 at 1:43

GoogleCodeExporter commented 9 years ago
Are you using windowed rendering or off-screen rendering (kivy, panda3d 
examples)?

Have you tried options like: BrowserSettings.accelerated_compositing_disabled, 
BrowserSettings.webgl_disabled, whether they make any difference? Try also 
switches: --disable-gpu, --disable-threaded-compositing, 
--disable-accelerated-compositing (this one behaves differently than 
BrowserSettings.accelerated_compositing_disabled in branch 1650, so test both), 
--enable-software-compositing, --disable-gpu-compositing. See the 
CommandLineSwitches wiki page. You could even try some more switches, see 
http://peter.sh/experiments/chromium-command-line-switches/ .

cefpython 31 uses CEF branch 1650. Can you please test your animation in 
branches 1750 and 1916, whether this issue still persists? From 
http://cefbuilds.com/ download "TestApp" binaries and run the cefclient 
executable.

Original comment by czarek.t...@gmail.com on 27 Aug 2014 at 7:31

GoogleCodeExporter commented 9 years ago
I've tried all switches that you suggested, none make a difference. Looking at 
some animations with very short distance and long duration, e.g. a rectangle 
moving vertically from A to B at delta = 300px in 800ms, it seems that in 31.0 
there is motion judder, as if the rectangle is moving at 24fps at a vertical 
refresh rate of 60 Hz.

Is there a change in 31.0 that reduced the render interval?

I will now try the newer branches as you suggested, but this might take a while.

Original comment by n.klaric@gmail.com on 27 Aug 2014 at 2:22

GoogleCodeExporter commented 9 years ago
Another observation:

In velocity.js there's an optional callback for every animation step. Logging 
the calls to the console, I can see that in both 29.4, 31.0 and in my current 
desktop Chrome 37.x the animation steps are all identical, i.e. even though the 
animation should be as smooth in 31.0 as in the other hosts, there is judder. 
Usually velocity.js compensates for low refresh rates by calling 
requestAnimationFrame and advancing the animation respectively, but in 31.0 
this does not seem to work.

This all points to a rendering issue where frames are rendered but not 
displayed (or displayed too late) in the container.

Original comment by n.klaric@gmail.com on 27 Aug 2014 at 2:33

GoogleCodeExporter commented 9 years ago
Czarek, I've tested the animation with cefclient 1750 and 1916, works fine in 
both, no stutter/judder.

Original comment by n.klaric@gmail.com on 27 Aug 2014 at 8:40

GoogleCodeExporter commented 9 years ago
Forgot to answer your first question: Windowed rendering.

Original comment by n.klaric@gmail.com on 27 Aug 2014 at 8:49

GoogleCodeExporter commented 9 years ago
Upgrade to branch 1750 will happen in the near future.

Just to be sure that this is CEF issue and not CEF Python implementation issue, 
can you test it with cefclient branch 1650 downloaded from cefbuilds as well? 
To confirm stutter there.

Original comment by czarek.t...@gmail.com on 29 Aug 2014 at 6:55

GoogleCodeExporter commented 9 years ago

Original comment by czarek.t...@gmail.com on 29 Aug 2014 at 7:29

GoogleCodeExporter commented 9 years ago
Created Issue 138 "Update to CEF branch 1750 (Chrome 33)".

Original comment by czarek.t...@gmail.com on 29 Aug 2014 at 7:30

GoogleCodeExporter commented 9 years ago
Yes, I can confirm that the exact same stuttering occurs in cefclient 1650, but 
not in 1750.

Original comment by n.klaric@gmail.com on 29 Aug 2014 at 12:54

GoogleCodeExporter commented 9 years ago
Project will move to Github. Find this issue at the new address (soon): 
https://github.com/cztomczak/cefpython/issues/137

Original comment by czarek.t...@gmail.com on 24 Aug 2015 at 6:40