5 ms·
Can someone please explain what tradeoff is being made when Apple decides to hardware accelerate something in their browser? Is it that hardware accelerated ele
by endianswap 14y ago
Can someone please explain what tradeoff is being made when Apple decides to hardware accelerate something in their browser? Is it that hardware accelerated elements are more fluid/responsive but require more battery consumption to perform?
I'm used to the PC world where battery/heat are hardly a problem and software rendering is usually a bad thing when hardware rendering is available.
- olsn 14y agoYes, battery is consumed faster when using the GPU - I cannot tell you by how much, but obviously it is enough on iOS devices for Apple to change its feature sets there.
- jarvuschris 14y agoBut for doing graphic manipulations, wouldn't it make sense that the net energy used by the GPU getting them done should be less than with the CPU?
- capisce 14y agoI guess that also depends on how efficiently the GPU is used.
- chadaustin 14y agoCan you give a citation or backing research? In my experience, if you've got two similar operations, the one on the GPU will consume less power (assuming you don't need to transfer substantially more data over the bus).
- olsn 14y agoi'm not an hardware expert, so I cannot tell you excactly how it works, but the point is: The device will calculate the same result in shorter time -> from what I know: If you want to calculate faster, you need more energy Also I don't think the devices are built to supply the CPU with less power while using the GPU. Again: these are mostly assumptions, I'm not a hardware architect!
- panic 14y agoIn this case, "hardware accelerated" means drawing web content into an offscreen image -- as the content is transformed using CSS, the image is re-drawn and blended using the GPU. This is faster than re-laying-out and re-drawing the web content directly (even if re-drawing the web content itself uses the GPU). It's a good trade-off when you have animations that update every frame. The biggest cost is memory. Every pixel of hardware accelerated web content gets 4 bytes of memory. This adds up quickly, especially since any content that overlaps hardware accelerated content must become hardware accelerated as well. The other big cost, as olsn already pointed out, is that blending these offscreen images onto the screen takes time and power on every frame. In extreme cases this can cause scrolling to stutter. See the "Optimizing Web Content in UIWebViews and Websites on iOS" session from WWDC 2012 for more information about this.