The X Server does not keep track of what it has drawn on the display. Once bits are rendered to the FB, its responsibility for them has ended. If bits need to be re-rendered, the X server asks either a compositing manager or the application that originally drew them to draw again.
Some client applications, such as screenshots, need to read back the contents of the FB directly. The X protocol provides a GetImage request for this case.
drawbacks of GetImage:
- GetImage is typically extremely slow, since the the hardware and software paths in moder graphics are optimized for the case of outputting pixels at the expense of redering then.
- GetImage is also hard to use properly.
Here, more than anywhere else in the X protocol, the underlying hardware is exposed to clients. The requested FB contents are presented to the client with the FB's alignment, padding and byte ordering. Generic library code available in XCB to deal with the complexity of translating the received FB into something useful. However, using this code further slows processing.
本文探讨了X服务器中GetImage请求的工作原理及其局限性。GetImage用于读取帧缓冲区的内容,但存在速度慢及难以正确使用的问题。文章还讨论了如何处理接收到的帧缓冲区数据。

715

被折叠的 条评论
为什么被折叠?



