processing / processing/processing4
rounded rectangle performance in P2D / P3D is extremely poor when stroke is used
未关闭
还没有人认领这个 Issue。
lower priority
- 主要语言
- Java
- 星标
- 497
- 派生
- 183
- 平均合并
- 4 小时 39 分钟
- 30 天内合并 PR
- 3
描述
MacBook Air M3
Processing 4.5.6 (but also older versions apply)
This runs at around 8.5 fps.
void setup() {
size(800, 800, P2D);
frameRate(999);
}
void draw() {
background(0);
int cols = 16;
int rows = 16;
float margin = 50;
float gap = 10;
float rectW = (width - margin * 2 - gap * (cols - 1)) / cols;
float rectH = (height - margin * 2 - gap * (rows - 1)) / rows;
fill(255, 220, 0);
stroke(255);
strokeWeight(2);
for (int y = 0; y < rows; y++) {
for (int x = 0; x < cols; x++) {
float px = margin + x * (rectW + gap);
float py = margin + y * (rectH + gap);
rect(px, py, rectW, rectH, 10);
}
}
println(frameRate);
}
贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
调研方向
首先在 Processing 4.5.6 中运行提供的 Java sketch,并分别在 P2D 和 P3D 中比较启用 stroke 与禁用 stroke 时的帧率。跟踪这些模式使用的圆角矩形渲染路径;当复现不再显示报告中的严重减速,同时保留带 stroke 的圆角矩形时,即表示完成。
由索引模型根据 Issue 内容生成。
评估
- 技术栈
- java
- 领域
- computer-graphics, performance
- Issue 类型
- 缺陷
- 难度
- 4/5
- 预计耗时
- 3-5 天
- 活跃度
- 活跃
- 描述清晰度
- 基本清楚
- 新手友好度
- 55/100