Skip to content
This repository was archived by the owner on Feb 25, 2025. It is now read-only.

Commit e18ba82

Browse files
[Impeller] Fix leak of framebuffers used in GLES MSAA rendering (#47362)
1 parent 71e1a04 commit e18ba82

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

impeller/renderer/backend/gles/render_pass_gles.cc

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -488,6 +488,13 @@ struct RenderPassData {
488488
FML_DCHECK(gl.BlitFramebuffer.IsAvailable());
489489

490490
GLuint draw_fbo = GL_NONE;
491+
fml::ScopedCleanupClosure delete_draw_fbo([&gl, &draw_fbo, fbo]() {
492+
if (draw_fbo != GL_NONE) {
493+
gl.BindFramebuffer(GL_FRAMEBUFFER, fbo);
494+
gl.DeleteFramebuffers(1u, &draw_fbo);
495+
}
496+
});
497+
491498
gl.GenFramebuffers(1u, &draw_fbo);
492499
gl.BindFramebuffer(GL_FRAMEBUFFER, draw_fbo);
493500

0 commit comments

Comments
 (0)