The inchoate plan as I understand so far is, if a -moz-element source is large/interesting enough, ensure that it gets its own layer, then where the -moz-element is used, insert some kind of reference layer into the layer tree that refers to the source layer. Then at compositing time, we would adjust the source layer somehow at its reference and composite it directly to screen. That adjustment could probably just be a transform+clip. Things get a bit interesting if a -moz-element source itself refers to content that includes a -moz-element. Shouldn't pose too many problems I wouldn't imagine.
5 years ago
I don't think -moz-element usage is particularly widespread, so for now this is a nice-to-have optimization for content use case.
Created attachment 8373749 [details] -moz-element test case Extracted a test case from current experiments with DOM based compositing for Shumway. Having multiple instances of a shape placed on the screen is a frequently used feature in SWF files. Using -moz-element results in pretty poor performance. This should be optimized.