delete opengl texture when it detatch from surfacetexture. (flutter/engine#18733)

This commit is contained in:
kaisa695275735 2020-09-15 05:07:39 +08:00 committed by GitHub
parent 01177fdd4d
commit 85f1cd7356

View File

@ -82,6 +82,7 @@ void AndroidExternalTextureGL::UpdateTransform() {
void AndroidExternalTextureGL::OnGrContextDestroyed() {
if (state_ == AttachmentState::attached) {
Detach();
glDeleteTextures(1, &texture_name_);
}
state_ = AttachmentState::detached;
}