From e647ebae87950176738b382434a72749e2874bb6 Mon Sep 17 00:00:00 2001 From: Benjamin Otte Date: Fri, 9 Feb 2024 03:03:27 +0100 Subject: [PATCH] rendernode: Do full diff when starting/stopping offload When a subsurface goes from not offloaded to offloaded (or vice versa), we need to add the whole node to the diff region, because we switch from whatever contents were drawn to a punched hole. --- gsk/gskrendernodeimpl.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/gsk/gskrendernodeimpl.c b/gsk/gskrendernodeimpl.c index ec91dc8f79..e4e096143e 100644 --- a/gsk/gskrendernodeimpl.c +++ b/gsk/gskrendernodeimpl.c @@ -6984,11 +6984,17 @@ gsk_subsurface_node_diff (GskRenderNode *node1, info1 = gsk_offload_get_subsurface_info (data->offload, self1->subsurface); info2 = gsk_offload_get_subsurface_info (data->offload, self2->subsurface); - if (!info1 || !info2) + if (!info1 && !info2) { gsk_render_node_data_diff (self1->child, self2->child, data); return; } + else if (!info1 || !info2) + { + gsk_render_node_diff_impossible (node1, node2, data); + return; + } + if (info1->is_offloaded != info2->is_offloaded || info1->is_above != info2->is_above)