mirror of
https://github.com/flutter/flutter.git
synced 2026-02-20 02:29:02 +08:00
[Impeller] Fix leak of framebuffers used in GLES MSAA rendering (flutter/engine#47362)
This commit is contained in:
parent
fa847e083e
commit
e40bd4d3dd
@ -488,6 +488,13 @@ struct RenderPassData {
|
||||
FML_DCHECK(gl.BlitFramebuffer.IsAvailable());
|
||||
|
||||
GLuint draw_fbo = GL_NONE;
|
||||
fml::ScopedCleanupClosure delete_draw_fbo([&gl, &draw_fbo, fbo]() {
|
||||
if (draw_fbo != GL_NONE) {
|
||||
gl.BindFramebuffer(GL_FRAMEBUFFER, fbo);
|
||||
gl.DeleteFramebuffers(1u, &draw_fbo);
|
||||
}
|
||||
});
|
||||
|
||||
gl.GenFramebuffers(1u, &draw_fbo);
|
||||
gl.BindFramebuffer(GL_FRAMEBUFFER, draw_fbo);
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user