On Mon, Feb 10, 2014 at 12:00 PM, Brian Smith <br...@briansmith.org> wrote:
> I don't think it is fixed in stone that asm.js code must go through > Web Platform APIs. I believe the requirement is that it must be > possible to translate asm.js code into Web Platform APIs in a way > where the result works reasonably. AFAICT, there's nothing technically > stopping us from implementing any kind of specially-optimized > passthrough logic for any particular API, and also I think that idea > is compatible politically with our stance on asm.js, compared to > "ActiveG." > I'm not sure what you're talking about. We insist that asm.js apps are implemented in terms of standard Web platform APIs. This is a big difference --- perhaps the biggest difference in practice --- between asm.js and PNaCl/Pepper. So a cairo-using app ported to asm.js must implement cairo on top of a standard Web platform graphics API, and the natural fit would be canvas-2D (though there are other options, such as compiling cairo's GL backend to asm.js and running it on top of WebGL). So maybe you're saying the browser could optimize the idioms of Moz2D implemented atop canvas-2D or WebGL better than the idioms of cairo implemented atop canvas2D or WebGL. OK, that's theoretically possible, but in practice there won't be any difference. Especially because cairo's internal "surface backend" API, which all cairo drawing goes through, looks a lot more like Moz2D than cairo's public API! Rob -- Jtehsauts tshaei dS,o n" Wohfy Mdaon yhoaus eanuttehrotraiitny eovni le atrhtohu gthot sf oirng iyvoeu rs ihnesa.r"t sS?o Whhei csha iids teoa stiheer :p atroa lsyazye,d 'mYaonu,r "sGients uapr,e tfaokreg iyvoeunr, 'm aotr atnod sgaoy ,h o'mGee.t" uTph eann dt hwea lmka'n? gBoutt uIp waanndt wyeonut thoo mken.o w _______________________________________________ dev-platform mailing list dev-platform@lists.mozilla.org https://lists.mozilla.org/listinfo/dev-platform