Closed Bug 1256577 Opened 8 years ago Closed 8 years ago

[Stingray] Try to enable Skia for Canvas2D on Firefox OS TV

Categories

(Firefox OS Graveyard :: General, defect)

Other
FreeBSD
defect
Not set
normal

Tracking

(blocking-b2g:2.6?)

RESOLVED WONTFIX
blocking-b2g 2.6?

People

(Reporter: daoshengmu, Unassigned)

References

Details

Attachments

(6 files, 1 obsolete file)

Firefox OS TV uses Cairo software mode as their 2D rendering engine not only for fonts but Canvas2D. It is worth to make some investigations to figure out if it is a good choice to enable Skia and hardware accelerate on Firefox OS TV.

How to reproduce:
On Desktop, enter about:config at the URL bar, making gfx.canvas.azure.backends;skia and gfx.canvas.azure.accelerated;true

On TV, insert gfx.canvas.azure.backends;skia and gfx.canvas.azure.accelerated;true at b2g/app/b2g.js

Currently, there is no side effects after I enable Skia hardware mode. Let's move the next step to compare the performance between them.
Summary: Try to enable Skia for Canvas2D on Firefox OS TV → [Stingray] Try to enable Skia for Canvas2D on Firefox OS TV
Attached file putImageTest.zip
Gathering some stats from attachment 8731114 [details] on Firefox OS TV:

Cairo
21~19 ms

Skia - Software
52~54 ms

Skia - Hardware
37~40 ms
Depends on: 1240177
Running CanvasMark [1] benchmark on FxOS TV, using the path from bug 1240177 and comparing the result between Skia and Cairo:

Skia-HW
3768

Skia-SW
3755

Cairo
3686

We need to collect more test data to make sure if it can increase the performance.

[1] http://www.kevs3d.co.uk/dev/canvasmark/
Attached patch Apply-patch-of-bug1240177.patch (obsolete) — Splinter Review
This is the modified patch from bug 1240177 for TV b2g 2.5
blocking-b2g: --- → 2.6?
Attachment #8734235 - Attachment is obsolete: true
After applying patch attachment 8741245 [details] [diff] [review] - 8741249, Skia HW mode gets 12938 pts vs. Cairo 4713 pts in the release build (large is better). It gives us confident to move forward.

But, there are some wrong alpha blending issues from textures in this version. Need to fix.
Correct the Comment 10, the benchmark [1] can't be trusted at the very low performance case. Although the points of Skia-HW is higher, the FPS of its tests are less than 8. On the other hand, Cairo gets 18 FPS. However, we use Skia-SW, it can get 18 FPS as well and the benchmark point is 4610. We need to figure out why Skia hardware mode is so slow on FxOS TV.

[1] http://www.kevs3d.co.uk/dev/canvasmark/
Status: NEW → RESOLVED
Closed: 8 years ago
Resolution: --- → WONTFIX
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: