mirror of
https://gitlab.gnome.org/GNOME/gtk.git
synced 2024-12-24 20:51:10 +00:00
gpu: Set scissor rect before clearing
The render area that restricts clearing on Vulkan needs to be respected by the GL renderer, too.
This commit is contained in:
parent
0ed45c5f40
commit
461d9b4052
@ -172,6 +172,10 @@ gsk_gpu_render_pass_op_gl_command (GskGpuOp *op,
|
||||
gsk_gpu_image_get_width (self->target),
|
||||
gsk_gpu_image_get_height (self->target));
|
||||
|
||||
if (target_flip_y)
|
||||
glScissor (self->area.x, target_flip_y - self->area.y - self->area.height, self->area.width, self->area.height);
|
||||
else
|
||||
glScissor (self->area.x, self->area.y, self->area.width, self->area.height);
|
||||
glClearColor (0, 0, 0, 0);
|
||||
glClear (GL_COLOR_BUFFER_BIT);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user