On 06/02/14 14:37, Pekka Paalanen wrote:
> On Thu,  6 Feb 2014 12:30:32 +0100
> Emilio Pozuelo Monfort <poch...@gmail.com> wrote:
> 
>> From: Emilio Pozuelo Monfort <emilio.pozu...@collabora.co.uk>
>>
>> This lets the compositor know the size of the surface as calculated
>> in weston_surface_set_size_from_buffer(), and fixes a couple of
>> tests when using the headless backend.
>>
>> Signed-off-by: Emilio Pozuelo Monfort <emilio.pozu...@collabora.co.uk>
>> ---
>>  src/noop-renderer.c | 10 ++++++++++
>>  1 file changed, 10 insertions(+)
>>
>> diff --git a/src/noop-renderer.c b/src/noop-renderer.c
>> index ad750b5..cf1a7f2 100644
>> --- a/src/noop-renderer.c
>> +++ b/src/noop-renderer.c
>> @@ -49,6 +49,16 @@ noop_renderer_flush_damage(struct weston_surface
>> *surface) static void
>>  noop_renderer_attach(struct weston_surface *es, struct weston_buffer
>> *buffer) {
>> +    struct wl_shm_buffer *shm_buffer;
>> +
>> +    if (!buffer)
>> +            return;
>> +
>> +    shm_buffer = wl_shm_buffer_get(buffer->resource);
>> +
>> +    buffer->shm_buffer = shm_buffer;
>> +    buffer->width = wl_shm_buffer_get_width(shm_buffer);
>> +    buffer->height = wl_shm_buffer_get_height(shm_buffer);
>>  }
>>  
>>  static void
> 
> Hi,
> 
> if we ever manage to create non-wl_shm buffers and end up here,
> wl_shm_buffer_get() will return NULL. It may become a problem if the
> headless backend ever grows EGL support. But until then, I'm ok with
> this.

Oh yeah, I intended to do that... I have added a check similar to
pixman-renderer's in v2.

Emilio
_______________________________________________
wayland-devel mailing list
wayland-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/wayland-devel

Reply via email to