client-buffer: remove unnecessary wlr_resource_get_buffer_size
We can just get the size from the imported texture.
This commit is contained in:
parent
17dd4c9e9a
commit
ae5275c09f
|
@ -222,9 +222,6 @@ struct wlr_client_buffer *wlr_client_buffer_import(
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
int width, height;
|
|
||||||
wlr_resource_get_buffer_size(resource, renderer, &width, &height);
|
|
||||||
|
|
||||||
struct wlr_client_buffer *buffer =
|
struct wlr_client_buffer *buffer =
|
||||||
calloc(1, sizeof(struct wlr_client_buffer));
|
calloc(1, sizeof(struct wlr_client_buffer));
|
||||||
if (buffer == NULL) {
|
if (buffer == NULL) {
|
||||||
|
@ -232,7 +229,8 @@ struct wlr_client_buffer *wlr_client_buffer_import(
|
||||||
wl_resource_post_no_memory(resource);
|
wl_resource_post_no_memory(resource);
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
wlr_buffer_init(&buffer->base, &client_buffer_impl, width, height);
|
wlr_buffer_init(&buffer->base, &client_buffer_impl,
|
||||||
|
texture->width, texture->height);
|
||||||
buffer->resource = resource;
|
buffer->resource = resource;
|
||||||
buffer->texture = texture;
|
buffer->texture = texture;
|
||||||
buffer->resource_released = resource_released;
|
buffer->resource_released = resource_released;
|
||||||
|
|
Loading…
Reference in New Issue