Skip to content

Commit 01dee39

Browse files
committed
Test logs
1 parent 81ba581 commit 01dee39

File tree

4 files changed

+30
-0
lines changed

4 files changed

+30
-0
lines changed

shell/platform/embedder/tests/embedder_config_builder.cc

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -201,6 +201,7 @@ void EmbedderConfigBuilder::SetMetalRendererConfig(SkISize surface_size) {
201201

202202
void EmbedderConfigBuilder::SetVulkanRendererConfig(SkISize surface_size) {
203203
#ifdef SHELL_ENABLE_VULKAN
204+
FML_LOG(ERROR) << "==== bdero ==== SetVulkanRendererConfig";
204205
renderer_config_.type = FlutterRendererType::kVulkan;
205206
renderer_config_.vulkan = vulkan_renderer_config_;
206207
context_.SetupSurface(surface_size);
@@ -468,9 +469,12 @@ void EmbedderConfigBuilder::InitializeMetalRendererConfig() {
468469
#ifdef SHELL_ENABLE_VULKAN
469470

470471
void EmbedderConfigBuilder::InitializeVulkanRendererConfig() {
472+
FML_LOG(ERROR) << "==== bdero ==== InitializeVulkanRendererConfig";
471473
if (context_.GetContextType() != EmbedderTestContextType::kVulkanContext) {
474+
FML_LOG(ERROR) << "==== bdero ==== InitializeVulkanRendererConfig SKIPPED";
472475
return;
473476
}
477+
FML_LOG(ERROR) << "==== bdero ==== context_.GetContextType() must be Vulkan";
474478

475479
vulkan_renderer_config_.struct_size = sizeof(FlutterVulkanRendererConfig);
476480
vulkan_renderer_config_.version =

shell/platform/embedder/tests/embedder_test.cc

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@ std::string EmbedderTest::GetFixturesDirectory() const {
2525

2626
EmbedderTestContext& EmbedderTest::GetEmbedderContext(
2727
EmbedderTestContextType type) {
28+
FML_LOG(ERROR) << "==== bdero ==== GetEmbedderContext";
2829
// Setup the embedder context lazily instead of in the constructor because we
2930
// don't to do all the work if the test won't end up using context.
3031
if (!embedder_contexts_[type]) {
@@ -36,6 +37,9 @@ EmbedderTestContext& EmbedderTest::GetEmbedderContext(
3637
break;
3738
#ifdef SHELL_ENABLE_VULKAN
3839
case EmbedderTestContextType::kVulkanContext:
40+
41+
FML_LOG(ERROR) << "==== bdero ==== GetEmbedderContext: "
42+
"EmbedderTestContextVulkan was constructed";
3943
embedder_contexts_[type] =
4044
std::make_unique<EmbedderTestContextVulkan>(GetFixturesDirectory());
4145
break;

shell/platform/embedder/tests/embedder_unittests.cc

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -592,6 +592,7 @@ TEST_F(EmbedderTest, VMAndIsolateSnapshotSizesAreRedundantInAOTMode) {
592592
///
593593
TEST_F(EmbedderTest,
594594
CompositorMustBeAbleToRenderKnownSceneWithSoftwareCompositor) {
595+
FML_LOG(ERROR) << "====bdero==== 0 BEGIN";
595596
auto& context = GetEmbedderContext(EmbedderTestContextType::kSoftwareContext);
596597

597598
EmbedderConfigBuilder builder(context);
@@ -606,8 +607,12 @@ TEST_F(EmbedderTest,
606607

607608
auto scene_image = context.GetNextSceneImage();
608609

610+
FML_LOG(ERROR) << "====bdero==== 1 GetNextSceneImage";
611+
609612
context.GetCompositor().SetNextPresentCallback(
610613
[&](const FlutterLayer** layers, size_t layers_count) {
614+
FML_LOG(ERROR) << "====bdero==== Present callback BEGIN";
615+
611616
ASSERT_EQ(layers_count, 5u);
612617

613618
// Layer Root
@@ -693,12 +698,17 @@ TEST_F(EmbedderTest,
693698
ASSERT_EQ(*layers[4], layer);
694699
}
695700

701+
FML_LOG(ERROR) << "====bdero==== Present callback latch";
696702
latch.CountDown();
703+
704+
FML_LOG(ERROR) << "====bdero==== Present callback END";
697705
});
698706

699707
context.GetCompositor().SetPlatformViewRendererCallback(
700708
[&](const FlutterLayer& layer, GrDirectContext*
701709
/* don't use because software compositor */) -> sk_sp<SkImage> {
710+
FML_LOG(ERROR) << "====bdero==== Renderer callback BEGIN";
711+
702712
auto surface = CreateRenderSurface(
703713
layer, nullptr /* null because software compositor */);
704714
auto canvas = surface->getCanvas();
@@ -731,6 +741,7 @@ TEST_F(EmbedderTest,
731741
<< "Test was asked to composite an unknown platform view.";
732742
}
733743

744+
FML_LOG(ERROR) << "====bdero==== Renderer callback END";
734745
return surface->makeImageSnapshot();
735746
});
736747

@@ -739,8 +750,12 @@ TEST_F(EmbedderTest,
739750
CREATE_NATIVE_ENTRY(
740751
[&latch](Dart_NativeArguments args) { latch.CountDown(); }));
741752

753+
FML_LOG(ERROR) << "====bdero==== 2 Before LaunchEngine";
754+
742755
auto engine = builder.LaunchEngine();
743756

757+
FML_LOG(ERROR) << "====bdero==== 3 After LaunchEngine";
758+
744759
// Send a window metrics events so frames may be scheduled.
745760
FlutterWindowMetricsEvent event = {};
746761
event.struct_size = sizeof(event);
@@ -755,12 +770,16 @@ TEST_F(EmbedderTest,
755770
kSuccess);
756771
ASSERT_TRUE(engine.is_valid());
757772

773+
FML_LOG(ERROR) << "====bdero==== 4 Before latch";
758774
latch.Wait();
775+
FML_LOG(ERROR) << "====bdero==== 5 After latch";
759776

760777
ASSERT_TRUE(ImageMatchesFixture("compositor_software.png", scene_image));
761778

762779
// There should no present calls on the root surface.
763780
ASSERT_EQ(context.GetSurfacePresentCount(), 0u);
781+
782+
FML_LOG(ERROR) << "====bdero==== 6 END";
764783
}
765784

766785
//------------------------------------------------------------------------------

testing/test_vulkan_context.cc

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -109,9 +109,12 @@ TestVulkanContext::TestVulkanContext() {
109109
}
110110

111111
TestVulkanContext::~TestVulkanContext() {
112+
FML_LOG(ERROR) << "~TestVulkanContext begin";
112113
if (context_) {
113114
context_->releaseResourcesAndAbandonContext();
114115
}
116+
117+
FML_LOG(ERROR) << "~TestVulkanContext end";
115118
}
116119

117120
std::optional<TestVulkanImage> TestVulkanContext::CreateImage(

0 commit comments

Comments
 (0)