From 8bb34f2c207a881816b0d3373d5e8e1dbb396226 Mon Sep 17 00:00:00 2001 From: Jonah Williams Date: Tue, 25 Feb 2025 21:07:59 -0800 Subject: [PATCH] [Impeller] make DLOG into LOG for startup errors. (#164110) Make logs visible to help debug https://github.com/flutter/flutter/issues/163532 . Right now we can't see why context creation is failing. It may be an EGL config issue. --- .../android/android_context_gl_impeller.cc | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/engine/src/flutter/shell/platform/android/android_context_gl_impeller.cc b/engine/src/flutter/shell/platform/android/android_context_gl_impeller.cc index 31ad0a5551..1c67056132 100644 --- a/engine/src/flutter/shell/platform/android/android_context_gl_impeller.cc +++ b/engine/src/flutter/shell/platform/android/android_context_gl_impeller.cc @@ -102,7 +102,7 @@ AndroidContextGLImpeller::AndroidContextGLImpeller( reactor_worker_(std::shared_ptr(new ReactorWorker())), display_(std::move(display)) { if (!display_ || !display_->IsValid()) { - FML_DLOG(ERROR) << "Could not create context with invalid EGL display."; + FML_LOG(ERROR) << "Could not create context with invalid EGL display."; return; } @@ -130,7 +130,7 @@ AndroidContextGLImpeller::AndroidContextGLImpeller( FML_LOG(INFO) << "Warning: This device doesn't support MSAA for onscreen " "framebuffers. Falling back to a single sample."; } else { - FML_DLOG(ERROR) << "Could not choose onscreen config."; + FML_LOG(ERROR) << "Could not choose onscreen config."; return; } } @@ -138,20 +138,20 @@ AndroidContextGLImpeller::AndroidContextGLImpeller( desc.surface_type = impeller::egl::SurfaceType::kPBuffer; auto offscreen_config = display_->ChooseConfig(desc); if (!offscreen_config) { - FML_DLOG(ERROR) << "Could not choose offscreen config."; + FML_LOG(ERROR) << "Could not choose offscreen config."; return; } auto onscreen_context = display_->CreateContext(*onscreen_config, nullptr); if (!onscreen_context) { - FML_DLOG(ERROR) << "Could not create onscreen context."; + FML_LOG(ERROR) << "Could not create onscreen context."; return; } auto offscreen_context = display_->CreateContext(*offscreen_config, onscreen_context.get()); if (!offscreen_context) { - FML_DLOG(ERROR) << "Could not create offscreen context."; + FML_LOG(ERROR) << "Could not create offscreen context."; return; } @@ -160,7 +160,7 @@ AndroidContextGLImpeller::AndroidContextGLImpeller( auto offscreen_surface = display_->CreatePixelBufferSurface(*offscreen_config, 1u, 1u); if (!offscreen_context->MakeCurrent(*offscreen_surface)) { - FML_DLOG(ERROR) << "Could not make offscreen context current."; + FML_LOG(ERROR) << "Could not make offscreen context current."; return; } @@ -168,12 +168,12 @@ AndroidContextGLImpeller::AndroidContextGLImpeller( CreateImpellerContext(reactor_worker_, enable_gpu_tracing); if (!impeller_context) { - FML_DLOG(ERROR) << "Could not create Impeller context."; + FML_LOG(ERROR) << "Could not create Impeller context."; return; } if (!offscreen_context->ClearCurrent()) { - FML_DLOG(ERROR) << "Could not clear offscreen context."; + FML_LOG(ERROR) << "Could not clear offscreen context."; return; } // Setup context listeners. @@ -191,7 +191,7 @@ AndroidContextGLImpeller::AndroidContextGLImpeller( }; if (!onscreen_context->AddLifecycleListener(listener).has_value() || !offscreen_context->AddLifecycleListener(listener).has_value()) { - FML_DLOG(ERROR) << "Could not add lifecycle listeners"; + FML_LOG(ERROR) << "Could not add lifecycle listeners"; } onscreen_config_ = std::move(onscreen_config);