Skia Acceleration makes Canvas go smooth, but there is still scroll input lag




5 years ago
4 years ago


(Reporter: jonasthiem, Unassigned)


29 Branch

Firefox Tracking Flags

(Not tracked)


(Whiteboard: [bugday-20140120], URL)



5 years ago
User Agent: Mozilla/5.0 (X11; Linux x86_64; rv:29.0) Gecko/20100101 Firefox/29.0 (Beta/Release)
Build ID: 20140114030236

Steps to reproduce:

I made a canvas animation which with skia acceleration goes nicely smooth, however, there is still a notable delay (should be around 200ms, try for yourself) when scrolling with the scroll wheel of the mouse which is NOT present on other, simpler pages (compare with e.g. about:support).

With layer compositing acceleration and canvas acceleration and the relatively simple canvas script (the graphics are not that trivial of course and highly benefit from skia) which runs at a mere 10 FPS, I don't see why it should lag that much.

Also, during the scroll lag, the animation does NOT visibly hang, so there doesn't seem to be any reason to lag.

Config options that may be relevant:
layers.acceleration.force-enabled true skia,cairo cairo

about:support things that may be relevant:
Adapter Description Intel Open Source Technology Center -- Mesa DRI Intel(R) Sandybridge Mobile 
Device ID Mesa DRI Intel(R) Sandybridge Mobile 
Driver Version	3.0 Mesa 9.1.7
GPU Accelerated Windows	1/1 OpenGL (OMTC)
Vendor ID	Intel Open Source Technology Center
WebGL Renderer	Intel Open Source Technology Center -- Mesa DRI Intel(R) Sandybridge Mobile
windowLayerManagerRemote	true
AzureCanvasBackend	skia
AzureContentBackend	cairo
AzureFallbackCanvasBackend	cairo
AzureSkiaAccelerated	1

I can NOT observe the scrolling lag when disabling smooth scrolling. Maybe the smooth scrolling is just too laggy on a more complex site like this? But considering how well the whole canvas thing runs, isn't there room for more optimisation here?

Actual results:

Scrolling is laggy compared to other pages, while everything else (the animation mainly) looks smooth

Expected results:

Scrolling is as snappy as on other pages

Comment 1

5 years ago
Can you provide another test case for it?
Flags: needinfo?(jonasthiem)


5 years ago
Whiteboard: [bugday-20140120]

Comment 2

5 years ago
No. This is the animation where I observed it, so here it is in exactly that state where I observed it. It reproduces the problem reliably for me.

Do you have trouble reproducing the issue?

Comment 3

5 years ago
I could fiddle around more with it, but I'd probably risk not reproducing the problem anymore. So why would I want to do that?

Could you be more specific on what you are thinking of? I'm not a veteran firefox bug reporter or anything, so I'm not sure what would be wrong with this test case.
Flags: needinfo?(jonasthiem)

Comment 4

5 years ago
I notice the time delay, but with comparison with other open source browser like: chromium, I can not differentiate amongst them. That is why I am asking for another test case. More specifically a bigger page like this, so we can check it. Sorry for the trouble.

Comment 5

5 years ago
Sorry for clearing the NEEDINFO, that was on accident.

Regarding chromium, I can reproduce this as well with Opera Next 19.0 on Windows 7 which is chromium-based - however, the whole page seems to lag so much despite Opera's claims on opera:gpu that it would be 3d accelerated that I doubt it runs sanely at all, unlike Firefox with Skia. May be some other problem with Opera's acceleration or canvas in general.

Comment 6

5 years ago
Ah, this may probably help:

Opera 19 does not lag (including the scroll bar reacting with no visible delay with instant reactions) if I resize the window ridiculously small, also when its experimental smooth scrolling is enabled. I suppose that also is another indication that Opera has some rendering trouble despite its 3d acceleration claims.

For Firefox, the lag seems to get less worse with smooth scrolling disabled. It does, however, NOT go away when the page is resized to a very tiny size. (at least not for me)
(In reply to Jonas Thiem from comment #0)
> Config options that may be relevant:
> layers.acceleration.force-enabled true
> skia,cairo
> cairo
Noticed the difference after setting the above prefs.
29.0a1 (2014-01-21), win 7 x64
Component: Untriaged → Graphics
Ever confirmed: true
Product: Firefox → Core

How is the AzureSkiaAccelerated activated? I do not find on any part how.

I say it, because I have it formed, but I take this parameter as '0'.

Thanks to whom did I answer myself.
You need to log in before you can comment on or make changes to this bug.