From dd24b48b1142bd9321f76f7ff79bad2ee5979b68 Mon Sep 17 00:00:00 2001 From: Agorgianitis Loukas Date: Fri, 6 Aug 2021 17:54:09 +0300 Subject: [PATCH] Fix scissor test leak when presenting gles backend (#1772) * Fix scissor test leak when presenting gles backend * Set color mask before presenting gles backend to avoid potential leak --- wgpu-hal/src/gles/egl.rs | 3 +++ 1 file changed, 3 insertions(+) diff --git a/wgpu-hal/src/gles/egl.rs b/wgpu-hal/src/gles/egl.rs index 90d029ec9f..5c68761d6a 100644 --- a/wgpu-hal/src/gles/egl.rs +++ b/wgpu-hal/src/gles/egl.rs @@ -840,6 +840,9 @@ impl Surface { crate::SurfaceError::Lost })?; + gl.disable(glow::SCISSOR_TEST); + gl.color_mask(true, true, true, true); + gl.bind_framebuffer(glow::DRAW_FRAMEBUFFER, None); gl.bind_framebuffer(glow::READ_FRAMEBUFFER, Some(sc.framebuffer)); // Note the Y-flipping here. GL's presentation is not flipped,