开发者

Does WebKit use OpenGL to render CSS transitions?

开发者 https://www.devze.com 2023-03-16 22:12 出处:网络
Does WebKit use OpenGL to render CSS transitions, or d开发者_JAVA技巧oes it use software rendering?WebKit is just a frontend. It depends on the backend and the hardware support. Google Chrome uses ski

Does WebKit use OpenGL to render CSS transitions, or d开发者_JAVA技巧oes it use software rendering?


WebKit is just a frontend. It depends on the backend and the hardware support. Google Chrome uses skia as a back-end and it can use software or hardware. So the answer is it depends on the implementation of the back-end and the hardware it is running on.


From what I know the only hardware accelerated property using transitions is the translate3d transform.

Eg:

// Normal
div{
    -webkit-transition: all 0.5s ease-out;
}

// Adding class to animate
div.transformed{
    -webkit-transform: translate3d(100px, 100px, 0);
}

If you use just the translate transform or animate any other property it won't be hardware accelerated.

0

精彩评论

暂无评论...
验证码 换一张
取 消