Skip to content

Commit

Permalink
Fix EGL_BAD_SURFACE when app is paused (flutter#20735)
Browse files Browse the repository at this point in the history
  • Loading branch information
Emmanuel Garcia authored and christopherfujino committed Aug 28, 2020
1 parent 07b06a5 commit bad0205
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions shell/platform/android/android_surface_gl.cc
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,11 @@ AndroidSurfaceGL::AndroidSurfaceGL(
AndroidSurfaceGL::~AndroidSurfaceGL() = default;

void AndroidSurfaceGL::TeardownOnScreenContext() {
// When the onscreen surface is destroyed, the context and the surface
// instance should be deleted. Issue:
// https://github.com/flutter/flutter/issues/64414
android_context_->ClearCurrent();
onscreen_surface_ = nullptr;
}

bool AndroidSurfaceGL::IsValid() const {
Expand Down

0 comments on commit bad0205

Please sign in to comment.