[PATCH v2] Add a new field for compositors to store the gamma encoding of wl_buffers.
John Kåre Alsaker
john.kare.alsaker at gmail.com
Sat Sep 29 16:39:14 PDT 2012
---
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;
};
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;
--
1.7.12.1
More information about the wayland-devel
mailing list