Damage surface before attaching new buffer
This reverts cde9bfc805. We need to damage the
area covered by the old surface when attaching a new buffer. The new surface
area will be damaged by the client.
This commit is contained in:
@@ -908,6 +908,13 @@ surface_attach(struct wl_client *client,
|
|||||||
{
|
{
|
||||||
struct wlsc_surface *es = (struct wlsc_surface *) surface;
|
struct wlsc_surface *es = (struct wlsc_surface *) surface;
|
||||||
|
|
||||||
|
/* FIXME: This damages the entire old surface, but we should
|
||||||
|
* really just damage the part that's no longer covered by the
|
||||||
|
* surface. Anything covered by the new surface will be
|
||||||
|
* damaged by the client. */
|
||||||
|
if (es->buffer)
|
||||||
|
wlsc_surface_damage(es);
|
||||||
|
|
||||||
buffer->busy_count++;
|
buffer->busy_count++;
|
||||||
wlsc_buffer_post_release(es->buffer);
|
wlsc_buffer_post_release(es->buffer);
|
||||||
|
|
||||||
@@ -927,12 +934,6 @@ surface_attach(struct wl_client *client,
|
|||||||
|
|
||||||
wlsc_buffer_attach(buffer, surface);
|
wlsc_buffer_attach(buffer, surface);
|
||||||
|
|
||||||
/* FIXME: This damages the entire old surface, but we should
|
|
||||||
* really just damage the part that's no longer covered by the
|
|
||||||
* surface. Anything covered by the new surface will be
|
|
||||||
* damaged by the client. */
|
|
||||||
wlsc_surface_damage(es);
|
|
||||||
|
|
||||||
es->compositor->shell->attach(es->compositor->shell, es);
|
es->compositor->shell->attach(es->compositor->shell, es);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user