remove unused dimension from buffer calculations
This commit is contained in:
parent
e46ec57b43
commit
84c6dbd58d
|
@ -61,7 +61,6 @@ struct wlr_texture {
|
||||||
bool valid;
|
bool valid;
|
||||||
uint32_t format;
|
uint32_t format;
|
||||||
int width, height;
|
int width, height;
|
||||||
int height_from_buffer, width_from_buffer;
|
|
||||||
struct wl_signal destroy_signal;
|
struct wl_signal destroy_signal;
|
||||||
struct wl_resource *resource;
|
struct wl_resource *resource;
|
||||||
};
|
};
|
||||||
|
|
|
@ -15,11 +15,8 @@ static void surface_attach(struct wl_client *client,
|
||||||
struct wl_resource *resource,
|
struct wl_resource *resource,
|
||||||
struct wl_resource *buffer, int32_t sx, int32_t sy) {
|
struct wl_resource *buffer, int32_t sx, int32_t sy) {
|
||||||
struct wlr_surface *surface = wl_resource_get_user_data(resource);
|
struct wlr_surface *surface = wl_resource_get_user_data(resource);
|
||||||
int scale = surface->current.scale;
|
|
||||||
surface->pending.invalid |= WLR_SURFACE_INVALID_BUFFER;
|
surface->pending.invalid |= WLR_SURFACE_INVALID_BUFFER;
|
||||||
surface->pending.buffer = buffer;
|
surface->pending.buffer = buffer;
|
||||||
surface->texture->height_from_buffer = surface->texture->height / scale;
|
|
||||||
surface->texture->width_from_buffer = surface->texture->width / scale;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static void surface_damage(struct wl_client *client,
|
static void surface_damage(struct wl_client *client,
|
||||||
|
|
Loading…
Reference in New Issue