0
点赞
收藏
分享

微信扫一扫

X: GetImage reading from the display

大南瓜鸭 2022-01-24 阅读 25
linux

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.

举报

相关推荐

0 条评论