Pixel format API design
还没有人认领这个 Issue。
评估
- 难度
- 5/5
- 预计耗时
- 一周以上
- 新手友好度
- 25/100
- Issue 类型
- 功能
- 描述清晰度
- 需要澄清
- 活跃度
- 停滞
- 技术栈
- rust
调研方向
首先,结合 issues 17 和 44 以及 pull request 95,审查此 issue 中的像素格式要求。检查 Web 后端的 BGRX-to-RGBA 转换以及 Wayland 的 wl_shm 格式约束。完成的标准是就受支持和最优的格式、alpha 处理、通用 fallback 行为,以及用于列出和选择这些格式的 API 达成一致。
由索引模型根据 Issue 内容生成。
描述
We need an API to list available pixel formats, and select one. Some considerations:
- We want a way to support transparency: https://github.com/rust-windowing/softbuffer/issues/17
- The web backend current converts BGRX to RGBA. It would be better if it could use RGBA directly, if an application can render that way.
- It looks like for https://github.com/rust-windowing/softbuffer/issues/44 we'd have to use RGBX, rather than BGRX.
- For https://github.com/rust-windowing/softbuffer/pull/95, it seems BGRA is supported, but not BGRX. So we need to make sure to set alpha to 255.
- Wayland's
wl_shmcan support many formats, but only two are required to be supported by compositors.
So some questions here:
- What formats should be supported?
- We want to offer a format for each platform that can be used efficiently without conversion, at least, and there doesn't seem to be one that can be assumed everywhere, unfortunately.
- There are many formats that could be supported on at least some platforms.
- Do we want to support formats that are not 4 byte per pixel? This will impact the API, which currently uses u32 values for pixels.
- How to we communicate what formats are supported, and what formats are optimal?
- We still want at least one format to work on all platforms, even if it requires conversion on some, right? What formats should be universally supported, then?
- 主要语言
- Rust
- 星标
- 506
- 派生
- 84
- PR 合并指标
- 30 天内没有已合并 PR
环境准备
我们还没有检查这个项目的环境配置文件。先看它的 README,通用步骤见我们的新手贡献指南。
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
rust-windowing/softbuffer 的其他 Issue
-
DS - X11
难度 3/5 1-2 天 新手友好度 48/100
rust-windowing/softbuffer#368 ·
-
bug DS - Android NDK
难度 4/5 3-5 天 新手友好度 35/100
rust-windowing/softbuffer#347 · 1 条评论 ·
-
Needs Design Work
难度 5/5 一周以上 新手友好度 25/100
rust-windowing/softbuffer#342 · 1 条评论 ·
-
enhancement question
难度 5/5 一周以上 新手友好度 25/100
rust-windowing/softbuffer#338 ·
-
DS - Android NDK enhancement
难度 4/5 3-5 天 新手友好度 35/100
rust-windowing/softbuffer#318 · 2 条评论 ·
查看 rust-windowing/softbuffer 的全部 Issue
相似的 Issue
-
难度 2/5 1-3 小时 新手友好度 78/100
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 88/100
-
难度 2/5 1-3 小时 新手友好度 68/100
trezor/trezor-firmware#7997 ·
维护者通常 2 天内回复
-
难度 2/5 1-3 小时 新手友好度 78/100
smol-machines/smolvm#1489 · 1 条评论 · 1 个 reaction ·
维护者通常 1 天内回复
-
难度 1/5 1 小时以内 新手友好度 88/100
维护者通常 1 天内回复