gl: Don't punch hole if the subsurface is above

Saves some work.
This commit is contained in:
Benjamin Otte 2023-11-14 20:13:11 +01:00
parent 667f02ecd8
commit ef77a6fa73

View File

@ -4016,6 +4016,8 @@ gsk_gl_render_job_visit_subsurface_node (GskGLRenderJob *job,
if (job->offload && if (job->offload &&
gsk_offload_subsurface_is_offloaded (job->offload, subsurface)) gsk_offload_subsurface_is_offloaded (job->offload, subsurface))
{
if (!gdk_subsurface_is_above_parent (subsurface))
{ {
/* Clear the area so we can see through */ /* Clear the area so we can see through */
if (gsk_gl_render_job_begin_draw (job, CHOOSE_PROGRAM (job, color))) if (gsk_gl_render_job_begin_draw (job, CHOOSE_PROGRAM (job, color)))
@ -4030,6 +4032,7 @@ gsk_gl_render_job_visit_subsurface_node (GskGLRenderJob *job,
gsk_gl_render_job_end_draw (job); gsk_gl_render_job_end_draw (job);
} }
} }
}
else else
{ {
gsk_gl_render_job_visit_node (job, gsk_subsurface_node_get_child (node)); gsk_gl_render_job_visit_node (job, gsk_subsurface_node_get_child (node));