Ensure the destructor is called since it destroys the EGLSurface before creating a new onscreen surface. (flutter/engine#20916)
This commit is contained in:
@@ -92,6 +92,9 @@ bool AndroidSurfaceGL::SetNativeWindow(
|
||||
FML_DCHECK(IsValid());
|
||||
FML_DCHECK(window);
|
||||
native_window_ = window;
|
||||
// Ensure the destructor is called since it destroys the `EGLSurface` before
|
||||
// creating a new onscreen surface.
|
||||
onscreen_surface_ = nullptr;
|
||||
// Create the onscreen surface.
|
||||
onscreen_surface_ = android_context_->CreateOnscreenSurface(window);
|
||||
if (!onscreen_surface_->IsValid()) {
|
||||
|
||||
Reference in New Issue
Block a user