CSS3的哪些部分是GPU加速的? [英] What exact parts of CSS3 are GPU accelerated?
问题描述
我一直在阅读几个参考文献,例如X是GPU加速和Y不是GPU加速,但我找不到一个完整的列表。
I've been reading several references like "X is GPU accelerated" and "Y is not GPU accelarated", but I can't find a full list. What exact parts of CSS3 are GPU accelerated?
推荐答案
对,这是一个有趣的话题,它确实依赖于浏览器+显卡。
Right, this is an interesting topic, and it does really depend on the browser + graphics card. I've been meaning to do some research on this for a while, so here's a quick summary.
在Webkit中, AnimationBase.cpp 用于指定它,但它似乎已经移动了! Doh!好吧,无论如何,如果你搜索代码 ACCELERATED_COMPOSITING
,你会发现它。
In Webkit, AnimationBase.cpp used to specify it, but it seems to have moved! Doh! Well, anyway, if you search the code for ACCELERATED_COMPOSITING
, you'll find it.
匹配其中一个,则可以加速(至少在Chromium中):
Specifically, if something matches one of these, then it can be accelerated (at least in Chromium):
- 图层具有3D或透视变换CSS属性
- 图层由元素使用加速视频解码使用
- 图层由具有3D上下文或加速2D上下文的元素使用
- 图层用于复合插件
- 图层使用CSS动画作为其透明度或使用动画webkit变换
- 图层使用加速CSS过滤器
- 图层具有合成图层的后代
- 图层具有较低z-索引的兄弟节点,
- Layer has 3D or perspective transform CSS properties
- Layer is used by element using accelerated video decoding
- Layer is used by a element with a 3D context or accelerated 2D context
- Layer is used for a composited plugin
- Layer uses a CSS animation for its opacity or uses an animated webkit transform
- Layer uses accelerated CSS filters
- Layer has a descendant that is a compositing layer
- Layer has a sibling with a lower z-index which has a compositing layer (in other words the layer is rendered on top of a composited layer)
在Gecko中, https://wiki.mozilla。 org / Platform / GFX / HardwareAcceleration 解释他们的计划/实现,就像IE,在XP上的选项更有限,但是如果正确支持显卡,每个其他操作系统都会获得一些加速。 Firefox 4(我想!)为文本,画布和转换添加了加速。
In Gecko, https://wiki.mozilla.org/Platform/GFX/HardwareAcceleration explains their plan/implementation, much like IE, on XP the options are more limited, but every other OS gets some acceleration if the graphics card is supported properly. Firefox 4 (I think!) added acceleration for text, canvas and transforms.
IE10似乎有几乎所有的硬件加速。 http:// blogs。 msdn.com/b/ie/archive/2011/04/26/understanding-differences-in-hardware-acceleration-through-paintball.aspx
IE10 seems to have pretty much everything HW accelerated. http://blogs.msdn.com/b/ie/archive/2011/04/26/understanding-differences-in-hardware-acceleration-through-paintball.aspx
这是很快,所以我真的不怀疑他们的要求!
It is pretty quick, so I don't really doubt their claim!
这篇关于CSS3的哪些部分是GPU加速的?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!