mirror of
https://gitlab.freedesktop.org/wayland/weston
synced 2024-10-07 04:55:00 +00:00
renderer-gl: only flush damage for surfaces used in the next output repaint
Stop flushing surfaces that are put on an overlay plane on the output to be repainted next, but that have to be painted into another output's primary_plane. Now that each output has its own primary_plane, and flush_damage() knows the output that is going to be repainted, texture_used can be limited to surfaces that will actually be used by the renderer during the following repaint_output(). Always upload when called from gl_renderer_surface_copy_content() or gl_renderer_create_surface() with the output parameter set to NULL. Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de>
This commit is contained in:
parent
155fa3a56a
commit
a401a1b247
|
@ -2096,10 +2096,14 @@ gl_renderer_flush_damage(struct weston_surface *surface,
|
||||||
* We still accumulate the damage in texture_damage, and
|
* We still accumulate the damage in texture_damage, and
|
||||||
* hold the reference to the buffer, in case the surface
|
* hold the reference to the buffer, in case the surface
|
||||||
* migrates back to the primary plane.
|
* migrates back to the primary plane.
|
||||||
|
*
|
||||||
|
* When called from gl_renderer_surface_copy_content()
|
||||||
|
* or gl_renderer_create_surface(), output is NULL.
|
||||||
|
* In that case, always upload.
|
||||||
*/
|
*/
|
||||||
texture_used = false;
|
texture_used = false;
|
||||||
wl_list_for_each(pnode, &surface->paint_node_list, surface_link) {
|
wl_list_for_each(pnode, &surface->paint_node_list, surface_link) {
|
||||||
if (pnode->plane == &pnode->output->primary_plane) {
|
if (!output || pnode->plane == &output->primary_plane) {
|
||||||
texture_used = true;
|
texture_used = true;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue