Skip to content

Commit 8bb34f2

Browse files
author
Jonah Williams
authored
[Impeller] make DLOG into LOG for startup errors. (#164110)
Make logs visible to help debug flutter/flutter#163532 . Right now we can't see why context creation is failing. It may be an EGL config issue.
1 parent aa113bd commit 8bb34f2

File tree

1 file changed

+9
-9
lines changed

1 file changed

+9
-9
lines changed

engine/src/flutter/shell/platform/android/android_context_gl_impeller.cc

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -102,7 +102,7 @@ AndroidContextGLImpeller::AndroidContextGLImpeller(
102102
reactor_worker_(std::shared_ptr<ReactorWorker>(new ReactorWorker())),
103103
display_(std::move(display)) {
104104
if (!display_ || !display_->IsValid()) {
105-
FML_DLOG(ERROR) << "Could not create context with invalid EGL display.";
105+
FML_LOG(ERROR) << "Could not create context with invalid EGL display.";
106106
return;
107107
}
108108

@@ -130,28 +130,28 @@ AndroidContextGLImpeller::AndroidContextGLImpeller(
130130
FML_LOG(INFO) << "Warning: This device doesn't support MSAA for onscreen "
131131
"framebuffers. Falling back to a single sample.";
132132
} else {
133-
FML_DLOG(ERROR) << "Could not choose onscreen config.";
133+
FML_LOG(ERROR) << "Could not choose onscreen config.";
134134
return;
135135
}
136136
}
137137

138138
desc.surface_type = impeller::egl::SurfaceType::kPBuffer;
139139
auto offscreen_config = display_->ChooseConfig(desc);
140140
if (!offscreen_config) {
141-
FML_DLOG(ERROR) << "Could not choose offscreen config.";
141+
FML_LOG(ERROR) << "Could not choose offscreen config.";
142142
return;
143143
}
144144

145145
auto onscreen_context = display_->CreateContext(*onscreen_config, nullptr);
146146
if (!onscreen_context) {
147-
FML_DLOG(ERROR) << "Could not create onscreen context.";
147+
FML_LOG(ERROR) << "Could not create onscreen context.";
148148
return;
149149
}
150150

151151
auto offscreen_context =
152152
display_->CreateContext(*offscreen_config, onscreen_context.get());
153153
if (!offscreen_context) {
154-
FML_DLOG(ERROR) << "Could not create offscreen context.";
154+
FML_LOG(ERROR) << "Could not create offscreen context.";
155155
return;
156156
}
157157

@@ -160,20 +160,20 @@ AndroidContextGLImpeller::AndroidContextGLImpeller(
160160
auto offscreen_surface =
161161
display_->CreatePixelBufferSurface(*offscreen_config, 1u, 1u);
162162
if (!offscreen_context->MakeCurrent(*offscreen_surface)) {
163-
FML_DLOG(ERROR) << "Could not make offscreen context current.";
163+
FML_LOG(ERROR) << "Could not make offscreen context current.";
164164
return;
165165
}
166166

167167
auto impeller_context =
168168
CreateImpellerContext(reactor_worker_, enable_gpu_tracing);
169169

170170
if (!impeller_context) {
171-
FML_DLOG(ERROR) << "Could not create Impeller context.";
171+
FML_LOG(ERROR) << "Could not create Impeller context.";
172172
return;
173173
}
174174

175175
if (!offscreen_context->ClearCurrent()) {
176-
FML_DLOG(ERROR) << "Could not clear offscreen context.";
176+
FML_LOG(ERROR) << "Could not clear offscreen context.";
177177
return;
178178
}
179179
// Setup context listeners.
@@ -191,7 +191,7 @@ AndroidContextGLImpeller::AndroidContextGLImpeller(
191191
};
192192
if (!onscreen_context->AddLifecycleListener(listener).has_value() ||
193193
!offscreen_context->AddLifecycleListener(listener).has_value()) {
194-
FML_DLOG(ERROR) << "Could not add lifecycle listeners";
194+
FML_LOG(ERROR) << "Could not add lifecycle listeners";
195195
}
196196

197197
onscreen_config_ = std::move(onscreen_config);

0 commit comments

Comments
 (0)