Closed Bug 722164 Opened 10 years ago Closed 10 years ago
Investigate Azure Quartz Interpolation Quality
No description provided.
Turning off interpolation gives me massive improvements in canvas performance. I was able to run 100 Fishes at 40 FPS. I did a similar experiment with cairo and also saw significant performance improvements. I noticed this because interpolation was showing up in profiles
This isn't surprising, but I'm not sure it's desirable though. Maybe we could go to linear from the I believe Lanczos Quartz is currently doing?
We should be able to use kCGInterpolationMedium on systems that support it.
I'd be great with using Low (or Medium maybe) interpolation on canvas only. Depending on the quality, it's possible we could switch to Medium for all web content.
Attachment #592508 - Attachment is obsolete: true
Testcase: http://ie.microsoft.com/testdrive/performance/fishietank/ 100 Fishes Note: High is 3, Medium is 4. The FPS is very rough since the scaling of the fishes has a big impact on the FPS. Values: http://developer.apple.com/library/ios/#documentation/GraphicsImaging/Reference/CGContext/Reference/reference.html#//apple_ref/c/tdef/CGInterpolationQuality gfx.canvas.azure.quartz.interpolation = kCGInterpolationDefault = 0 8-9 FPS Profile: http://varium.fantasytalesonline.com/cleopatra/?report=AMIfv97lt1xGt6kPtsEvINA4-KrFyQl-mwSvcrm5dAJ3S4gaBRnqvfxMuhSOZaGSAMYU7gb1jSwPkgy78d44X6WtWNDU9ldg05zQqmlel0z1cxKc7fSyIP8VJZBjuc_ePBXS9YXhxq5OKu17BmoKOvTIuuqyMJmTmA Top Sample: (34.07%) resample_band (in CoreGraphics) + 1108 gfx.canvas.azure.quartz.interpolation = kCGInterpolationNone = 1 36-40 FPS Profile: http://varium.fantasytalesonline.com/cleopatra/?report=AMIfv97G4QE4tZ0C_QNVYIJGmUlqCFkuh2X8gSJ2uGaJSXeMs6_CNbgPZTfHraLeKA70V7x33uDPWOa4WP2lxRWUgYIgj2ypdvWceRaQg-X2Clyf3Okp7gfEq8sggBDBFpKzlSCLCLkWh_mUGd4xvQsMkV3aBcEwZA Top Sample: (7.85%) argb32_image_mark (in CoreGraphics) + 1036 gfx.canvas.azure.quartz.interpolation = kCGInterpolationLow = 2 25-38 FPS Profile: http://varium.fantasytalesonline.com/cleopatra/?report=AMIfv97ObqbQl1WgrqA4gcxAhqusEbfDSbRh5YEnrPVimMIWRRkzg9V3ZDFXELnRF0Vc5CWv19g8gdYuEg_vr5IjLmcLW3Dp0NTMmYhuBJEsBK4uJhqKuAZkI7SX_r6Uq9OGbHWbg43cTybXwQGAqaOPHQ_4QHUITQ Top Sample: (24.88%) argb32_image_mark (in CoreGraphics) + 1036 gfx.canvas.azure.quartz.interpolation = kCGInterpolationHigh = 3 9-11 FPS Profile: http://varium.fantasytalesonline.com/cleopatra/?report=AMIfv95W2sC5rvzRyXojF7fuHDMtl2oLHm-Bz3rUGOxVkEi8NLUNYHhzAA2HUXeJW4Grjzfvz_ddCSqL8hvFbEB0fV0x7s-v6mkryk_0tZOgwmczLWtYD9FCTWliGUR9EsMqqxPHCZqC3vAI1jdnTjbi7qxqn0vRjQ Top Sample: (25.62%) resample_band (in CoreGraphics) + 1108 gfx.canvas.azure.quartz.interpolation = kCGInterpolationMedium = 4 9-20 FPS Profile: http://varium.fantasytalesonline.com/cleopatra/?report=AMIfv96KLTU4eTaRkIuC4XSjxBA6ogORaVDDyK0bJvMoja2y6RaefOazW9vf6Ig3RZu2ZqaAEMMZ3NoSMH3jtWdeYyoEfT6n8rbmxeJQhu4RFOn5cwer2mdP2QTl6h-UeYmSIshBBw07xt1_LCbN0uBRcH2dtKIv-A Top Sample: (19.84%) resample_band (in CoreGraphics) + 1108
kCGInterpolationDefault is most likely high. We only hit resample_band on Medium and higher and loose FPS significantly. Presumably that's Lanczos. We should consider using either Low or None.
We should aim to land this Monday for the aurora merge since this is low risk and big performance impact.
Assignee: nobody → bgirard
Status: NEW → ASSIGNED
Attachment #592602 - Flags: review?(jmuizelaar)
Comment on attachment 592602 [details] [diff] [review] Switch to kCGInterpolationLow Add a comment about how we only want to do this for canvas. Add perhaps an API proposal.
Attachment #592602 - Flags: review?(jmuizelaar) → review+
Status: ASSIGNED → RESOLVED
Closed: 10 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla12
You need to log in before you can comment on or make changes to this bug.