mirror of
https://gitlab.gnome.org/GNOME/gtk.git
synced 2025-01-13 22:10:08 +00:00
gl: Don't punch hole if the subsurface is above
Saves some work.
This commit is contained in:
parent
667f02ecd8
commit
ef77a6fa73
@ -4017,17 +4017,20 @@ 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))
|
||||||
{
|
{
|
||||||
/* Clear the area so we can see through */
|
if (!gdk_subsurface_is_above_parent (subsurface))
|
||||||
if (gsk_gl_render_job_begin_draw (job, CHOOSE_PROGRAM (job, color)))
|
|
||||||
{
|
{
|
||||||
GskGLCommandBatch *batch;
|
/* Clear the area so we can see through */
|
||||||
guint16 color[4];
|
if (gsk_gl_render_job_begin_draw (job, CHOOSE_PROGRAM (job, color)))
|
||||||
rgba_to_half (&(GdkRGBA){0,0,0,0}, color);
|
{
|
||||||
|
GskGLCommandBatch *batch;
|
||||||
|
guint16 color[4];
|
||||||
|
rgba_to_half (&(GdkRGBA){0,0,0,0}, color);
|
||||||
|
|
||||||
batch = gsk_gl_command_queue_get_batch (job->command_queue);
|
batch = gsk_gl_command_queue_get_batch (job->command_queue);
|
||||||
batch->draw.blend = 0;
|
batch->draw.blend = 0;
|
||||||
gsk_gl_render_job_draw_rect_with_color (job, &node->bounds, color);
|
gsk_gl_render_job_draw_rect_with_color (job, &node->bounds, color);
|
||||||
gsk_gl_render_job_end_draw (job);
|
gsk_gl_render_job_end_draw (job);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
Loading…
Reference in New Issue
Block a user