[PATCH weston 00/10] Implement screenshot-based testing with the headless renderer

Pekka Paalanen ppaalanen at gmail.com
Tue May 12 00:47:08 PDT 2015


On Mon, 11 May 2015 16:07:26 +0100
Daniel Stone <daniel at fooishbar.org> wrote:

> Hi,
> 
> On 11 May 2015 at 13:41, Pekka Paalanen <ppaalanen at gmail.com> wrote:
> > Did you notice, that 'clientside-screenshot.png' ends up all black, if
> > you do 'make check BACKEND=x11-backend.so'?
> > Wonder why it does that, you're not intending to do anything
> > backend-specific. Except the server command line arguments?
> 
> €10 says this is only on uncomposited X11 servers, where you require
> Expose events ... ?

I find that hard to believe...

x11_output_repaint_shm() ->
pixman_renderer_repaint_output() does a repaint to the shadow, then
copy_to_hw_buffer() and just before returning it emits the
output->frame_signal.

Output->frame_signal should lead to a call to
weston_renderer::read_pixels, which reads from the hw_buffer, which is
only a pixman_image_t...

So all of rendering and read_pixels should be already done when control
returns to x11_output_repaint_shm(), so there is no room for X11 calls
in between.

The hw_surface (hw_buffer) is created by pixman_image_create_bits()
which is handed a pointer to a piece of memory from shmat().

Looks like screenshooting does not go through X11 protocol, so I'm
puzzled why it doesn't seem to work. Also, the screenshooter (super+s)
works just fine.


Thanks,
pq


More information about the wayland-devel mailing list