gpt4 book ai didi

google-chrome - Chrome 开发工具中的 "Paint"和 "Rasterize Paint"有什么区别?

转载 作者:行者123 更新时间:2023-12-04 13:43:33 25 4
gpt4 key购买 nike

我一直在阅读关于 chrome 中的关键渲染路径 herehere .我对这些资源的理解是“合成”步骤发生在主线程之外,并且依赖于之前的“绘制”步骤,该步骤生成要合成在一起的光栅化图层。
但是,当我查看 Chrome 开发工具中位置动画的单帧期间发生的情况时,我看到了以下内容:
enter image description here

  • 看起来主线程上正在发生“合成”,这不是我通过阅读这些资源所理解的。
  • 在合成之前主线程上有一个绘制步骤,但是在“光栅化线程”上合成之后还有另一个“光栅化绘制”步骤。

  • 那么“Paint”和“Rasterize Paint”有什么区别,为什么在合成已经完成后会发生光栅化绘制步骤?为什么合成似乎发生在 chrome dev-tools 的主线程上,但文档将其描述为发生在不同的线程上?

    最佳答案

    根据 this article :

    you may hear the term "rasterize" used in conjunction with paint. This is because painting is actually two tasks: 1) creating a list of draw calls, and 2) filling in the pixels.
    The latter is called "rasterization" and so whenever you see paint records in DevTools, you should think of it as including rasterization. (In some architectures creating the list of draw calls and rasterizing are done in different threads, but that isn't something under developer control.)


    光栅化也是将矢量图像转换为像素矩阵的 Action 。

    关于google-chrome - Chrome 开发工具中的 "Paint"和 "Rasterize Paint"有什么区别?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/53316338/

    25 4 0
    Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
    广告合作:1813099741@qq.com 6ren.com