diff --git a/DEPS b/DEPS index 583daa4f7137c..46fff7bec9cb7 100644 --- a/DEPS +++ b/DEPS @@ -136,7 +136,7 @@ allowed_hosts = [ ] deps = { - 'src': 'https://github.com/flutter/buildroot.git' + '@' + 'a0fb98af7b6f50f17b47ab7968f3f5664d0d6316', + 'src': 'https://github.com/flutter/buildroot.git' + '@' + '3a27de1c5bb0f50be7d3efe3e00de4f6068c9f30', # Fuchsia compatibility # @@ -517,8 +517,8 @@ deps = { 'src/buildtools/{host_os}-x64/clang': { 'packages': [ { - 'package': 'fuchsia/clang/${{platform}}', - 'version': 'git_revision:de39621f0f03f20633bdfa50bde97a3908bf6e98' + 'package': 'fuchsia/third_party/clang/${{platform}}', + 'version': 'git_revision:7e9747b50bcb1be28d4a3236571e8050835497a6' } ], 'condition': 'host_os == "mac" or host_os == "linux"', diff --git a/ci/format.sh b/ci/format.sh index 254d38fbc43a1..979cf684f2b0a 100755 --- a/ci/format.sh +++ b/ci/format.sh @@ -42,7 +42,7 @@ fi; BASE_SHA="$(git fetch $UPSTREAM master > /dev/null 2>&1 && \ (git merge-base --fork-point FETCH_HEAD HEAD || git merge-base FETCH_HEAD HEAD))" -CLANG_FILES_TO_CHECK="$(git diff $DIFF_OPTS $BASE_SHA -- $CLANG_FILETYPES)" +CLANG_FILES_TO_CHECK="$(git ls-files $CLANG_FILETYPES)" FAILED_CHECKS=0 for f in $CLANG_FILES_TO_CHECK; do set +e diff --git a/flow/layers/performance_overlay_layer_unittests.cc b/flow/layers/performance_overlay_layer_unittests.cc index cf0cd68853e59..3fcb2e04e835b 100644 --- a/flow/layers/performance_overlay_layer_unittests.cc +++ b/flow/layers/performance_overlay_layer_unittests.cc @@ -88,6 +88,8 @@ static void TestPerformanceOverlayLayerGold(int refresh_rate) { << "Please either set --golden-dir, or make sure that the unit test is " << "run from the right directory (e.g., flutter/engine/src)."; + // TODO(https://github.com/flutter/flutter/issues/53784): enable this on all + // platforms. #if !defined(OS_LINUX) GTEST_SKIP() << "Skipping golden tests on non-Linux OSes"; #endif // OS_LINUX diff --git a/shell/common/shell.cc b/shell/common/shell.cc index 9125f8881b272..c09da8e4287c0 100644 --- a/shell/common/shell.cc +++ b/shell/common/shell.cc @@ -606,7 +606,7 @@ void Shell::OnPlatformViewCreated(std::unique_ptr surface) { // a synchronous fashion. fml::AutoResetWaitableEvent latch; auto raster_task = - fml::MakeCopyable([& waiting_for_first_frame = waiting_for_first_frame_, + fml::MakeCopyable([&waiting_for_first_frame = waiting_for_first_frame_, rasterizer = rasterizer_->GetWeakPtr(), // surface = std::move(surface), // &latch]() mutable { @@ -955,7 +955,7 @@ void Shell::OnAnimatorDraw(fml::RefPtr> pipeline) { FML_DCHECK(is_setup_); task_runners_.GetRasterTaskRunner()->PostTask( - [& waiting_for_first_frame = waiting_for_first_frame_, + [&waiting_for_first_frame = waiting_for_first_frame_, &waiting_for_first_frame_condition = waiting_for_first_frame_condition_, rasterizer = rasterizer_->GetWeakPtr(), pipeline = std::move(pipeline)]() { @@ -1447,7 +1447,7 @@ fml::Status Shell::WaitForFirstFrame(fml::TimeDelta timeout) { std::unique_lock lock(waiting_for_first_frame_mutex_); bool success = waiting_for_first_frame_condition_.wait_for( lock, std::chrono::milliseconds(timeout.ToMilliseconds()), - [& waiting_for_first_frame = waiting_for_first_frame_] { + [&waiting_for_first_frame = waiting_for_first_frame_] { return !waiting_for_first_frame.load(); }); if (success) { diff --git a/shell/platform/darwin/ios/framework/Source/FlutterEngine.mm b/shell/platform/darwin/ios/framework/Source/FlutterEngine.mm index f5fdebdf7eb35..bfb4a2d2ff8cd 100644 --- a/shell/platform/darwin/ios/framework/Source/FlutterEngine.mm +++ b/shell/platform/darwin/ios/framework/Source/FlutterEngine.mm @@ -824,8 +824,8 @@ - (void)registerViewFactory:(NSObject*)factory withId:(NSString*)factoryId gestureRecognizersBlockingPolicy: (FlutterPlatformViewGestureRecognizersBlockingPolicy)gestureRecognizersBlockingPolicy { - [_flutterEngine platformViewsController] -> RegisterViewFactory(factory, factoryId, - gestureRecognizersBlockingPolicy); + [_flutterEngine platformViewsController]->RegisterViewFactory(factory, factoryId, + gestureRecognizersBlockingPolicy); } @end diff --git a/shell/platform/darwin/ios/framework/Source/FlutterViewController.mm b/shell/platform/darwin/ios/framework/Source/FlutterViewController.mm index d3613713b1641..e6906d8d07591 100644 --- a/shell/platform/darwin/ios/framework/Source/FlutterViewController.mm +++ b/shell/platform/darwin/ios/framework/Source/FlutterViewController.mm @@ -543,14 +543,14 @@ - (void)surfaceUpdated:(BOOL)appeared { // thread. if (appeared) { [self installFirstFrameCallback]; - [_engine.get() platformViewsController] -> SetFlutterView(_flutterView.get()); - [_engine.get() platformViewsController] -> SetFlutterViewController(self); - [_engine.get() platformView] -> NotifyCreated(); + [_engine.get() platformViewsController]->SetFlutterView(_flutterView.get()); + [_engine.get() platformViewsController]->SetFlutterViewController(self); + [_engine.get() platformView]->NotifyCreated(); } else { self.displayingFlutterUI = NO; - [_engine.get() platformView] -> NotifyDestroyed(); - [_engine.get() platformViewsController] -> SetFlutterView(nullptr); - [_engine.get() platformViewsController] -> SetFlutterViewController(nullptr); + [_engine.get() platformView]->NotifyDestroyed(); + [_engine.get() platformViewsController]->SetFlutterView(nullptr); + [_engine.get() platformViewsController]->SetFlutterViewController(nullptr); } } diff --git a/shell/platform/darwin/ios/framework/Source/accessibility_bridge.mm b/shell/platform/darwin/ios/framework/Source/accessibility_bridge.mm index b07a32989f18e..53f097e65b029 100644 --- a/shell/platform/darwin/ios/framework/Source/accessibility_bridge.mm +++ b/shell/platform/darwin/ios/framework/Source/accessibility_bridge.mm @@ -288,8 +288,8 @@ - (BOOL)onCustomAccessibilityAction:(FlutterCustomAccessibilityAction*)action { args.push_back(action_id >> 8); args.push_back(action_id >> 16); args.push_back(action_id >> 24); - [self bridge] -> DispatchSemanticsAction([self uid], flutter::SemanticsAction::kCustomAction, - std::move(args)); + [self bridge]->DispatchSemanticsAction([self uid], flutter::SemanticsAction::kCustomAction, + std::move(args)); return YES; } @@ -385,7 +385,7 @@ - (CGRect)globalRect { CGFloat scale = [[[self bridge]->view() window] screen].scale; auto result = CGRectMake(rect.x() / scale, rect.y() / scale, rect.width() / scale, rect.height() / scale); - return UIAccessibilityConvertFrameToScreenCoordinates(result, [self bridge] -> view()); + return UIAccessibilityConvertFrameToScreenCoordinates(result, [self bridge]->view()); } #pragma mark - UIAccessibilityElement protocol @@ -413,7 +413,7 @@ - (BOOL)accessibilityActivate { return NO; if (![self node].HasAction(flutter::SemanticsAction::kTap)) return NO; - [self bridge] -> DispatchSemanticsAction([self uid], flutter::SemanticsAction::kTap); + [self bridge]->DispatchSemanticsAction([self uid], flutter::SemanticsAction::kTap); return YES; } @@ -422,7 +422,7 @@ - (void)accessibilityIncrement { return; if ([self node].HasAction(flutter::SemanticsAction::kIncrease)) { [self node].value = [self node].increasedValue; - [self bridge] -> DispatchSemanticsAction([self uid], flutter::SemanticsAction::kIncrease); + [self bridge]->DispatchSemanticsAction([self uid], flutter::SemanticsAction::kIncrease); } } @@ -431,7 +431,7 @@ - (void)accessibilityDecrement { return; if ([self node].HasAction(flutter::SemanticsAction::kDecrease)) { [self node].value = [self node].decreasedValue; - [self bridge] -> DispatchSemanticsAction([self uid], flutter::SemanticsAction::kDecrease); + [self bridge]->DispatchSemanticsAction([self uid], flutter::SemanticsAction::kDecrease); } } @@ -441,7 +441,7 @@ - (BOOL)accessibilityScroll:(UIAccessibilityScrollDirection)direction { flutter::SemanticsAction action = GetSemanticsActionForScrollDirection(direction); if (![self node].HasAction(action)) return NO; - [self bridge] -> DispatchSemanticsAction([self uid], action); + [self bridge]->DispatchSemanticsAction([self uid], action); return YES; } @@ -450,7 +450,7 @@ - (BOOL)accessibilityPerformEscape { return NO; if (![self node].HasAction(flutter::SemanticsAction::kDismiss)) return NO; - [self bridge] -> DispatchSemanticsAction([self uid], flutter::SemanticsAction::kDismiss); + [self bridge]->DispatchSemanticsAction([self uid], flutter::SemanticsAction::kDismiss); return YES; } @@ -460,11 +460,11 @@ - (void)accessibilityElementDidBecomeFocused { if (![self isAccessibilityBridgeAlive]) return; if ([self node].HasFlag(flutter::SemanticsFlags::kIsHidden)) { - [self bridge] -> DispatchSemanticsAction([self uid], flutter::SemanticsAction::kShowOnScreen); + [self bridge]->DispatchSemanticsAction([self uid], flutter::SemanticsAction::kShowOnScreen); } if ([self node].HasAction(flutter::SemanticsAction::kDidGainAccessibilityFocus)) { - [self bridge] -> DispatchSemanticsAction([self uid], - flutter::SemanticsAction::kDidGainAccessibilityFocus); + [self bridge]->DispatchSemanticsAction([self uid], + flutter::SemanticsAction::kDidGainAccessibilityFocus); } } @@ -472,8 +472,8 @@ - (void)accessibilityElementDidLoseFocus { if (![self isAccessibilityBridgeAlive]) return; if ([self node].HasAction(flutter::SemanticsAction::kDidLoseAccessibilityFocus)) { - [self bridge] -> DispatchSemanticsAction([self uid], - flutter::SemanticsAction::kDidLoseAccessibilityFocus); + [self bridge]->DispatchSemanticsAction([self uid], + flutter::SemanticsAction::kDidLoseAccessibilityFocus); } } diff --git a/shell/platform/darwin/ios/framework/Source/accessibility_text_entry.mm b/shell/platform/darwin/ios/framework/Source/accessibility_text_entry.mm index 9fb441413b665..1c299418928d2 100644 --- a/shell/platform/darwin/ios/framework/Source/accessibility_text_entry.mm +++ b/shell/platform/darwin/ios/framework/Source/accessibility_text_entry.mm @@ -200,7 +200,7 @@ - (void)setSemanticsNode:(const flutter::SemanticsNode*)node { if ([self node].HasFlag(flutter::SemanticsFlags::kIsFocused)) { // The text input view must have a non-trivial size for the accessibility // system to send text editing events. - [self bridge] -> textInputView().frame = CGRectMake(0.0, 0.0, 1.0, 1.0); + [self bridge]->textInputView().frame = CGRectMake(0.0, 0.0, 1.0, 1.0); } } @@ -216,7 +216,7 @@ - (void)setSemanticsNode:(const flutter::SemanticsNode*)node { */ - (UIView*)textInputSurrogate { if ([self node].HasFlag(flutter::SemanticsFlags::kIsFocused)) { - return [self bridge] -> textInputView(); + return [self bridge]->textInputView(); } else { return _inactive_text_input; } diff --git a/shell/platform/darwin/ios/platform_view_ios.mm b/shell/platform/darwin/ios/platform_view_ios.mm index 988ae8b3849c0..772d5775bab6f 100644 --- a/shell/platform/darwin/ios/platform_view_ios.mm +++ b/shell/platform/darwin/ios/platform_view_ios.mm @@ -185,7 +185,7 @@ new AccessibilityBridge(static_cast(owner_controller_.get().view), if (!owner_controller_) { return; } - [owner_controller_.get() platformViewsController] -> Reset(); + [owner_controller_.get() platformViewsController]->Reset(); } fml::scoped_nsprotocol PlatformViewIOS::GetTextInputPlugin() const { diff --git a/shell/platform/embedder/tests/embedder_unittests.cc b/shell/platform/embedder/tests/embedder_unittests.cc index 291d8cd266163..78286fcf54152 100644 --- a/shell/platform/embedder/tests/embedder_unittests.cc +++ b/shell/platform/embedder/tests/embedder_unittests.cc @@ -1430,7 +1430,7 @@ TEST_F(EmbedderTest, }); context.GetCompositor().SetPlatformViewRendererCallback( - [&](const FlutterLayer& layer, GrContext * + [&](const FlutterLayer& layer, GrContext* /* don't use because software compositor */) -> sk_sp { auto surface = CreateRenderSurface( layer, nullptr /* null because software compositor */); @@ -3001,6 +3001,12 @@ TEST_F(EmbedderTest, VerifyB143464703WithSoftwareBackend) { auto renderered_scene = context.GetNextSceneImage(); latch.Wait(); + + // TODO(https://github.com/flutter/flutter/issues/53784): enable this on all + // platforms. +#if !defined(OS_LINUX) + GTEST_SKIP() << "Skipping golden tests on non-Linux OSes"; +#endif // OS_LINUX ASSERT_TRUE(ImageMatchesFixture("verifyb143464703_soft_noxform.png", renderered_scene)); } diff --git a/shell/platform/fuchsia/flutter/vsync_waiter.cc b/shell/platform/fuchsia/flutter/vsync_waiter.cc index 283a33e14a6ad..6d2be8d0a0384 100644 --- a/shell/platform/fuchsia/flutter/vsync_waiter.cc +++ b/shell/platform/fuchsia/flutter/vsync_waiter.cc @@ -141,7 +141,7 @@ void VsyncWaiter::AwaitVSync() { fml::TimeDelta delta = next_vsync_start_time - now; task_runners_.GetUITaskRunner()->PostDelayedTask( - [& weak_factory_ui = this->weak_factory_ui_] { + [&weak_factory_ui = this->weak_factory_ui_] { if (!weak_factory_ui) { FML_LOG(WARNING) << "WeakPtrFactory for VsyncWaiter is null, likely " "due to the VsyncWaiter being destroyed."; diff --git a/shell/platform/fuchsia/flutter/vulkan_surface.cc b/shell/platform/fuchsia/flutter/vulkan_surface.cc index abbbe5d945742..781f9ae211c24 100644 --- a/shell/platform/fuchsia/flutter/vulkan_surface.cc +++ b/shell/platform/fuchsia/flutter/vulkan_surface.cc @@ -73,7 +73,7 @@ bool CreateVulkanImage(vulkan::VulkanProvider& vulkan_provider, } out_vulkan_image->vk_image = { - vk_image, [& vulkan_provider = vulkan_provider](VkImage image) { + vk_image, [&vulkan_provider = vulkan_provider](VkImage image) { vulkan_provider.vk().DestroyImage(vulkan_provider.vk_device(), image, NULL); }}; @@ -263,8 +263,8 @@ bool VulkanSurface::AllocateDeviceMemory(sk_sp context, return false; } - vk_memory_ = {vk_memory, [& vulkan_provider = - vulkan_provider_](VkDeviceMemory memory) { + vk_memory_ = {vk_memory, + [&vulkan_provider = vulkan_provider_](VkDeviceMemory memory) { vulkan_provider.vk().FreeMemory(vulkan_provider.vk_device(), memory, NULL); }}; diff --git a/sky/tools/create_ios_framework.py b/sky/tools/create_ios_framework.py index bb74044b546e6..8c79921c589f5 100755 --- a/sky/tools/create_ios_framework.py +++ b/sky/tools/create_ios_framework.py @@ -10,6 +10,9 @@ import os +DSYMUTIL = os.path.join(os.path.dirname(__file__), '..', '..', '..', + 'buildtools', 'mac-x64', 'clang', 'bin', 'dsymutil') + def main(): parser = argparse.ArgumentParser(description='Creates Flutter.framework') @@ -33,27 +36,31 @@ def main(): simulator_dylib = os.path.join(simulator_framework, 'Flutter') if not os.path.isdir(arm64_framework): - print 'Cannot find iOS arm64 Framework at', arm64_framework + print('Cannot find iOS arm64 Framework at %s' % arm64_framework) return 1 if not os.path.isdir(armv7_framework): - print 'Cannot find iOS armv7 Framework at', armv7_framework + print('Cannot find iOS armv7 Framework at %s' % armv7_framework) return 1 if not os.path.isdir(simulator_framework): - print 'Cannot find iOS simulator Framework at', simulator_framework + print('Cannot find iOS simulator Framework at %s' % simulator_framework) return 1 if not os.path.isfile(arm64_dylib): - print 'Cannot find iOS arm64 dylib at', arm64_dylib + print('Cannot find iOS arm64 dylib at %s' % arm64_dylib) return 1 if not os.path.isfile(armv7_dylib): - print 'Cannot find iOS armv7 dylib at', armv7_dylib + print('Cannot find iOS armv7 dylib at %s' % armv7_dylib) return 1 if not os.path.isfile(simulator_dylib): - print 'Cannot find iOS simulator dylib at', simulator_dylib + print('Cannot find iOS simulator dylib at %s' % simulator_dylib) + return 1 + + if not os.path.isfile(DSYMUTIL): + print('Cannot find dsymutil at %s' % DSYMUTIL) return 1 shutil.rmtree(fat_framework, True) @@ -76,7 +83,7 @@ def main(): if args.dsym: dsym_out = os.path.splitext(fat_framework)[0] + '.dSYM' - subprocess.check_call(['dsymutil', '-o', dsym_out, linker_out]) + subprocess.check_call([DSYMUTIL, '-o', dsym_out, linker_out]) if args.strip: # copy unstripped diff --git a/testing/dart/canvas_test.dart b/testing/dart/canvas_test.dart index 85fbe373e5f3d..25d1ed04dc4d6 100644 --- a/testing/dart/canvas_test.dart +++ b/testing/dart/canvas_test.dart @@ -181,7 +181,7 @@ void main() { final bool areEqual = await fuzzyGoldenImageCompare(image, 'canvas_test_gradient.png'); expect(areEqual, true); - }); + }, skip: !Platform.isLinux); // https://github.com/flutter/flutter/issues/53784 test('Simple dithered gradient', () async { Paint.enableDithering = true; @@ -197,5 +197,5 @@ void main() { final bool areEqual = await fuzzyGoldenImageCompare(image, 'canvas_test_dithered_gradient.png'); expect(areEqual, true); - }); + }, skip: !Platform.isLinux); // https://github.com/flutter/flutter/issues/53784 } diff --git a/testing/symbols/verify_exported.dart b/testing/symbols/verify_exported.dart index 2b822d08fea79..2bd2d236d0e49 100644 --- a/testing/symbols/verify_exported.dart +++ b/testing/symbols/verify_exported.dart @@ -110,8 +110,93 @@ int _checkAndroid(String outPath, String nmPath, Iterable builds) { 'JNI_OnLoad': 'T', '_binary_icudtl_dat_size': 'A', '_binary_icudtl_dat_start': 'D', + // TODO(fxb/47943): Remove these once Clang lld does not expose them. + // arm + '__adddf3': 'T', + '__addsf3': 'T', + '__aeabi_cdcmpeq': 'T', + '__aeabi_cdcmple': 'T', + '__aeabi_cdrcmple': 'T', + '__aeabi_d2lz': 'T', + '__aeabi_d2uiz': 'T', + '__aeabi_d2ulz': 'T', + '__aeabi_dadd': 'T', + '__aeabi_dcmpeq': 'T', + '__aeabi_dcmpge': 'T', + '__aeabi_dcmpgt': 'T', + '__aeabi_dcmple': 'T', + '__aeabi_dcmplt': 'T', + '__aeabi_ddiv': 'T', + '__aeabi_dmul': 'T', + '__aeabi_drsub': 'T', + '__aeabi_dsub': 'T', + '__aeabi_f2d': 'T', + '__aeabi_fadd': 'T', + '__aeabi_frsub': 'T', + '__aeabi_fsub': 'T', + '__aeabi_i2d': 'T', + '__aeabi_i2f': 'T', + '__aeabi_l2d': 'T', + '__aeabi_l2f': 'T', + '__aeabi_lasr': 'T', + '__aeabi_ldivmod': 'T', + '__aeabi_llsl': 'T', + '__aeabi_llsr': 'T', + '__aeabi_ui2d': 'T', + '__aeabi_ui2f': 'T', + '__aeabi_uidiv': 'T', + '__aeabi_uidivmod': 'T', + '__aeabi_ul2d': 'T', + '__aeabi_ul2f': 'T', + '__aeabi_uldivmod': 'T', + '__ashldi3': 'T', + '__ashrdi3': 'T', + '__cmpdf2': 'T', + '__divdf3': 'T', + '__divdi3': 'T', + '__eqdf2': 'T', + '__extendsfdf2': 'T', + '__fixdfdi': 'T', + '__fixunsdfdi': 'T', + '__fixunsdfsi': 'T', + '__floatdidf': 'T', + '__floatdisf': 'T', + '__floatsidf': 'T', + '__floatsisf': 'T', + '__floatundidf': 'T', + '__floatundisf': 'T', + '__floatunsidf': 'T', + '__floatunsisf': 'T', + '__gedf2': 'T', + '__gnu_ldivmod_helper': 'T', + '__gnu_uldivmod_helper': 'T', + '__gtdf2': 'T', + '__ledf2': 'T', + '__lshrdi3': 'T', + '__ltdf2': 'T', + '__muldf3': 'T', + '__nedf2': 'T', + '__subdf3': 'T', + '__subsf3': 'T', + '__udivdi3': 'T', + '__udivsi3': 'T', + // arm64 + '__clz_tab': 'R', + '__udivti3': 'T', + // arm64 && x64 + '__emutls_get_address': 'T', + '__emutls_register_common': 'T', + // jit x86 + '__moddi3': 'T', + '__umoddi3': 'T', }; - if (!const MapEquality().equals(entryMap, expectedSymbols)) { + final Map badSymbols = {}; + for (final String key in entryMap.keys) { + if (entryMap[key] != expectedSymbols[key]) { + badSymbols[key] = entryMap[key]; + } + } + if (badSymbols.isNotEmpty) { print('ERROR: $libFlutter exports the wrong symbols'); print(' Expected $expectedSymbols'); print(' Library has $entryMap.'); diff --git a/third_party/txt/src/minikin/HbFontCache.cpp b/third_party/txt/src/minikin/HbFontCache.cpp index 5fc2f59633a18..d60fcc73730e0 100644 --- a/third_party/txt/src/minikin/HbFontCache.cpp +++ b/third_party/txt/src/minikin/HbFontCache.cpp @@ -105,7 +105,7 @@ hb_font_t* getHbFontLocked(const MinikinFont* minikinFont) { font = hb_font_create_sub_font(parent_font); std::vector variations; for (const FontVariation& variation : minikinFont->GetAxes()) { - variations.push_back({variation.axisTag, variation.value}); + variations.push_back({variation.axisTag, variation.value}); } hb_font_set_variations(font, variations.data(), variations.size()); hb_font_destroy(parent_font);