|
|
@ -341,8 +341,6 @@ static void surface_state_move(struct wlr_surface_state *state,
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
static void surface_apply_damage(struct wlr_surface *surface) {
|
|
|
|
static void surface_apply_damage(struct wlr_surface *surface) {
|
|
|
|
surface->has_buffer = surface->current.buffer;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if (surface->current.buffer == NULL) {
|
|
|
|
if (surface->current.buffer == NULL) {
|
|
|
|
// NULL commit
|
|
|
|
// NULL commit
|
|
|
|
if (surface->buffer != NULL) {
|
|
|
|
if (surface->buffer != NULL) {
|
|
|
@ -383,7 +381,7 @@ static void surface_apply_damage(struct wlr_surface *surface) {
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
static void surface_update_opaque_region(struct wlr_surface *surface) {
|
|
|
|
static void surface_update_opaque_region(struct wlr_surface *surface) {
|
|
|
|
if (!surface->has_buffer) {
|
|
|
|
if (!wlr_surface_has_buffer(surface)) {
|
|
|
|
pixman_region32_clear(&surface->opaque_region);
|
|
|
|
pixman_region32_clear(&surface->opaque_region);
|
|
|
|
return;
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
}
|
|
|
@ -722,7 +720,7 @@ struct wlr_texture *wlr_surface_get_texture(struct wlr_surface *surface) {
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
bool wlr_surface_has_buffer(struct wlr_surface *surface) {
|
|
|
|
bool wlr_surface_has_buffer(struct wlr_surface *surface) {
|
|
|
|
return surface->has_buffer;
|
|
|
|
return surface->current.buffer_width > 0 && surface->current.buffer_height > 0;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
void wlr_surface_map(struct wlr_surface *surface) {
|
|
|
|
void wlr_surface_map(struct wlr_surface *surface) {
|
|
|
|