Skip to content

Commit bc9a348

Browse files
authored
Fix data race in VerifyB143464703WithSoftwareBackend (flutter#34722)
1 parent bb9938b commit bc9a348

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

shell/platform/embedder/tests/embedder_unittests.cc

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -952,6 +952,9 @@ TEST_F(EmbedderTest, VerifyB143464703WithSoftwareBackend) {
952952
builder.SetRenderTargetType(
953953
EmbedderTestBackingStoreProducer::RenderTargetType::kSoftwareBuffer);
954954

955+
// setup the screenshot promise.
956+
auto rendered_scene = context.GetNextSceneImage();
957+
955958
fml::CountDownLatch latch(1);
956959
context.GetCompositor().SetNextPresentCallback(
957960
[&](const FlutterLayer** layers, size_t layers_count) {
@@ -1051,8 +1054,7 @@ TEST_F(EmbedderTest, VerifyB143464703WithSoftwareBackend) {
10511054
kSuccess);
10521055
ASSERT_TRUE(engine.is_valid());
10531056

1054-
auto rendered_scene = context.GetNextSceneImage();
1055-
1057+
// wait for scene to be rendered.
10561058
latch.Wait();
10571059

10581060
// TODO(https://github.com/flutter/flutter/issues/53784): enable this on all

0 commit comments

Comments
 (0)