You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In our current painter architecture, the painter generates path commands and the backend renders them. These two processes are completely independent, with only a PainterResult passed from the Painter to its backend.
This separation allows us to easily parallelize the painter and its backend by using a Mutex to synchronize them with every frame.
For the GPU backend, we can leverage the GPU's parallelism in two ways:
Tessellating the path into triangles, which can be a heavy task.
Interacting with the GPU and awaiting its response, can be time-consuming, especially in the browser where we have to go from wasm to JS to WebGL (sometimes taking milliseconds).
By introducing a dedicated render thread, we can reduce the load on the main thread:
We use ULP to represent the tasks of the main thread, such as user interaction, layout, painting, etc.
We use SS to represent the tasks of tessellation and submission to the GPU.
main thread: ----|ULP|--|ULP|--....->
render thread: --------|SS|---|SS| --...-->
The subsequent ULP doesn't need to wait for the previous SS to finish.
The text was updated successfully, but these errors were encountered:
In our current painter architecture, the painter generates path commands and the backend renders them. These two processes are completely independent, with only a
PainterResult
passed from the Painter to its backend.This separation allows us to easily parallelize the painter and its backend by using a Mutex to synchronize them with every frame.
For the GPU backend, we can leverage the GPU's parallelism in two ways:
By introducing a dedicated render thread, we can reduce the load on the main thread:
We use
ULP
to represent the tasks of the main thread, such as user interaction, layout, painting, etc.We use
SS
to represent the tasks of tessellation and submission to the GPU.main thread: ----|ULP|--|ULP|--....->
render thread: --------|SS|---|SS| --...-->
The subsequent
ULP
doesn't need to wait for the previousSS
to finish.The text was updated successfully, but these errors were encountered: