busy_count and gamma is only used by compositors. Nothing in the
wayland libraries uses these, so they are not defined there. We should
probably add a pointer for the compositor to allocate further state
too without having to use a map for that.

On Mon, Oct 1, 2012 at 9:42 AM, Pekka Paalanen <ppaala...@gmail.com> wrote:
> On Sun, 30 Sep 2012 01:39:14 +0200
> John Kåre Alsaker <john.kare.alsa...@gmail.com> wrote:
>
>> ---
>>  src/wayland-server.h | 1 +
>>  src/wayland-shm.c    | 3 +--
>>  2 files changed, 2 insertions(+), 2 deletions(-)
>>
>> diff --git a/src/wayland-server.h b/src/wayland-server.h
>> index 45cc61c..9fa754f 100644
>> --- a/src/wayland-server.h
>> +++ b/src/wayland-server.h
>> @@ -180,6 +180,7 @@ struct wl_buffer {
>>       struct wl_resource resource;
>>       int32_t width, height;
>>       uint32_t busy_count;
>> +     uint32_t gamma;
>>  };
>
> Where are all the possible values for 'gamma' defined and documented?
> Should it be an enum?
>
> Usually such changes are accompanied by further patches, that use the
> new things, so they can be evaluated. This change is an API break for
> servers and Mesa. Maybe it's a little early for this right now?
>
>
> Thanks,
> pq
>
>>  struct wl_surface {
>> diff --git a/src/wayland-shm.c b/src/wayland-shm.c
>> index 90c4cf7..f73b3f7 100644
>> --- a/src/wayland-shm.c
>> +++ b/src/wayland-shm.c
>> @@ -112,7 +112,7 @@ shm_pool_create_buffer(struct wl_client *client, struct 
>> wl_resource *resource,
>>               return;
>>       }
>>
>> -     buffer = malloc(sizeof *buffer);
>> +     buffer = calloc(1, sizeof *buffer);
>>       if (buffer == NULL) {
>>               wl_resource_post_no_memory(resource);
>>               return;
>> @@ -120,7 +120,6 @@ shm_pool_create_buffer(struct wl_client *client, struct 
>> wl_resource *resource,
>>
>>       buffer->buffer.width = width;
>>       buffer->buffer.height = height;
>> -     buffer->buffer.busy_count = 0;
>>       buffer->format = format;
>>       buffer->stride = stride;
>>       buffer->offset = offset;
>
_______________________________________________
wayland-devel mailing list
wayland-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/wayland-devel

Reply via email to