mirror of
https://gitlab.gnome.org/GNOME/gtk.git
synced 2024-12-25 13:11:13 +00:00
vulkan: Clear Cairo surfaces on upload
The memory isn't guaranteed to be all zeroes and we don't want glitches.
This commit is contained in:
parent
e98ae233fc
commit
e00e6f3d5d
@ -287,6 +287,9 @@ gsk_vulkan_upload_cairo_op_draw (GskVulkanOp *op,
|
||||
width / self->viewport.size.width,
|
||||
height / self->viewport.size.height);
|
||||
cr = cairo_create (surface);
|
||||
cairo_set_operator (cr, CAIRO_OPERATOR_CLEAR);
|
||||
cairo_paint (cr);
|
||||
cairo_set_operator (cr, CAIRO_OPERATOR_OVER);
|
||||
cairo_translate (cr, -self->viewport.origin.x, -self->viewport.origin.y);
|
||||
|
||||
gsk_render_node_draw (self->node, cr);
|
||||
@ -402,6 +405,9 @@ gsk_vulkan_upload_glyph_op_draw (GskVulkanOp *op,
|
||||
cairo_surface_set_device_scale (surface, self->scale, self->scale);
|
||||
|
||||
cr = cairo_create (surface);
|
||||
cairo_set_operator (cr, CAIRO_OPERATOR_CLEAR);
|
||||
cairo_paint (cr);
|
||||
cairo_set_operator (cr, CAIRO_OPERATOR_OVER);
|
||||
|
||||
/* Make sure the entire surface is initialized to black */
|
||||
cairo_set_source_rgba (cr, 0, 0, 0, 0);
|
||||
|
Loading…
Reference in New Issue
Block a user