~mir-team/mir/x11-multi-window

Viewing all changes in revision 4029.

distinguish the ability to read from a texture from the ability to write to a texture directly by adding the TextureTarget interface.

This is for screencasting in the line of the screencast-to-buffer work. Specifically, the problem comes in the case that the user allocates a ShmBuffer and then tries to write to it via the CompositingScreencast. The ShmBuffer gets uploaded as a texture, and then ScreencastDisplayBuffer will write to that texture, but the pixel content never gets downloaded back to the ShmBuffer. This is different from how gbm_bo and ANativeWindowBuffer binding works, where the way that is bound (via ImageTargetTexture2D) has the ScreencastDisplayBuffer writing directly to the memory backing those two types.

This branch allows us to detect when a user tries to write to a ShmBuffer, which in the current code, will not modify the content of ShmBuffer

.

Approved by mir-ci-bot, Daniel van Vugt, Cemil Azizoglu.

expand all expand all

Show diffs side-by-side

added added

removed removed

Lines of Context: