gpui: Improve path rendering & global multisample anti-aliasing (#29718)
Currently, the rendering path required creating a texture for each path, which wasted a large amount of video memory. In our application, simply drawing some charts resulted in video memory usage as high as 5G. I removed the step of creating path textures and directly drew the paths on the rendering target, adding post-processing global multi-sampling anti-aliasing. Drawing paths no longer requires allocating any additional video memory and also improves the performance of path rendering. Release Notes: - N/A --------- Co-authored-by: Jason Lee <huacnlee@gmail.com>
This commit is contained in:
parent
9dc3ac9657
commit
4fdda8d5a1
16 changed files with 486 additions and 726 deletions
|
@ -336,10 +336,7 @@ impl PathBuilder {
|
|||
let v1 = buf.vertices[i1];
|
||||
let v2 = buf.vertices[i2];
|
||||
|
||||
path.push_triangle(
|
||||
(v0.into(), v1.into(), v2.into()),
|
||||
(point(0., 1.), point(0., 1.), point(0., 1.)),
|
||||
);
|
||||
path.push_triangle((v0.into(), v1.into(), v2.into()));
|
||||
}
|
||||
|
||||
path
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue