Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Impeller] delete Impeller sim opt out. #56706

Merged
merged 13 commits into from
Nov 22, 2024

Conversation

jonahwilliams
Copy link
Member

Impeller only on simulators.

@flutter-dashboard
Copy link

It looks like this pull request may not have tests. Please make sure to add tests before merging. If you need an exemption, contact "@test-exemption-reviewer" in the #hackers channel in Discord (don't just cc them here, they won't see it!).

If you are not sure if you need tests, consider this rule of thumb: the purpose of a test is to make sure someone doesn't accidentally revert the fix. Ask yourself, is there anything in your PR that you feel it is important we not accidentally revert back to how it was before your fix?

Reviewers: Read the Tree Hygiene page and make sure this patch meets those guidelines before LGTMing. The test exemption team is a small volunteer group, so all reviewers should feel empowered to ask for tests, without delegating that responsibility entirely to the test exemption group.

@@ -226,7 +226,7 @@ struct Settings {
#if FML_OS_ANDROID || FML_OS_IOS || FML_OS_IOS_SIMULATOR
// On iOS devices, Impeller is the default with no opt-out and this field is
// const.
#if FML_OS_IOS && !FML_OS_IOS_SIMULATOR
#if FML_OS_IOS && FML_OS_IOS_SIMULATOR
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should this be || and not && ?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

....yes

@jonahwilliams
Copy link
Member Author

These compile errors are from the last commit...

@zanderso
Copy link
Member

These compile errors are from the last commit...

Oof. I don't have a better suggestion than kicking it again with an empty commit.

@zanderso
Copy link
Member

It looks like the failing jobs are just not being triggered to run. I'm going to click re-run on one of them.

@jtmcdole
Copy link
Contributor

Looking at the bot for the last commit / run - its clearly checking out the head of the last commit:

https://logs.chromium.org/logs/flutter/buildbucket/cr-buildbucket/8730815805504040081/+/u/Checkout_source_code/bot_update/stdout

@jtmcdole
Copy link
Contributor

Log search:

protoPayload.line.logMessage =~ "(ca78e0147ca4bd840eb64551c9cdb3319363ebab|764e3f401b84fd97348f33808bbce1e64ccfc778|746dcb5a926560e42ace9b322bf951d2106d1c7d)"
protoPayload.line.logMessage =~ "Mac mac_clang_tidy"

Then looking later; the error is actually a different file:

FAILED: obj/flutter/shell/common/common.switches.o 
/Volumes/Work/s/w/ir/cache/builder/src/flutter/buildtools/mac-arm64/reclient/rewrapper --cfg=/Volumes/Work/s/w/ir/cache/builder/src/flutter/build/rbe/rewrapper-mac-arm64.cfg --exec_root=/Volumes/Work/s/w/ir/cache/builder/src/ --server_address=unix:///Volumes/Work/s/w/ir/x/w/rc/rbei3atvle3/reproxy.sock --exec_strategy=remote_local_fallback --remote_wrapper=../../../flutter/build/rbe/remote_wrapper.sh --local_wrapper=../../../flutter/build/rbe/local_wrapper.sh --labels=type=compile,compiler=clang,lang=cpp ../../../flutter/buildtools/mac-arm64/clang/bin/clang++ -MMD -MF obj/flutter/shell/common/common.switches.o.d -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -D_FORTIFY_SOURCE=2 -D_LIBCPP_DISABLE_AVAILABILITY=1 -D_LIBCPP_DISABLE_VISIBILITY_ANNOTATIONS -D_LIBCPP_ENABLE_THREAD_SAFETY_ANNOTATIONS -DNDEBUG -DNVALGRIND -DDYNAMIC_ANNOTATIONS_ENABLED=0 -DSK_TYPEFACE_FACTORY_CORETEXT -DSK_FONTMGR_CORETEXT_AVAILABLE -DSK_METAL -DSK_CODEC_DECODES_JPEG -DSK_CODEC_DECODES_PNG -DSK_CODEC_DECODES_ICO -DSK_CODEC_DECODES_WEBP -DSK_HAS_WUFFS_LIBRARY -DSK_CODEC_DECODES_GIF -DSK_XML -DRAPIDJSON_HAS_STDSTRING -DRAPIDJSON_HAS_CXX11_RANGE_FOR -DRAPIDJSON_HAS_CXX11_RVALUE_REFS -DRAPIDJSON_HAS_CXX11_TYPETRAITS -DRAPIDJSON_HAS_CXX11_NOEXCEPT -DFLUTTER_RUNTIME_MODE_DEBUG=1 -DFLUTTER_RUNTIME_MODE_PROFILE=2 -DFLUTTER_RUNTIME_MODE_RELEASE=3 -DFLUTTER_RUNTIME_MODE_JIT_RELEASE=4 -DDART_LEGACY_API=\[\[deprecated\]\] -DFLUTTER_RUNTIME_MODE=1 -DFLUTTER_JIT_RUNTIME=1 -DIMPELLER_DEBUG=1 -DIMPELLER_SUPPORTS_RENDERING=1 -DIMPELLER_ENABLE_METAL=1 -DSK_CODEC_DECODES_BMP -DSK_CODEC_DECODES_WBMP -DSK_ENABLE_DUMP_GPU -DSK_FORCE_AAA -DSK_LEGACY_IGNORE_DRAW_VERTICES_BLEND_WITH_NO_SHADER -DSK_DISABLE_LEGACY_METAL_BACKEND_SURFACE -DSK_DISABLE_LEGACY_PARAGRAPH_UNICODE -DSK_DISABLE_LEGACY_SHADERCONTEXT -DSK_DISABLE_LOWP_RASTER_PIPELINE -DSK_FORCE_RASTER_PIPELINE_BLITTER -DSK_METAL_WAIT_UNTIL_SCHEDULED -DSK_DISABLE_EFFECT_DESERIALIZATION -DSK_ENABLE_PRECOMPILE -DSK_ASSUME_GL_ES=1 -DSK_GANESH -DU_USING_ICU_NAMESPACE=0 -DU_ENABLE_DYLOAD=0 -DUSE_CHROMIUM_ICU=1 -DU_ENABLE_TRACING=1 -DU_ENABLE_RESOURCE_TRACING=0 -DU_STATIC_IMPLEMENTATION -DICU_UTIL_DATA_IMPL=ICU_UTIL_DATA_FILE -DSK_ENABLE_PARAGRAPH -DSK_UNICODE_AVAILABLE -DSK_UNICODE_ICU_IMPLEMENTATION -I../../.. -Igen -I../../../flutter/third_party/libcxx/include -I../../../flutter/third_party/libcxxabi/include -I../../../flutter/build/secondary/flutter/third_party/libcxx/config -I../../../flutter -I../../../flutter/third_party/rapidjson -I../../../flutter/third_party/rapidjson/include -I../../../flutter/third_party -I../../../flutter/third_party/dart/runtime -I../../../flutter/third_party/dart/runtime/include -I../../../flutter/third_party/txt/src -Igen/flutter -Igen/flutter/impeller/runtime_stage -I../../../flutter/third_party/flatbuffers/include -I../../../flutter/third_party/skia -I../../../flutter/third_party/harfbuzz/src -I../../../flutter/third_party/icu/source/common -I../../../flutter/third_party/icu/source/i18n -I../../../flutter/third_party/skia/modules/skparagraph/include -I../../../flutter/third_party/skia/modules/skparagraph/utils -I../../../flutter/third_party/skia/modules/skunicode/include -fno-strict-aliasing --target=x86_64-apple-darwin -arch x86_64 -fcolor-diagnostics -Wall -Wextra -Wendif-labels -Werror -Wno-missing-field-initializers -Wno-unused-parameter -Wno-unused-but-set-parameter -Wno-unused-but-set-variable -Wno-implicit-int-float-conversion -Wno-deprecated-copy -Wno-psabi -Wno-deprecated-literal-operator -Wno-unqualified-std-cast-call -Wno-non-c-typedef-for-linkage -Wno-range-loop-construct -Wunguarded-availability -Wno-deprecated-declarations -no-canonical-prefixes -fvisibility=hidden -Wstring-conversion -Wnewline-eof -Os -fno-ident -fdata-sections -ffunction-sections -g2 -Wunreachable-code -Wno-newline-eof -fvisibility-inlines-hidden -std=c++17 -fno-rtti -nostdinc++ -nostdinc++ -fvisibility=hidden -fno-exceptions -stdlib=libc++ -isysroot ../../../flutter/prebuilts/SDKs/iPhoneSimulator17.0.sdk -mios-simulator-version-min=12.0  -c ../../../flutter/shell/common/switches.cc -o obj/flutter/shell/common/common.switches.o
../../../flutter/shell/common/switches.cc:454:32: error: cannot assign to static data member 'enable_impeller' with const-qualified type 'const bool'
  454 |       settings.enable_impeller =

@jonahwilliams
Copy link
Member Author

Copy link
Member

@zanderso zanderso left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm on green.

@zanderso
Copy link
Member

It looks like some test timeouts need to be increased on mac_unopt.

@jonahwilliams
Copy link
Member Author

I don't understand these failure cases. I was under the impression this change would be a no-op for our CI.

@zanderso
Copy link
Member

I'd guess we need to delete code under this flag: https://github.com/flutter/engine/blob/main/testing/scenario_app/bin/run_ios_tests.dart#L259.

@zanderso
Copy link
Member

@jonahwilliams
Copy link
Member Author

@zanderso I removed the with-skia, but the plist setting shouldn't matter - we're not going to parse it anyway.

Its looking like some of these tests won't pass with impeller on iOS simulators and the slimpeller work for simulators is not actually complete.

@chinmaygarde
Copy link
Member

Is this because of the UI thread platform thread merge and its interaction with Impeller? The hung test passes if I RunNowOrPostTask.

diff --git a/shell/platform/darwin/ios/framework/Source/FlutterEngineTest.mm b/shell/platform/darwin/ios/framework/Source/FlutterEngineTest.mm
index bb31e04866..7e0fef472d 100644
--- a/shell/platform/darwin/ios/framework/Source/FlutterEngineTest.mm
+++ b/shell/platform/darwin/ios/framework/Source/FlutterEngineTest.mm
@@ -270,12 +270,13 @@ FLUTTER_ASSERT_ARC
     fml::AutoResetWaitableEvent latch;
     [engine run];
     flutter::Shell& shell = engine.shell;
-    engine.shell.GetTaskRunners().GetUITaskRunner()->PostTask([&latch, &shell] {
-      flutter::Engine::Delegate& delegate = shell;
-      auto message = std::make_unique<flutter::PlatformMessage>("foo", nullptr);
-      delegate.OnEngineHandlePlatformMessage(std::move(message));
-      latch.Signal();
-    });
+    fml::TaskRunner::RunNowOrPostTask(
+        engine.shell.GetTaskRunners().GetUITaskRunner(), [&latch, &shell] {
+          flutter::Engine::Delegate& delegate = shell;
+          auto message = std::make_unique<flutter::PlatformMessage>("foo", nullptr);
+          delegate.OnEngineHandlePlatformMessage(std::move(message));
+          latch.Signal();
+        });
     latch.Wait();
     [registrar.messenger setMessageHandlerOnChannel:@"foo"
                                binaryMessageHandler:^(NSData* message, FlutterBinaryReply reply) {
diff --git a/testing/ios/IosUnitTests/App/Info.plist b/testing/ios/IosUnitTests/App/Info.plist
index 885a3b1804..e87b8d5186 100644
--- a/testing/ios/IosUnitTests/App/Info.plist
+++ b/testing/ios/IosUnitTests/App/Info.plist
@@ -46,8 +46,6 @@
 	</dict>
 	<key>FLTLeakDartVM</key>
 	<false/>
-	<key>FLTEnableImpeller</key>
-	<false/>
 	<key>FLTTraceSystrace</key>
 	<false/>
 	<key>FLTEnableDartProfiling</key>

@chinmaygarde
Copy link
Member

Uhh, another test further along called testThreadPrioritySetCorrectly is now failing. I suspect for similar reasons.

@chinmaygarde
Copy link
Member

Yup, its because the erstwhile UI thread no longer gets is priority set. [thread.name hasSuffix:@".ui"] and the test hangs.

We could split this patch into two with the first step being just to get rid of the Info.plist setting opting out of Impeller and fixing up the tests. Then this patch should land without issue.

chinmaygarde added a commit to chinmaygarde/flutter_engine that referenced this pull request Nov 21, 2024
The Info.plist override was missed earlier.

The main changes to the tests are due to the UI thread merge with the
platform thread. The amendment to the "spawn" API are due to the fact
that the assertions checked for the presence of GrDirectContext which
will never exist with Impeller.

Unblocks flutter#56706
@chinmaygarde
Copy link
Member

Rebasing this on top of #56740 after it lands should unblock this.

auto-submit bot pushed a commit that referenced this pull request Nov 21, 2024
The Info.plist override was missed earlier.

The main changes to the tests are due to the UI thread merge with the platform thread. The amendment to the "spawn" API are due to the fact that the assertions checked for the presence of GrDirectContext which will never exist with Impeller.

Unblocks #56706
@zanderso
Copy link
Member

I believe the failing unit tests of flag parsing can be deleted?

@jonahwilliams jonahwilliams added the autosubmit Merge PR when tree becomes green via auto submit App label Nov 22, 2024
@auto-submit auto-submit bot removed the autosubmit Merge PR when tree becomes green via auto submit App label Nov 22, 2024
Copy link
Contributor

auto-submit bot commented Nov 22, 2024

auto label is removed for flutter/engine/56706, due to - The status or check suite Mac mac_unopt has failed. Please fix the issues identified (or deflake) before re-applying this label.

@jonahwilliams jonahwilliams added the autosubmit Merge PR when tree becomes green via auto submit App label Nov 22, 2024
@auto-submit auto-submit bot removed the autosubmit Merge PR when tree becomes green via auto submit App label Nov 22, 2024
Copy link
Contributor

auto-submit bot commented Nov 22, 2024

auto label is removed for flutter/engine/56706, due to - The status or check suite Linux mac_android_aot_engine has failed. Please fix the issues identified (or deflake) before re-applying this label.

@zanderso zanderso added the autosubmit Merge PR when tree becomes green via auto submit App label Nov 22, 2024
@auto-submit auto-submit bot merged commit ece2613 into flutter:main Nov 22, 2024
37 checks passed
engine-flutter-autoroll added a commit to engine-flutter-autoroll/flutter that referenced this pull request Nov 23, 2024
engine-flutter-autoroll added a commit to engine-flutter-autoroll/flutter that referenced this pull request Nov 23, 2024
engine-flutter-autoroll added a commit to engine-flutter-autoroll/flutter that referenced this pull request Nov 23, 2024
github-merge-queue bot pushed a commit to flutter/flutter that referenced this pull request Nov 23, 2024
…159364)

flutter/engine@6f941c9...f776c3a

2024-11-22 skia-flutter-autoroll@skia.org Roll Skia from e7caf38140ce to
c3d9596a93f8 (2 revisions) (flutter/engine#56765)
2024-11-22 98614782+auto-submit[bot]@users.noreply.github.com Reverts
"[engine] more consistently flush dart event loop, run vsync callback
immediately (#56738)" (flutter/engine#56767)
2024-11-22 skia-flutter-autoroll@skia.org Roll Dart SDK from
8b65a7a628e2 to eb01a0430f72 (2 revisions) (flutter/engine#56764)
2024-11-22 jonahwilliams@google.com [Impeller] delete Impeller sim opt
out. (flutter/engine#56706)
2024-11-22 jason-simmons@users.noreply.github.com [Impeller] Ensure that
SnapshotControllerImpeller has a rendering context before creating the
snapshot (flutter/engine#56743)
2024-11-22 flar@google.com [DisplayList] migrate DlColorSource objects
to Impeller geometry (flutter/engine#56735)
2024-11-22 chinmaygarde@google.com [Impeller] libImpeller: Tinker on the
README. (flutter/engine#56761)
2024-11-22 jonahwilliams@google.com [Impeller] dont create temp vec for
discard. (flutter/engine#56759)
2024-11-22 skia-flutter-autoroll@skia.org Roll Fuchsia Linux SDK from
zhFzwYCH-N_wasTnM... to D5CBHuB2c-v3Zai-c... (flutter/engine#56757)
2024-11-22 skia-flutter-autoroll@skia.org Roll Dart SDK from
141291fd570d to 8b65a7a628e2 (1 revision) (flutter/engine#56755)
2024-11-22 jonahwilliams@google.com [Impeller] cache and reuse openGL
framebuffer attachments. (flutter/engine#56746)
2024-11-22 skia-flutter-autoroll@skia.org Roll Skia from 700e685861c8 to
e7caf38140ce (25 revisions) (flutter/engine#56756)
2024-11-22 skia-flutter-autoroll@skia.org Roll Dart SDK from
c1106f7e4cde to 141291fd570d (1 revision) (flutter/engine#56748)
2024-11-22 jonahwilliams@google.com [engine] more consistently flush
dart event loop, run vsync callback immediately (flutter/engine#56738)
2024-11-22 chris@bracken.jp Extract backend-specific code in
ShellTestPlatformView (flutter/engine#56722)
2024-11-22 chris@bracken.jp Eliminate
ShellTestPlatformView::BackendType::kDefaultBackendType
(flutter/engine#56744)
2024-11-22 skia-flutter-autoroll@skia.org Roll Skia from 2614590b4f32 to
700e685861c8 (1 revision) (flutter/engine#56725)
2024-11-22 skia-flutter-autoroll@skia.org Roll Dart SDK from
b36e4d731d67 to c1106f7e4cde (12 revisions) (flutter/engine#56742)
2024-11-22 chinmaygarde@google.com [Impeller] libImpeller: A C++ wrapper
to the Impeller API. (flutter/engine#56682)
2024-11-21 chinmaygarde@google.com [Impeller] Run simulator tests with
Impeller enabled. (flutter/engine#56740)

Also rolling transitive DEPS:
  fuchsia/sdk/core/linux-amd64 from zhFzwYCH-N_w to D5CBHuB2c-v3

If this roll has caused a breakage, revert this CL and stop the roller
using the controls here:
https://autoroll.skia.org/r/flutter-engine-flutter-autoroll
Please CC aaclarke@google.com,zra@google.com on the revert to ensure
that a human
is aware of the problem.

To file a bug in Flutter:
https://github.com/flutter/flutter/issues/new/choose

To report a problem with the AutoRoller itself, please file a bug:
https://issues.skia.org/issues/new?component=1389291&template=1850622

Documentation for the AutoRoller is here:
https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md
nick9822 pushed a commit to nick9822/flutter that referenced this pull request Dec 18, 2024
…#56740)

The Info.plist override was missed earlier.

The main changes to the tests are due to the UI thread merge with the platform thread. The amendment to the "spawn" API are due to the fact that the assertions checked for the presence of GrDirectContext which will never exist with Impeller.

Unblocks flutter/engine#56706
nick9822 pushed a commit to nick9822/flutter that referenced this pull request Dec 18, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
autosubmit Merge PR when tree becomes green via auto submit App platform-ios
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants