为什么 XVisuals 在 xdpyinfo 中重复
查看 xdpyinfo 的输出,我看到许多重复具有完全相同特征的视觉效果。为什么它们会重复?
例如,
visual:
visual id: 0x6e
class: TrueColor
depth: 32 planes
available colormap entries: 256 per subfield
red, green, blue masks: 0xff0000, 0xff00, 0xff
significant bits in color specification: 8 bits
visual:
visual id: 0x6f
class: TrueColor
depth: 32 planes
available colormap entries: 256 per subfield
red, green, blue masks: 0xff0000, 0xff00, 0xff
significant bits in color specification: 8 bits
0x6e 和 0x6f 完全相同。
一个相关的问题:视觉已经有了深度的概念,那么为什么需要将深度和视觉都传递给XCreateWindow呢?
Looking into my output of xdpyinfo, I see a lot of Visuals of the exact same characteristics repeated. Why are they repeated?
For example,
visual:
visual id: 0x6e
class: TrueColor
depth: 32 planes
available colormap entries: 256 per subfield
red, green, blue masks: 0xff0000, 0xff00, 0xff
significant bits in color specification: 8 bits
visual:
visual id: 0x6f
class: TrueColor
depth: 32 planes
available colormap entries: 256 per subfield
red, green, blue masks: 0xff0000, 0xff00, 0xff
significant bits in color specification: 8 bits
0x6e and 0x6f are exactly the same.
A related question: A visual already has a concept of depth, so why is it required to pass both a depth and a visual to XCreateWindow?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
glxinfo -v
来查看它们。视觉深度是最大深度。例如,我的屏幕有许多视觉效果,它们的深度都是 24 或 32。X 服务器支持更多深度,在我的例子中为 24、1、4、8、15、16 和 32。在给定深度的视觉效果中您可以创建一个更小深度的窗口。前面的内容是错误的。视觉的深度是它支持的唯一深度。人们无法创建任何其他深度的窗户。glxinfo -v
to see them.The depth of the visual is the maximal depth. My screen for instance has many visuals, all of them are of depth 24 or 32. The X server supports more depths, in my case 24, 1, 4, 8, 15, 16, and 32. In a visual of a given depth you can create a window of a smaller depth.The preceding is wrong. The depth of the visual is the only depth it supports. One cannot create a window of any other depth.