<story><title>Dramatically reduced power usage in Firefox 70 on macOS with Core Animation</title><url>https://mozillagfx.wordpress.com/2019/10/22/dramatically-reduced-power-usage-in-firefox-70-on-macos-with-core-animation/</url></story><parent_chain><item><author>kvark</author><text>Amazing work by my colleagues! I hope we&amp;#x27;ll not regress this with WebRender ;)&lt;p&gt;Celebration aside, one particular note (that was known, but still) makes me sad:&lt;p&gt;&amp;gt; It’s worth noting that the ability to assign an IOSurface to the CALayer contents property is not properly documented. Nevertheless, all major browsers on macOS now make use of this API.&lt;p&gt;So we end up in a situation where using the most efficient way to display contents now relies on undocumented&amp;#x2F;private APIs. At any point Apple can break them, or punish us for using them.</text></item></parent_chain><comment><author>pcwalton</author><text>It&amp;#x27;s &amp;quot;documented&amp;quot; as in &amp;quot;tweeted out by an Apple engineer&amp;quot;: &lt;a href=&quot;https:&amp;#x2F;&amp;#x2F;twitter.com&amp;#x2F;bciechanowski&amp;#x2F;status&amp;#x2F;874345241666437120?lang=en&quot; rel=&quot;nofollow&quot;&gt;https:&amp;#x2F;&amp;#x2F;twitter.com&amp;#x2F;bciechanowski&amp;#x2F;status&amp;#x2F;874345241666437120?...&lt;/a&gt;&lt;p&gt;One thing that is &lt;i&gt;not&lt;/i&gt; documented is that the IOSurface must have been created with the &amp;#x27;BGRA&amp;#x27; pixel format, or it will silently render as black instead.</text></comment>
<story><title>Dramatically reduced power usage in Firefox 70 on macOS with Core Animation</title><url>https://mozillagfx.wordpress.com/2019/10/22/dramatically-reduced-power-usage-in-firefox-70-on-macos-with-core-animation/</url></story><parent_chain><item><author>kvark</author><text>Amazing work by my colleagues! I hope we&amp;#x27;ll not regress this with WebRender ;)&lt;p&gt;Celebration aside, one particular note (that was known, but still) makes me sad:&lt;p&gt;&amp;gt; It’s worth noting that the ability to assign an IOSurface to the CALayer contents property is not properly documented. Nevertheless, all major browsers on macOS now make use of this API.&lt;p&gt;So we end up in a situation where using the most efficient way to display contents now relies on undocumented&amp;#x2F;private APIs. At any point Apple can break them, or punish us for using them.</text></item></parent_chain><comment><author>xenadu02</author><text>Do you have an FB number for improving the documentation here?&lt;p&gt;CALayer accepts a number of different data types for its contents property, IOSurface being one of them.&lt;p&gt;Another tip: CAShapeLayer draws on the GPU so simple shapes&amp;#x2F;strokes can be insanely faster drawn that way vs CoreGraphics.</text></comment>