1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-31 23:48:11 +00:00

LibAccelGfx: Deallocate VAO and VBOs in fill_rect_with_linear_gradient

Fixes memory leak in fill_rect_with_linear_gradient()
This commit is contained in:
Aliaksandr Kalenik 2023-11-29 20:01:05 +01:00 committed by Andreas Kling
parent 495b0f2bcc
commit 9a66f31b64

View file

@ -537,6 +537,10 @@ void Painter::fill_rect_with_linear_gradient(Gfx::FloatRect const& rect, Readonl
GL::enable_blending(GL::BlendFactor::One, GL::BlendFactor::OneMinusSrcAlpha);
GL::draw_arrays(GL::DrawPrimitive::Triangles, vertices.size() / 2);
GL::delete_buffer(vbo_vertices);
GL::delete_buffer(vbo_colors);
GL::delete_vertex_array(vao);
}
void Painter::save()