Closed Bug 638594 Opened 14 years ago Closed 12 years ago

Update cairo and pixman for fennec


(Core :: Graphics, defect)

Not set



Tracking Status
fennec - ---


(Reporter: cjones, Unassigned)



(Whiteboard: [has-patch])


(7 files)

The new cairo fixes a bunch of bugs biting fennec and improves the image backend, and the new pixman has NEON fast-paths that will help us on ARM devices.  We can't directly import a newer cairo generically because
 - you know, shipping FF4 and stuff
 - the win32 backend on cairo is in a bad state, from what I understand
 - we have cairo modifications for subpixel AA that we use on desktop but not mobile, and those would need to be ported

Here's the plan
 - copy vanilla releases into gfx/cairo/new-cairo or something like that.
 - apply pixman-android-cpu-detect patch.  There might be others we need.
 - copy build goop from gfx/cairo/cairo/src to gfx/cairo/new-cairo/src
 - update for build goop for cairo+pixman changes
 - split off the gecko (non-cairo) parts of Jeff's patch here
 - add a new --enable-new-cairo configure flag that selects new-cairo instead of tree-cairo, but otherwise acts the same way

new-cairo can be built, linked, and shipped in libxul like the current in-tree
Arg, wrong textfield, apologies for yet more bugspam.
No longer depends on: 569669, 583135, 610344, 616638, 637828
tracking-fennec: --- → 2.0+
(In reply to comment #0)

Should also add --- the "exit strategy" for removing new-cairo isn't entirely clear.  The win32 backend would need to fixed at bare minimum.  The strategy may depend on our new skunk-works graphics library.  I'm not, and I don't anything anyone is, interested in maintaining two cairos in our tree, so removing new-cairo is definitely a goal.
*Very* rough, initial talos results, on n900-gtk2.  tl;dr

 - possible small improvement in tp4
 - possible large-ish regression in tgfx_nochrome
 - both are within noise
 - results inconclusive perf-wise

Need more runs for better results, but would also want a newew pixman for a better comparison.  (We want that anyway, irrespective of newer cairo.)

Raw data for (moz:e56ecd8b3a68+mobile:5d299232e62a vs. bug-562746+moz:e56ecd8b3a68+mobile:5d299232e62a)

Left number is old / right number is new.  %difference computed as (new-old)/new.

tdhtml_nochrome: 1949.18 / 1922.32
tgfx_nochrome: 11134.08 / 15080.33
tp4: 6842.69 / 6757.92
tp4_pbytes: 233.0MB / 234.8MB
tp4_rss: 121.4MB / 122.0MB
tp4_shutdown: 2776.0 / 2808.0
tp4_nochrome: 3904.23 / 3834.62
tp4_pbytes_nochrome: 105.1MB / 105.1MB
tp4_rss_nochrome: 34.4MB / 32.8MB
tp4_shutdown_nochrome: 3083.0 / 3082.0
ts: 6549.44 / 6515.0
ts_shutdown: 1160.56 / 1164.0
tsspider_nochrome: 227.0 / 226.66
tsvg_nochrome: 5799.36 / 5804.59
twinopen: 1157.21 / 1136.37
tpan: 231.89 / 233.22
There was a simpler and probably more useful solution right in front of us
 - hg cp gfx/cairo gfx/new-cairo
 - apply bug 562746 to new-cairo
 - apply bug 604168 to new-cairo
 - add switch for cairo vs. new-cairo

This could help folks working on the win32 backend, because they could just --enable-new-tree-cairo and hack on that.

With the patches I'm about to attach, bug 637828 is gone with --enable-new-tree-cairo and present without it.
Summary: Import cairo-1.10(.2?) and 0.21(.6?), and use them for (at least) fennec → Update cairo and pixman for fennec
Assignee: nobody → jones.chris.g
Attached file Rollup of 1-5
Sigh, plaint-text rollup was too big for bugzilla upload.
Ben was sorting out some dirty/flush issues today; the bug that work ends up in needs to block this one.
Current cairo:
REFTEST INFO | Unexpected: 95 (94 unexpected fail, 1 unexpected pass, 0 unexpected asserts, 0 unexpected fixed asserts, 0 failed load, 0 exception)

Updated cairo:
REFTEST INFO | Unexpected: 148 (145 unexpected fail, 3 unexpected pass, 0 unexpected asserts, 0 unexpected fixed asserts, 0 failed load, 0 exception)

Will wait to hear back from Jeff before investigating more thoroughly.  Ben may have already fixed a lot of these.
I'll clean up my patches.
Depends on: 638804
Whiteboard: [has-patch]
Not blocking Fennec release -- 637828 fixes the graphics corruption bugs
tracking-fennec: 2.0+ → 2.0-
No longer blocks: 610344, 616638, 637828
Bug 667284 mentions additional fixes for ARM NEON in pixman. The attached pixman update doesn't have the required changes.
Blocks: 667284
Jeff has done this several times in the meantime, AFAIK.
Assignee: jones.chris.g → nobody
Closed: 12 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.