From 22084db7a499b859b603e7e38acd035ca9a436aa Mon Sep 17 00:00:00 2001 From: Michael Goderbauer Date: Mon, 23 Jan 2023 12:43:22 -0800 Subject: [PATCH 01/15] Remove unnecessary null checks in doc snippet (#39071) --- lib/ui/hash_codes.dart | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/lib/ui/hash_codes.dart b/lib/ui/hash_codes.dart index ea0f5b9162ba7..b1a332395bf33 100644 --- a/lib/ui/hash_codes.dart +++ b/lib/ui/hash_codes.dart @@ -8,6 +8,7 @@ part of dart.ui; // int foo = 0; // int bar = 0; // List quux = []; +// List? thud; // int baz = 0; class _HashEnd { const _HashEnd(); } @@ -59,11 +60,11 @@ class _Jenkins { /// int get hashCode => Object.hash(foo, bar, Object.hashAll(quux), baz); /// ``` /// -/// If `quux` in this example was nullable, then it would need special handling, +/// If a parameter is nullable, then it needs special handling, /// because [Object.hashAll]'s argument is not nullable: /// /// ```dart -/// int get hashCode => Object.hash(foo, bar, quux == null ? null : Object.hashAll(quux), baz); +/// int get hashCode => Object.hash(foo, bar, thud == null ? null : Object.hashAll(thud), baz); /// ``` @Deprecated( 'Use Object.hash() instead. ' From f9189063668bbd028779d39924278a44d01b678c Mon Sep 17 00:00:00 2001 From: skia-flutter-autoroll Date: Mon, 23 Jan 2023 15:49:29 -0500 Subject: [PATCH 02/15] Roll Skia from f6a5c806294d to 1ccf2093cfa9 (2 revisions) (#39028) https://skia.googlesource.com/skia.git/+log/f6a5c806294d..1ccf2093cfa9 2023-01-20 skia-autoroll@skia-public.iam.gserviceaccount.com Roll Skia Infra from d27950c1863f to 920ae225a641 (7 revisions) 2023-01-20 skia-autoroll@skia-public.iam.gserviceaccount.com Roll Dawn from 7e02157df528 to 785ccde2f588 (10 revisions) If this roll has caused a breakage, revert this CL and stop the roller using the controls here: https://autoroll.skia.org/r/skia-flutter-autoroll Please CC fmalita@google.com,kaushikiska@google.com on the revert to ensure that a human is aware of the problem. To file a bug in Skia: https://bugs.chromium.org/p/skia/issues/entry 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://bugs.chromium.org/p/skia/issues/entry?template=Autoroller+Bug Documentation for the AutoRoller is here: https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md --- DEPS | 2 +- ci/licenses_golden/licenses_skia | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/DEPS b/DEPS index 1aa8cd3e9dd62..e52de03da2cfd 100644 --- a/DEPS +++ b/DEPS @@ -18,7 +18,7 @@ vars = { 'llvm_git': 'https://llvm.googlesource.com', # OCMock is for testing only so there is no google clone 'ocmock_git': 'https://github.com/erikdoe/ocmock.git', - 'skia_revision': 'f6a5c806294dbc1088955645accc3c2f83d4f04f', + 'skia_revision': '1ccf2093cfa9cae96363e66d524eca8168c050cc', # WARNING: DO NOT EDIT canvaskit_cipd_instance MANUALLY # See `lib/web_ui/README.md` for how to roll CanvasKit to a new version. diff --git a/ci/licenses_golden/licenses_skia b/ci/licenses_golden/licenses_skia index 1a9a16e7eabe1..fb453993c20ad 100644 --- a/ci/licenses_golden/licenses_skia +++ b/ci/licenses_golden/licenses_skia @@ -1,4 +1,4 @@ -Signature: 384e76e1196df5c6e3aefc7b1f7732e7 +Signature: b56b0ab87d49992124c52f8d96ad6c0a ==================================================================================================== LIBRARY: etc1 From f02a70492707f784bf931d4f195da567a487f2f7 Mon Sep 17 00:00:00 2001 From: skia-flutter-autoroll Date: Mon, 23 Jan 2023 16:11:27 -0500 Subject: [PATCH 03/15] Roll Fuchsia Mac SDK from rQtxqj3gePeR-nTLv... to HxpwvvbQdk54L6_8q... (#39075) If this roll has caused a breakage, revert this CL and stop the roller using the controls here: https://autoroll.skia.org/r/fuchsia-mac-sdk-flutter-engine Please CC kaushikiska@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://bugs.chromium.org/p/skia/issues/entry?template=Autoroller+Bug Documentation for the AutoRoller is here: https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md --- DEPS | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/DEPS b/DEPS index e52de03da2cfd..75a39c5caea69 100644 --- a/DEPS +++ b/DEPS @@ -816,7 +816,7 @@ deps = { 'packages': [ { 'package': 'fuchsia/sdk/core/mac-amd64', - 'version': 'rQtxqj3gePeR-nTLvk-PHjo2xiHjHZUdh-bb4eZOQGAC' + 'version': 'HxpwvvbQdk54L6_8qWhghg4Y41JUdLqdf3GcEiFgVnoC' } ], 'condition': 'host_os == "mac" and not download_fuchsia_sdk', From 42eec6280719394db1b30bf3284b3fc7780588cb Mon Sep 17 00:00:00 2001 From: Jonah Williams Date: Mon, 23 Jan 2023 14:24:33 -0800 Subject: [PATCH 04/15] [Impeller] uniform offsets account for size (#39077) * uniform offsets account for size * re-arrange fixtures --- impeller/entity/contents/runtime_effect_contents.cc | 6 ++++-- impeller/entity/entity_unittests.cc | 4 ++-- impeller/fixtures/runtime_stage_example.frag | 4 ++-- 3 files changed, 8 insertions(+), 6 deletions(-) diff --git a/impeller/entity/contents/runtime_effect_contents.cc b/impeller/entity/contents/runtime_effect_contents.cc index 3ca9356d5cc05..68c95acefe8d5 100644 --- a/impeller/entity/contents/runtime_effect_contents.cc +++ b/impeller/entity/contents/runtime_effect_contents.cc @@ -152,6 +152,7 @@ bool RuntimeEffectContents::Render(const ContentContext& renderer, /// size_t buffer_index = 0; + size_t buffer_offset = 0; size_t sampler_index = 0; for (auto uniform : runtime_stage_->GetUniforms()) { // TODO(113715): Populate this metadata once GLES is able to handle @@ -180,8 +181,8 @@ bool RuntimeEffectContents::Render(const ContentContext& renderer, size_t alignment = std::max(uniform.bit_width / 8, DefaultUniformAlignment()); auto buffer_view = pass.GetTransientsBuffer().Emplace( - uniform_data_->data() + uniform.location * sizeof(float), - uniform.GetSize(), alignment); + uniform_data_->data() + buffer_offset, uniform.GetSize(), + alignment); ShaderUniformSlot uniform_slot; uniform_slot.name = uniform.name.c_str(); @@ -189,6 +190,7 @@ bool RuntimeEffectContents::Render(const ContentContext& renderer, cmd.BindResource(ShaderStage::kFragment, uniform_slot, metadata, buffer_view); buffer_index++; + buffer_offset += uniform.GetSize(); break; } case kBoolean: diff --git a/impeller/entity/entity_unittests.cc b/impeller/entity/entity_unittests.cc index ae0037c595c07..c82eb768e8df3 100644 --- a/impeller/entity/entity_unittests.cc +++ b/impeller/entity/entity_unittests.cc @@ -2097,11 +2097,11 @@ TEST_P(EntityTest, RuntimeEffect) { contents->SetRuntimeStage(runtime_stage); struct FragUniforms { - Scalar iTime; Vector2 iResolution; + Scalar iTime; } frag_uniforms = { - .iTime = static_cast(GetSecondsElapsed()), .iResolution = Vector2(GetWindowSize().width, GetWindowSize().height), + .iTime = static_cast(GetSecondsElapsed()), }; auto uniform_data = std::make_shared>(); uniform_data->resize(sizeof(FragUniforms)); diff --git a/impeller/fixtures/runtime_stage_example.frag b/impeller/fixtures/runtime_stage_example.frag index 81ee6cd820518..3448174dbc98a 100644 --- a/impeller/fixtures/runtime_stage_example.frag +++ b/impeller/fixtures/runtime_stage_example.frag @@ -2,8 +2,8 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -layout(location = 0) uniform float iTime; -layout(location = 1) uniform vec2 iResolution; +layout(location = 0) uniform vec2 iResolution; +layout(location = 1) uniform float iTime; layout(location = 0) out vec4 fragColor; From b6a348a82a8be3b6e2f3231399c296f56e7bda59 Mon Sep 17 00:00:00 2001 From: Justin McCandless Date: Mon, 23 Jan 2023 16:11:13 -0800 Subject: [PATCH 05/15] Ability to disable browser context menu (#38682) Adds platform channel methods that disable/enable the context menu on web. --- lib/web_ui/lib/src/engine/embedder.dart | 14 ++++ .../lib/src/engine/platform_dispatcher.dart | 16 ++++- .../custom_element_embedding_strategy.dart | 6 ++ .../embedding_strategy.dart | 71 ++++++++++++++++++- .../full_page_embedding_strategy.dart | 6 ++ .../test/engine/platform_dispatcher_test.dart | 40 +++++++++++ ...ustom_element_embedding_strategy_test.dart | 56 +++++++++++++++ .../full_page_embedding_strategy_test.dart | 52 ++++++++++++++ 8 files changed, 259 insertions(+), 2 deletions(-) diff --git a/lib/web_ui/lib/src/engine/embedder.dart b/lib/web_ui/lib/src/engine/embedder.dart index db28eac7672c9..c2d507de65044 100644 --- a/lib/web_ui/lib/src/engine/embedder.dart +++ b/lib/web_ui/lib/src/engine/embedder.dart @@ -356,6 +356,20 @@ class FlutterViewEmbedder { assert(element.parentNode == _resourcesHost); element.remove(); } + + /// Disables the browser's context menu for this part of the DOM. + /// + /// By default, when a Flutter web app starts, the context menu is enabled. + /// + /// Can be re-enabled by calling [enableContextMenu]. + void disableContextMenu() => _embeddingStrategy.disableContextMenu(); + + /// Enables the browser's context menu for this part of the DOM. + /// + /// By default, when a Flutter web app starts, the context menu is already + /// enabled. Typically, this method would be used after calling + /// [disableContextMenu] to first disable it. + void enableContextMenu() => _embeddingStrategy.enableContextMenu(); } /// The embedder singleton. diff --git a/lib/web_ui/lib/src/engine/platform_dispatcher.dart b/lib/web_ui/lib/src/engine/platform_dispatcher.dart index b34226fd4ee3e..06859c6684d2c 100644 --- a/lib/web_ui/lib/src/engine/platform_dispatcher.dart +++ b/lib/web_ui/lib/src/engine/platform_dispatcher.dart @@ -33,7 +33,6 @@ ui.VoidCallback? scheduleFrameCallback; typedef HighContrastListener = void Function(bool enabled); typedef _KeyDataResponseCallback = void Function(bool handled); - /// Determines if high contrast is enabled using media query 'forced-colors: active' for Windows class HighContrastSupport { static HighContrastSupport instance = HighContrastSupport(); @@ -531,6 +530,21 @@ class EnginePlatformDispatcher extends ui.PlatformDispatcher { textEditing.channel.handleTextInput(data, callback); return; + case 'flutter/contextmenu': + const MethodCodec codec = JSONMethodCodec(); + final MethodCall decoded = codec.decodeMethodCall(data); + switch (decoded.method) { + case 'enableContextMenu': + flutterViewEmbedder.enableContextMenu(); + replyToPlatformMessage(callback, codec.encodeSuccessEnvelope(true)); + return; + case 'disableContextMenu': + flutterViewEmbedder.disableContextMenu(); + replyToPlatformMessage(callback, codec.encodeSuccessEnvelope(true)); + return; + } + return; + case 'flutter/mousecursor': const MethodCodec codec = StandardMethodCodec(); final MethodCall decoded = codec.decodeMethodCall(data); diff --git a/lib/web_ui/lib/src/engine/view_embedder/embedding_strategy/custom_element_embedding_strategy.dart b/lib/web_ui/lib/src/engine/view_embedder/embedding_strategy/custom_element_embedding_strategy.dart index ecf92bb3d8956..572bdb8ce33b2 100644 --- a/lib/web_ui/lib/src/engine/view_embedder/embedding_strategy/custom_element_embedding_strategy.dart +++ b/lib/web_ui/lib/src/engine/view_embedder/embedding_strategy/custom_element_embedding_strategy.dart @@ -51,6 +51,12 @@ class CustomElementEmbeddingStrategy extends EmbeddingStrategy { registerElementForCleanup(resourceHost); } + @override + void disableContextMenu() => disableContextMenuOn(_hostElement); + + @override + void enableContextMenu() => enableContextMenuOn(_hostElement); + void _setHostAttribute(String name, String value) { _hostElement.setAttribute(name, value); } diff --git a/lib/web_ui/lib/src/engine/view_embedder/embedding_strategy/embedding_strategy.dart b/lib/web_ui/lib/src/engine/view_embedder/embedding_strategy/embedding_strategy.dart index bb1c9361ae2a8..b811153a4ba97 100644 --- a/lib/web_ui/lib/src/engine/view_embedder/embedding_strategy/embedding_strategy.dart +++ b/lib/web_ui/lib/src/engine/view_embedder/embedding_strategy/embedding_strategy.dart @@ -5,6 +5,7 @@ import 'package:meta/meta.dart'; import 'package:ui/src/engine/dom.dart'; +import 'package:ui/src/engine/safe_browser_api.dart'; import 'package:ui/src/engine/view_embedder/hot_restart_cache_handler.dart'; import 'custom_element_embedding_strategy.dart'; @@ -20,7 +21,7 @@ import 'full_page_embedding_strategy.dart'; /// * [CustomElementEmbeddingStrategy] - Flutter is rendered inside a custom host /// element, provided by the web app programmer through the engine /// initialization. -abstract class EmbeddingStrategy { +abstract class EmbeddingStrategy with _ContextMenu { EmbeddingStrategy() { // Initialize code to handle hot-restart (debug only). assert(() { @@ -56,3 +57,71 @@ abstract class EmbeddingStrategy { _hotRestartCache?.registerElement(element); } } + +/// Provides functionality to disable and enable the browser's context menu. +mixin _ContextMenu { + /// False when the context menu has been disabled, otherwise true. + bool _contextMenuEnabled = true; + + /// Listener for contextmenu events that prevents the browser's context menu + /// from being shown. + final DomEventListener _disablingContextMenuListener = allowInterop((DomEvent event) { + event.preventDefault(); + }); + + /// Disables the browser's context menu for this part of the DOM. + /// + /// By default, when a Flutter web app starts, the context menu is enabled. + /// + /// Can be re-enabled by calling [enableContextMenu]. + /// + /// See also: + /// + /// * [disableContextMenuOn], which is like this but takes the relevant + /// [DomElement] as a parameter. + void disableContextMenu(); + + /// Disables the browser's context menu for the given [DomElement]. + /// + /// See also: + /// + /// * [disableContextMenu], which is like this but is not passed a + /// [DomElement]. + @protected + void disableContextMenuOn(DomEventTarget element) { + if (!_contextMenuEnabled) { + return; + } + + element.addEventListener('contextmenu', _disablingContextMenuListener); + _contextMenuEnabled = false; + } + + /// Enables the browser's context menu for this part of the DOM. + /// + /// By default, when a Flutter web app starts, the context menu is already + /// enabled. Typically, this method would be used after calling + /// [disableContextMenu] to first disable it. + /// + /// See also: + /// + /// * [enableContextMenuOn], which is like this but takes the relevant + /// [DomElement] as a parameter. + void enableContextMenu(); + + /// Enables the browser's context menu for the given [DomElement]. + /// + /// See also: + /// + /// * [enableContextMenu], which is like this but is not passed a + /// [DomElement]. + @protected + void enableContextMenuOn(DomEventTarget element) { + if (_contextMenuEnabled) { + return; + } + + element.removeEventListener('contextmenu', _disablingContextMenuListener); + _contextMenuEnabled = true; + } +} diff --git a/lib/web_ui/lib/src/engine/view_embedder/embedding_strategy/full_page_embedding_strategy.dart b/lib/web_ui/lib/src/engine/view_embedder/embedding_strategy/full_page_embedding_strategy.dart index 009b6aef4b8a0..27dd8052c5b46 100644 --- a/lib/web_ui/lib/src/engine/view_embedder/embedding_strategy/full_page_embedding_strategy.dart +++ b/lib/web_ui/lib/src/engine/view_embedder/embedding_strategy/full_page_embedding_strategy.dart @@ -48,6 +48,12 @@ class FullPageEmbeddingStrategy extends EmbeddingStrategy { registerElementForCleanup(resourceHost); } + @override + void disableContextMenu() => disableContextMenuOn(domWindow); + + @override + void enableContextMenu() => enableContextMenuOn(domWindow); + void _setHostAttribute(String name, String value) { domDocument.body!.setAttribute(name, value); } diff --git a/lib/web_ui/test/engine/platform_dispatcher_test.dart b/lib/web_ui/test/engine/platform_dispatcher_test.dart index e197db5c8ba4e..dd6b928a30953 100644 --- a/lib/web_ui/test/engine/platform_dispatcher_test.dart +++ b/lib/web_ui/test/engine/platform_dispatcher_test.dart @@ -17,6 +17,8 @@ void main() { } void testMain() { + ensureFlutterViewEmbedderInitialized(); + group('PlatformDispatcher', () { test('high contrast in accessibilityFeatures has the correct value', () { final MockHighContrastSupport mockHighContrast = @@ -72,6 +74,44 @@ void testMain() { ); }); + test('responds to flutter/contextmenu enable', () async { + const MethodCodec codec = JSONMethodCodec(); + final Completer completer = Completer(); + ui.PlatformDispatcher.instance.sendPlatformMessage( + 'flutter/contextmenu', + codec.encodeMethodCall(const MethodCall( + 'enableContextMenu', + )), + completer.complete, + ); + + final ByteData? response = await completer.future; + expect(response, isNotNull); + expect( + codec.decodeEnvelope(response!), + true, + ); + }); + + test('responds to flutter/contextmenu disable', () async { + const MethodCodec codec = JSONMethodCodec(); + final Completer completer = Completer(); + ui.PlatformDispatcher.instance.sendPlatformMessage( + 'flutter/contextmenu', + codec.encodeMethodCall(const MethodCall( + 'disableContextMenu', + )), + completer.complete, + ); + + final ByteData? response = await completer.future; + expect(response, isNotNull); + expect( + codec.decodeEnvelope(response!), + true, + ); + }); + test('can find text scale factor', () async { const double deltaTolerance = 1e-5; diff --git a/lib/web_ui/test/engine/view_embedder/embedding_strategy/custom_element_embedding_strategy_test.dart b/lib/web_ui/test/engine/view_embedder/embedding_strategy/custom_element_embedding_strategy_test.dart index 75af6a0359e70..62dc4de5b09c4 100644 --- a/lib/web_ui/test/engine/view_embedder/embedding_strategy/custom_element_embedding_strategy_test.dart +++ b/lib/web_ui/test/engine/view_embedder/embedding_strategy/custom_element_embedding_strategy_test.dart @@ -121,4 +121,60 @@ void doTests() { reason: 'Should be injected `nextTo` the passed element.'); }); }); + + group('context menu', () { + setUp(() { + target = createDomElement('this-is-the-target'); + domDocument.body!.append(target); + strategy = CustomElementEmbeddingStrategy(target); + strategy.initialize(); + }); + + tearDown(() { + target.remove(); + }); + + test('disableContextMenu and enableContextMenu can toggle the context menu', () { + // When the app starts, contextmenu events are not prevented. + DomEvent event = createDomEvent('Event', 'contextmenu'); + expect(event.defaultPrevented, isFalse); + target.dispatchEvent(event); + expect(event.defaultPrevented, isFalse); + + // Disabling the context menu causes contextmenu events to be prevented. + strategy.disableContextMenu(); + event = createDomEvent('Event', 'contextmenu'); + expect(event.defaultPrevented, isFalse); + target.dispatchEvent(event); + expect(event.defaultPrevented, isTrue); + + // Disabling again has no effect. + strategy.disableContextMenu(); + event = createDomEvent('Event', 'contextmenu'); + expect(event.defaultPrevented, isFalse); + target.dispatchEvent(event); + expect(event.defaultPrevented, isTrue); + + // Dispatching on a DOM element outside of target's subtree has no effect. + event = createDomEvent('Event', 'contextmenu'); + expect(event.defaultPrevented, isFalse); + domDocument.body!.dispatchEvent(event); + expect(event.defaultPrevented, isFalse); + + // Enabling the context menu means that contextmenu events are back to not + // being prevented. + strategy.enableContextMenu(); + event = createDomEvent('Event', 'contextmenu'); + expect(event.defaultPrevented, isFalse); + target.dispatchEvent(event); + expect(event.defaultPrevented, isFalse); + + // Enabling again has no effect. + strategy.enableContextMenu(); + event = createDomEvent('Event', 'contextmenu'); + expect(event.defaultPrevented, isFalse); + target.dispatchEvent(event); + expect(event.defaultPrevented, isFalse); + }); + }); } diff --git a/lib/web_ui/test/engine/view_embedder/embedding_strategy/full_page_embedding_strategy_test.dart b/lib/web_ui/test/engine/view_embedder/embedding_strategy/full_page_embedding_strategy_test.dart index d05effb9b3f54..1c62be92165ef 100644 --- a/lib/web_ui/test/engine/view_embedder/embedding_strategy/full_page_embedding_strategy_test.dart +++ b/lib/web_ui/test/engine/view_embedder/embedding_strategy/full_page_embedding_strategy_test.dart @@ -129,4 +129,56 @@ void doTests() { reason: 'Should be injected `nextTo` the passed element.'); }); }); + + group('context menu', () { + setUp(() { + strategy = FullPageEmbeddingStrategy(); + strategy.initialize(); + }); + + test('disableContextMenu and enableContextMenu can toggle the context menu', () { + final FullPageEmbeddingStrategy strategy = FullPageEmbeddingStrategy(); + + // When the app starts, contextmenu events are not prevented. + DomEvent event = createDomEvent('Event', 'contextmenu'); + expect(event.defaultPrevented, isFalse); + target.dispatchEvent(event); + expect(event.defaultPrevented, isFalse); + + // Disabling the context menu causes contextmenu events to be prevented. + strategy.disableContextMenu(); + event = createDomEvent('Event', 'contextmenu'); + expect(event.defaultPrevented, isFalse); + target.dispatchEvent(event); + expect(event.defaultPrevented, isTrue); + + // Disabling again has no effect. + strategy.disableContextMenu(); + event = createDomEvent('Event', 'contextmenu'); + expect(event.defaultPrevented, isFalse); + target.dispatchEvent(event); + expect(event.defaultPrevented, isTrue); + + // Dispatching on the document body is still disabled. + event = createDomEvent('Event', 'contextmenu'); + expect(event.defaultPrevented, isFalse); + domDocument.body!.dispatchEvent(event); + expect(event.defaultPrevented, isTrue); + + // Enabling the context menu means that contextmenu events are back to not + // being prevented. + strategy.enableContextMenu(); + event = createDomEvent('Event', 'contextmenu'); + expect(event.defaultPrevented, isFalse); + target.dispatchEvent(event); + expect(event.defaultPrevented, isFalse); + + // Enabling again has no effect. + strategy.enableContextMenu(); + event = createDomEvent('Event', 'contextmenu'); + expect(event.defaultPrevented, isFalse); + target.dispatchEvent(event); + expect(event.defaultPrevented, isFalse); + }); + }); } From 1b51696eb08536fab8cdd20a2d9cfe356b58256f Mon Sep 17 00:00:00 2001 From: skia-flutter-autoroll Date: Mon, 23 Jan 2023 19:48:24 -0500 Subject: [PATCH 06/15] Roll Skia from 1ccf2093cfa9 to 0328e12ab195 (59 revisions) (#39078) https://skia.googlesource.com/skia.git/+log/1ccf2093cfa9..0328e12ab195 2023-01-23 johnstiles@google.com Fix errors with non-square matrix multiplication. 2023-01-23 herb@google.com Move traits to .cpp for SkStrikeCache 2023-01-23 johnstiles@google.com Revert "Add workaround for Android roll." 2023-01-23 johnstiles@google.com Add matrix-multiply support to RP codegen. 2023-01-23 herb@google.com Rename fMu -> FStrikeLock 2023-01-23 ccameron@chromium.org SkJpegCodec: Add HDRGM support 2023-01-23 herb@google.com Remove accessor to the scalerContext on SkStrike 2023-01-23 jvanverth@google.com Add SkMatrixPriv::NearlyAffine. 2023-01-23 jvanverth@google.com Remove SK_LEGACY_MATRIX_MATH_ORDER 2023-01-23 johnstiles@google.com Replace push_literal(0) with push_zeros in the instruction stream. 2023-01-23 robertphillips@google.com [graphite] Implement Graphite-specific onMakeColorTypeAndColorSpace methods 2023-01-23 kjlubick@google.com Reland "[base] Make Bazel target and enforce IWYU" 2023-01-23 brianosman@google.com Replace bespoke 'saturate' with 'std::min' 2023-01-23 herb@google.com Move dump and stats to SkStrike 2023-01-23 brianosman@google.com For testing, support file and memory streams of files 2023-01-23 johnstiles@google.com Fix errors on tree. 2023-01-23 lehoangquyen@chromium.org [graphite-dawn] Correctly calculate num textures for pipeline's layout 2023-01-23 armansito@google.com [graphite] Fix assignment to pipeline inputs in AnalyticRRectRenderStep 2023-01-23 johnstiles@google.com Optimize pushing duplicates of 0. 2023-01-23 johnstiles@google.com Simplify masked stores when the execution mask is known. 2023-01-23 johnstiles@google.com Simplify branches when the execution mask is known. 2023-01-23 johnstiles@google.com Track the state of the execution mask in Builder. 2023-01-23 robertphillips@google.com [graphite] Update some GMs to work w/ Graphite 2023-01-23 kjlubick@google.com Roll Dawn from 785ccde2f588 to ffe356d558bc (15 revisions) 2023-01-23 johnstiles@google.com Add support for intrinsic radians()/degrees() in RP codegen. 2023-01-23 michaelludwig@google.com [graphite] Enable AnalyticRRectRenderStep for all rects and fill/hairline rrects 2023-01-23 skia-autoroll@skia-public.iam.gserviceaccount.com Roll SK Tool from 2ef45d764ab2 to 38d1dfe4578d 2023-01-23 armansito@google.com [sksl][wgsl] Struct type and global variable declarations 2023-01-23 skia-autoroll@skia-public.iam.gserviceaccount.com Roll Skia Infra from 920ae225a641 to 38d1dfe4578d (1 revision) 2023-01-23 johnstiles@google.com Add workaround for Android roll. 2023-01-23 skia-autoroll@skia-public.iam.gserviceaccount.com Roll vulkan-deps from fabf70586d95 to ada6bd70c604 (10 revisions) 2023-01-23 skia-autoroll@skia-public.iam.gserviceaccount.com Roll ANGLE from c98a413c3ea7 to 3b27647cb9f8 (8 revisions) 2023-01-21 fmalita@chromium.org Manual revert "[base] Make Bazel target and enforce IWYU" 2023-01-20 herb@google.com Merge SkScalerCache into SkStrike 2023-01-20 kjlubick@google.com Extract the double-precision cubic and quad solving code to base. 2023-01-20 jvanverth@google.com [graphite] Enable contextOptions flag for readPixels during testing Dawn 2023-01-20 kjlubick@google.com Add tests for SkDCubic::chopAt 2023-01-20 johnstiles@google.com Allow sqrt() to have a small margin of error. 2023-01-20 lovisolo@google.com Update IntelIris540 tasks to target GPU driver version 31.0.101.2115. 2023-01-20 johnstiles@google.com Add peephole optimizations to constant assignment. 2023-01-20 johnstiles@google.com Combine contiguous zero_slot_unmasked slot ranges. 2023-01-20 kjlubick@google.com [config] Make SK_API configurable from SkUserConfig 2023-01-20 johnstiles@google.com Add support for sqrt() to RP codegen. 2023-01-20 michaelludwig@google.com [graphite] Support hairlines/subpixel fills/strokes in AnalyticRoundRectRenderStep 2023-01-20 brianosman@google.com In legacy 8888 sprite blitters, use saturating adds 2023-01-20 kjlubick@google.com [base] Make Bazel target and enforce IWYU 2023-01-20 johnstiles@google.com Add RP codegen support for sin/cos/tan. 2023-01-20 johnstiles@google.com Add RP builder support for sin/cos/tan/sqrt. 2023-01-20 skia-autoroll@skia-public.iam.gserviceaccount.com Roll vulkan-deps from 37a74218c401 to fabf70586d95 (4 revisions) 2023-01-20 johnstiles@google.com Use a return mask only where it is required. 2023-01-20 johnstiles@google.com Migrate GetReturnComplexity out of Inliner and into Analysis. 2023-01-20 robertphillips@google.com [graphite] Plumb new Graphite-specific version of two SkImage APIs 2023-01-20 herb@google.com Have SkStrikeCache.h load the SkUserConfig.h 2023-01-20 johnstiles@google.com Implement boolean-logic ops in RP codegen. 2023-01-20 ccameron@chromium.org ColorSpaceXformColorFilter: Fix leak 2023-01-20 kjlubick@google.com Replace SkDCubeRoot with std::cbrt 2023-01-20 ccameron@chromium.org SkGainmapShader: Use makeRawShader 2023-01-20 skia-autoroll@skia-public.iam.gserviceaccount.com Roll ANGLE from e960355a9a22 to c98a413c3ea7 (5 revisions) 2023-01-20 jvanverth@google.com Add perspective text GM. If this roll has caused a breakage, revert this CL and stop the roller using the controls here: https://autoroll.skia.org/r/skia-flutter-autoroll Please CC kaushikiska@google.com,nicolettep@google.com on the revert to ensure that a human is aware of the problem. To file a bug in Skia: https://bugs.chromium.org/p/skia/issues/entry 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://bugs.chromium.org/p/skia/issues/entry?template=Autoroller+Bug Documentation for the AutoRoller is here: https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md --- DEPS | 2 +- ci/licenses_golden/licenses_skia | 22 +++++++++++++++++----- 2 files changed, 18 insertions(+), 6 deletions(-) diff --git a/DEPS b/DEPS index 75a39c5caea69..3898791df84b0 100644 --- a/DEPS +++ b/DEPS @@ -18,7 +18,7 @@ vars = { 'llvm_git': 'https://llvm.googlesource.com', # OCMock is for testing only so there is no google clone 'ocmock_git': 'https://github.com/erikdoe/ocmock.git', - 'skia_revision': '1ccf2093cfa9cae96363e66d524eca8168c050cc', + 'skia_revision': '0328e12ab195f6ada1adcfeaa65fffe2eb1310d4', # WARNING: DO NOT EDIT canvaskit_cipd_instance MANUALLY # See `lib/web_ui/README.md` for how to roll CanvasKit to a new version. diff --git a/ci/licenses_golden/licenses_skia b/ci/licenses_golden/licenses_skia index fb453993c20ad..479030fc041fc 100644 --- a/ci/licenses_golden/licenses_skia +++ b/ci/licenses_golden/licenses_skia @@ -1,4 +1,4 @@ -Signature: b56b0ab87d49992124c52f8d96ad6c0a +Signature: efd4597a0b8e7ec0edf8a734fb79cb03 ==================================================================================================== LIBRARY: etc1 @@ -691,8 +691,6 @@ ORIGIN: ../../../third_party/skia/src/core/SkRect.cpp + ../../../third_party/ski ORIGIN: ../../../third_party/skia/src/core/SkRegion.cpp + ../../../third_party/skia/LICENSE ORIGIN: ../../../third_party/skia/src/core/SkRegionPriv.h + ../../../third_party/skia/LICENSE ORIGIN: ../../../third_party/skia/src/core/SkRegion_path.cpp + ../../../third_party/skia/LICENSE -ORIGIN: ../../../third_party/skia/src/core/SkScalerCache.cpp + ../../../third_party/skia/LICENSE -ORIGIN: ../../../third_party/skia/src/core/SkScalerCache.h + ../../../third_party/skia/LICENSE ORIGIN: ../../../third_party/skia/src/core/SkScalerContext.cpp + ../../../third_party/skia/LICENSE ORIGIN: ../../../third_party/skia/src/core/SkScalerContext.h + ../../../third_party/skia/LICENSE ORIGIN: ../../../third_party/skia/src/core/SkScan.cpp + ../../../third_party/skia/LICENSE @@ -703,6 +701,8 @@ ORIGIN: ../../../third_party/skia/src/core/SkScan_Path.cpp + ../../../third_part ORIGIN: ../../../third_party/skia/src/core/SkSpriteBlitter.h + ../../../third_party/skia/LICENSE ORIGIN: ../../../third_party/skia/src/core/SkSpriteBlitter_ARGB32.cpp + ../../../third_party/skia/LICENSE ORIGIN: ../../../third_party/skia/src/core/SkStream.cpp + ../../../third_party/skia/LICENSE +ORIGIN: ../../../third_party/skia/src/core/SkStrike.cpp + ../../../third_party/skia/LICENSE +ORIGIN: ../../../third_party/skia/src/core/SkStrike.h + ../../../third_party/skia/LICENSE ORIGIN: ../../../third_party/skia/src/core/SkString.cpp + ../../../third_party/skia/LICENSE ORIGIN: ../../../third_party/skia/src/core/SkStroke.h + ../../../third_party/skia/LICENSE ORIGIN: ../../../third_party/skia/src/core/SkStrokerPriv.cpp + ../../../third_party/skia/LICENSE @@ -840,8 +840,6 @@ FILE: ../../../third_party/skia/src/core/SkRect.cpp FILE: ../../../third_party/skia/src/core/SkRegion.cpp FILE: ../../../third_party/skia/src/core/SkRegionPriv.h FILE: ../../../third_party/skia/src/core/SkRegion_path.cpp -FILE: ../../../third_party/skia/src/core/SkScalerCache.cpp -FILE: ../../../third_party/skia/src/core/SkScalerCache.h FILE: ../../../third_party/skia/src/core/SkScalerContext.cpp FILE: ../../../third_party/skia/src/core/SkScalerContext.h FILE: ../../../third_party/skia/src/core/SkScan.cpp @@ -852,6 +850,8 @@ FILE: ../../../third_party/skia/src/core/SkScan_Path.cpp FILE: ../../../third_party/skia/src/core/SkSpriteBlitter.h FILE: ../../../third_party/skia/src/core/SkSpriteBlitter_ARGB32.cpp FILE: ../../../third_party/skia/src/core/SkStream.cpp +FILE: ../../../third_party/skia/src/core/SkStrike.cpp +FILE: ../../../third_party/skia/src/core/SkStrike.h FILE: ../../../third_party/skia/src/core/SkString.cpp FILE: ../../../third_party/skia/src/core/SkStroke.h FILE: ../../../third_party/skia/src/core/SkStrokerPriv.cpp @@ -1393,6 +1393,7 @@ ORIGIN: ../../../third_party/skia/gm/linepaths.cpp + ../../../third_party/skia/L ORIGIN: ../../../third_party/skia/gm/ninepatchstretch.cpp + ../../../third_party/skia/LICENSE ORIGIN: ../../../third_party/skia/gm/pathfill.cpp + ../../../third_party/skia/LICENSE ORIGIN: ../../../third_party/skia/gm/pathreverse.cpp + ../../../third_party/skia/LICENSE +ORIGIN: ../../../third_party/skia/gm/persptext.cpp + ../../../third_party/skia/LICENSE ORIGIN: ../../../third_party/skia/gm/points.cpp + ../../../third_party/skia/LICENSE ORIGIN: ../../../third_party/skia/gm/poly2poly.cpp + ../../../third_party/skia/LICENSE ORIGIN: ../../../third_party/skia/gm/quadpaths.cpp + ../../../third_party/skia/LICENSE @@ -1576,6 +1577,7 @@ FILE: ../../../third_party/skia/gm/linepaths.cpp FILE: ../../../third_party/skia/gm/ninepatchstretch.cpp FILE: ../../../third_party/skia/gm/pathfill.cpp FILE: ../../../third_party/skia/gm/pathreverse.cpp +FILE: ../../../third_party/skia/gm/persptext.cpp FILE: ../../../third_party/skia/gm/points.cpp FILE: ../../../third_party/skia/gm/poly2poly.cpp FILE: ../../../third_party/skia/gm/quadpaths.cpp @@ -8933,18 +8935,28 @@ LIBRARY: skia ORIGIN: ../../../third_party/skia/include/private/SkMalloc.h + ../../../third_party/skia/LICENSE ORIGIN: ../../../third_party/skia/include/private/SkTemplates.h + ../../../third_party/skia/LICENSE ORIGIN: ../../../third_party/skia/include/private/base/SkCPUTypes.h + ../../../third_party/skia/LICENSE +ORIGIN: ../../../third_party/skia/src/base/SkCubics.cpp + ../../../third_party/skia/LICENSE +ORIGIN: ../../../third_party/skia/src/base/SkCubics.h + ../../../third_party/skia/LICENSE ORIGIN: ../../../third_party/skia/src/base/SkFloatingPoint.cpp + ../../../third_party/skia/LICENSE +ORIGIN: ../../../third_party/skia/src/base/SkQuads.cpp + ../../../third_party/skia/LICENSE +ORIGIN: ../../../third_party/skia/src/base/SkQuads.h + ../../../third_party/skia/LICENSE ORIGIN: ../../../third_party/skia/src/base/SkSafeMath.cpp + ../../../third_party/skia/LICENSE ORIGIN: ../../../third_party/skia/src/gpu/graphite/Image_Base_Graphite.cpp + ../../../third_party/skia/LICENSE ORIGIN: ../../../third_party/skia/src/gpu/graphite/Image_Base_Graphite.h + ../../../third_party/skia/LICENSE +ORIGIN: ../../../third_party/skia/src/sksl/analysis/SkSLGetReturnComplexity.cpp + ../../../third_party/skia/LICENSE TYPE: LicenseType.bsd FILE: ../../../third_party/skia/include/private/SkMalloc.h FILE: ../../../third_party/skia/include/private/SkTemplates.h FILE: ../../../third_party/skia/include/private/base/SkCPUTypes.h +FILE: ../../../third_party/skia/src/base/SkCubics.cpp +FILE: ../../../third_party/skia/src/base/SkCubics.h FILE: ../../../third_party/skia/src/base/SkFloatingPoint.cpp +FILE: ../../../third_party/skia/src/base/SkQuads.cpp +FILE: ../../../third_party/skia/src/base/SkQuads.h FILE: ../../../third_party/skia/src/base/SkSafeMath.cpp FILE: ../../../third_party/skia/src/gpu/graphite/Image_Base_Graphite.cpp FILE: ../../../third_party/skia/src/gpu/graphite/Image_Base_Graphite.h +FILE: ../../../third_party/skia/src/sksl/analysis/SkSLGetReturnComplexity.cpp ---------------------------------------------------------------------------------------------------- Copyright 2023 Google LLC From d83a705eff472ffdc19bc087ad4ef504220f341e Mon Sep 17 00:00:00 2001 From: Constantine Shablya Date: Tue, 24 Jan 2023 03:22:38 +0200 Subject: [PATCH 07/15] [embedder] Fix getting vkGetInstanceProcAddr (#39051) --- shell/platform/embedder/embedder.cc | 2 +- shell/platform/embedder/tests/embedder_config_builder.cc | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/shell/platform/embedder/embedder.cc b/shell/platform/embedder/embedder.cc index 9888ad6676899..956448c237565 100644 --- a/shell/platform/embedder/embedder.cc +++ b/shell/platform/embedder/embedder.cc @@ -562,7 +562,7 @@ InferVulkanPlatformViewCreationCallback( auto vk_instance = static_cast(config->vulkan.instance); auto proc_addr = - vulkan_get_instance_proc_address(vk_instance, "GetInstanceProcAddr"); + vulkan_get_instance_proc_address(vk_instance, "vkGetInstanceProcAddr"); flutter::EmbedderSurfaceVulkan::VulkanDispatchTable vulkan_dispatch_table = { .get_instance_proc_address = diff --git a/shell/platform/embedder/tests/embedder_config_builder.cc b/shell/platform/embedder/tests/embedder_config_builder.cc index d61b5ffb63370..32d5ffa2d1de9 100644 --- a/shell/platform/embedder/tests/embedder_config_builder.cc +++ b/shell/platform/embedder/tests/embedder_config_builder.cc @@ -513,7 +513,8 @@ void EmbedderConfigBuilder::InitializeVulkanRendererConfig() { [](void* context, FlutterVulkanInstanceHandle instance, const char* name) -> void* { auto proc_addr = reinterpret_cast(context) - ->vulkan_context_->vk_->GetInstanceProcAddr; + ->vulkan_context_->vk_->GetInstanceProcAddr( + reinterpret_cast(instance), name); return reinterpret_cast(proc_addr); }; vulkan_renderer_config_.get_next_image_callback = From 973b01c4070ac4844627d36f170b2d27bef59c02 Mon Sep 17 00:00:00 2001 From: Michael Goderbauer Date: Mon, 23 Jan 2023 18:46:24 -0800 Subject: [PATCH 08/15] Fix doc analyzer breakage (#39082) --- lib/ui/hash_codes.dart | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/ui/hash_codes.dart b/lib/ui/hash_codes.dart index b1a332395bf33..661f7a6adcb8e 100644 --- a/lib/ui/hash_codes.dart +++ b/lib/ui/hash_codes.dart @@ -64,7 +64,7 @@ class _Jenkins { /// because [Object.hashAll]'s argument is not nullable: /// /// ```dart -/// int get hashCode => Object.hash(foo, bar, thud == null ? null : Object.hashAll(thud), baz); +/// int get hashCode => Object.hash(foo, bar, thud == null ? null : Object.hashAll(thud!), baz); /// ``` @Deprecated( 'Use Object.hash() instead. ' From 55e9eafabcba110f3d9b523e335c4ffd60e082d6 Mon Sep 17 00:00:00 2001 From: skia-flutter-autoroll Date: Mon, 23 Jan 2023 22:02:23 -0500 Subject: [PATCH 09/15] Roll Dart SDK from 107a1280a61f to d1a0e860679e (2 revisions) (#39084) https://dart.googlesource.com/sdk.git/+log/107a1280a61f..d1a0e860679e 2023-01-23 dart-internal-merge@dart-ci-internal.iam.gserviceaccount.com Version 3.0.0-156.0.dev 2023-01-23 dart-internal-merge@dart-ci-internal.iam.gserviceaccount.com Version 3.0.0-155.0.dev If this roll has caused a breakage, revert this CL and stop the roller using the controls here: https://autoroll.skia.org/r/dart-sdk-flutter-engine Please CC dart-vm-team@google.com,kaushikiska@google.com,asiva@google.com on the revert to ensure that a human is aware of the problem. To file a bug in Flutter Engine: https://github.com/flutter/flutter/issues/new/choose To report a problem with the AutoRoller itself, please file a bug: https://bugs.chromium.org/p/skia/issues/entry?template=Autoroller+Bug Documentation for the AutoRoller is here: https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md --- DEPS | 2 +- ci/licenses_golden/licenses_third_party | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/DEPS b/DEPS index 3898791df84b0..9d9641c37a683 100644 --- a/DEPS +++ b/DEPS @@ -48,7 +48,7 @@ vars = { # Dart is: https://github.com/dart-lang/sdk/blob/main/DEPS # You can use //tools/dart/create_updated_flutter_deps.py to produce # updated revision list of existing dependencies. - 'dart_revision': '107a1280a61fc09f8491035f2122a26cac917bca', + 'dart_revision': 'd1a0e860679e10d3a8e0c1bc5fe030a363cdd399', # WARNING: DO NOT EDIT MANUALLY # The lines between blank lines above and below are generated by a script. See create_updated_flutter_deps.py diff --git a/ci/licenses_golden/licenses_third_party b/ci/licenses_golden/licenses_third_party index 5c84798d1f01b..f9f4000bb3dca 100644 --- a/ci/licenses_golden/licenses_third_party +++ b/ci/licenses_golden/licenses_third_party @@ -1,4 +1,4 @@ -Signature: 76bfa909d03f0aecf7182560f939cbad +Signature: f74f700ccbf4a7c658dc80fc5ac28bdd ==================================================================================================== LIBRARY: angle From fa07c546c2163855b1a1261e93e0013fae3df4cb Mon Sep 17 00:00:00 2001 From: skia-flutter-autoroll Date: Mon, 23 Jan 2023 23:17:32 -0500 Subject: [PATCH 10/15] Roll Skia from 0328e12ab195 to 50d78376d30c (3 revisions) (#39086) https://skia.googlesource.com/skia.git/+log/0328e12ab195..50d78376d30c 2023-01-24 armansito@google.com [sksl] Prevent assignments to pipeline input variables 2023-01-24 bungeman@google.com Improve Serialization_Typeface error message 2023-01-23 johnstiles@google.com Add RP codegen support for matrix-op-scalar. If this roll has caused a breakage, revert this CL and stop the roller using the controls here: https://autoroll.skia.org/r/skia-flutter-autoroll Please CC kaushikiska@google.com,nicolettep@google.com on the revert to ensure that a human is aware of the problem. To file a bug in Skia: https://bugs.chromium.org/p/skia/issues/entry 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://bugs.chromium.org/p/skia/issues/entry?template=Autoroller+Bug Documentation for the AutoRoller is here: https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md --- DEPS | 2 +- ci/licenses_golden/licenses_skia | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/DEPS b/DEPS index 9d9641c37a683..5b79e7b1c1a32 100644 --- a/DEPS +++ b/DEPS @@ -18,7 +18,7 @@ vars = { 'llvm_git': 'https://llvm.googlesource.com', # OCMock is for testing only so there is no google clone 'ocmock_git': 'https://github.com/erikdoe/ocmock.git', - 'skia_revision': '0328e12ab195f6ada1adcfeaa65fffe2eb1310d4', + 'skia_revision': '50d78376d30c4edf9533faef1df2ec8cea51973f', # WARNING: DO NOT EDIT canvaskit_cipd_instance MANUALLY # See `lib/web_ui/README.md` for how to roll CanvasKit to a new version. diff --git a/ci/licenses_golden/licenses_skia b/ci/licenses_golden/licenses_skia index 479030fc041fc..6db4c3b2cbec5 100644 --- a/ci/licenses_golden/licenses_skia +++ b/ci/licenses_golden/licenses_skia @@ -1,4 +1,4 @@ -Signature: efd4597a0b8e7ec0edf8a734fb79cb03 +Signature: 36f6c4323bd83a331b7cc57087a94e8f ==================================================================================================== LIBRARY: etc1 From 17abf1a9e82dbe2345c8dbb51e916977aeb30208 Mon Sep 17 00:00:00 2001 From: skia-flutter-autoroll Date: Tue, 24 Jan 2023 00:33:14 -0500 Subject: [PATCH 11/15] Roll Fuchsia Linux SDK from GLRbnjiO5SbZKX-Us... to dWbkAZchFHtZE9Wt_... (#39087) If this roll has caused a breakage, revert this CL and stop the roller using the controls here: https://autoroll.skia.org/r/fuchsia-linux-sdk-flutter-engine Please CC kaushikiska@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://bugs.chromium.org/p/skia/issues/entry?template=Autoroller+Bug Documentation for the AutoRoller is here: https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md --- DEPS | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/DEPS b/DEPS index 5b79e7b1c1a32..fd646e978b175 100644 --- a/DEPS +++ b/DEPS @@ -826,7 +826,7 @@ deps = { 'packages': [ { 'package': 'fuchsia/sdk/core/linux-amd64', - 'version': 'GLRbnjiO5SbZKX-UsgGviD_EbofaMAP4rV4WS83NfXsC' + 'version': 'dWbkAZchFHtZE9Wt_mP2AcfZ79IGPA4ttKDNppcdvT8C' } ], 'condition': 'host_os == "linux" and not download_fuchsia_sdk', From 5c46d75f7d0c5126419e7e22d56dc32b9723efbf Mon Sep 17 00:00:00 2001 From: skia-flutter-autoroll Date: Tue, 24 Jan 2023 02:47:23 -0500 Subject: [PATCH 12/15] Roll Skia from 50d78376d30c to 90fda2e72314 (4 revisions) (#39089) https://skia.googlesource.com/skia.git/+log/50d78376d30c..90fda2e72314 2023-01-24 skia-autoroll@skia-public.iam.gserviceaccount.com Roll ANGLE from 3b27647cb9f8 to 9a72a98eb94f (8 revisions) 2023-01-24 skia-autoroll@skia-public.iam.gserviceaccount.com Roll Skia Infra from 38d1dfe4578d to d7a3d7db7fde (4 revisions) 2023-01-24 armansito@google.com [sksl][wgsl] Global GL-style uniforms 2023-01-24 skia-autoroll@skia-public.iam.gserviceaccount.com Roll vulkan-deps from ada6bd70c604 to f93afca731ce (11 revisions) If this roll has caused a breakage, revert this CL and stop the roller using the controls here: https://autoroll.skia.org/r/skia-flutter-autoroll Please CC kaushikiska@google.com,nicolettep@google.com on the revert to ensure that a human is aware of the problem. To file a bug in Skia: https://bugs.chromium.org/p/skia/issues/entry 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://bugs.chromium.org/p/skia/issues/entry?template=Autoroller+Bug Documentation for the AutoRoller is here: https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md --- DEPS | 2 +- ci/licenses_golden/licenses_skia | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/DEPS b/DEPS index fd646e978b175..ad3575cd8c8eb 100644 --- a/DEPS +++ b/DEPS @@ -18,7 +18,7 @@ vars = { 'llvm_git': 'https://llvm.googlesource.com', # OCMock is for testing only so there is no google clone 'ocmock_git': 'https://github.com/erikdoe/ocmock.git', - 'skia_revision': '50d78376d30c4edf9533faef1df2ec8cea51973f', + 'skia_revision': '90fda2e72314afaa03a54ca7648cd25347a775b7', # WARNING: DO NOT EDIT canvaskit_cipd_instance MANUALLY # See `lib/web_ui/README.md` for how to roll CanvasKit to a new version. diff --git a/ci/licenses_golden/licenses_skia b/ci/licenses_golden/licenses_skia index 6db4c3b2cbec5..a2aa2e74c5c3b 100644 --- a/ci/licenses_golden/licenses_skia +++ b/ci/licenses_golden/licenses_skia @@ -1,4 +1,4 @@ -Signature: 36f6c4323bd83a331b7cc57087a94e8f +Signature: 64c27fd3d1bc6370577a391f71032302 ==================================================================================================== LIBRARY: etc1 From 5b4e331a6647dd874261f547331ef526f30a6043 Mon Sep 17 00:00:00 2001 From: Martin Kustermann Date: Tue, 24 Jan 2023 09:35:05 +0100 Subject: [PATCH 13/15] Add mmap dependency to flutter_frontend_server (#39090) In a follow-up change in Dart SDK, package:compiler (a dependency of flutter_frontend_server) will start using package:mmap --- flutter_frontend_server/pubspec.yaml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/flutter_frontend_server/pubspec.yaml b/flutter_frontend_server/pubspec.yaml index 4f5bc2056d3fa..b492661d4804b 100644 --- a/flutter_frontend_server/pubspec.yaml +++ b/flutter_frontend_server/pubspec.yaml @@ -77,6 +77,8 @@ dependency_overrides: path: ../testing/litetest meta: path: ../../third_party/dart/pkg/meta + mmap: + path: ../../third_party/dart/pkg/mmap package_config: path: ../../third_party/dart/third_party/pkg/package_config path: From 7f38d0d4f5c2538295f3bbbc42e15ad75b191ae1 Mon Sep 17 00:00:00 2001 From: Daco Harkes Date: Tue, 24 Jan 2023 12:39:19 +0100 Subject: [PATCH 14/15] Migrate `@FfiNative` to `@Native` (#39034) --- lib/ui/compositing.dart | 51 ++-- lib/ui/dart_ui.cc | 12 +- lib/ui/experiments/scene.dart | 20 +- lib/ui/isolate_name_server.dart | 6 +- lib/ui/natives.dart | 12 +- lib/ui/painting.dart | 259 +++++++++--------- lib/ui/platform_dispatcher.dart | 26 +- lib/ui/semantics.dart | 16 +- lib/ui/text.dart | 50 ++-- lib/ui/window.dart | 4 +- .../tonic/tests/fixtures/tonic_test.dart | 30 +- 11 files changed, 241 insertions(+), 245 deletions(-) diff --git a/lib/ui/compositing.dart b/lib/ui/compositing.dart index 2c2c6dd8eb5fc..a55480c028e79 100644 --- a/lib/ui/compositing.dart +++ b/lib/ui/compositing.dart @@ -34,7 +34,7 @@ class Scene extends NativeFieldWrapperClass1 { return Image._(image, image.width, image.height); } - @FfiNative, Uint32, Uint32, Handle)>('Scene::toImageSync') + @Native, Uint32, Uint32, Handle)>(symbol: 'Scene::toImageSync') external String? _toImageSync(int width, int height, _Image outImage); /// Creates a raster image representation of the current state of the scene. @@ -58,7 +58,7 @@ class Scene extends NativeFieldWrapperClass1 { ); } - @FfiNative, Uint32, Uint32, Handle)>('Scene::toImage') + @Native, Uint32, Uint32, Handle)>(symbol: 'Scene::toImage') external String? _toImage(int width, int height, _Callback<_Image?> callback); /// Releases the resources used by this scene. @@ -67,7 +67,7 @@ class Scene extends NativeFieldWrapperClass1 { /// /// This can't be a leaf call because the native function calls Dart API /// (Dart_SetNativeInstanceField). - @FfiNative)>('Scene::dispose') + @Native)>(symbol: 'Scene::dispose') external void dispose(); } @@ -235,7 +235,7 @@ class SceneBuilder extends NativeFieldWrapperClass1 { _constructor(); } - @FfiNative('SceneBuilder::Create') + @Native(symbol: 'SceneBuilder::Create') external void _constructor(); // Layers used in this scene. @@ -332,7 +332,7 @@ class SceneBuilder extends NativeFieldWrapperClass1 { return layer; } - @FfiNative, Handle, Handle, Handle)>('SceneBuilder::pushTransformHandle') + @Native, Handle, Handle, Handle)>(symbol: 'SceneBuilder::pushTransformHandle') external void _pushTransform(EngineLayer layer, Float64List matrix4, EngineLayer? oldLayer); /// Pushes an offset operation onto the operation stack. @@ -357,7 +357,7 @@ class SceneBuilder extends NativeFieldWrapperClass1 { return layer; } - @FfiNative, Handle, Double, Double, Handle)>('SceneBuilder::pushOffset') + @Native, Handle, Double, Double, Handle)>(symbol: 'SceneBuilder::pushOffset') external void _pushOffset(EngineLayer layer, double dx, double dy, EngineLayer? oldLayer); /// Pushes a rectangular clip operation onto the operation stack. @@ -386,7 +386,7 @@ class SceneBuilder extends NativeFieldWrapperClass1 { return layer; } - @FfiNative, Handle, Double, Double, Double, Double, Int32, Handle)>('SceneBuilder::pushClipRect') + @Native, Handle, Double, Double, Double, Double, Int32, Handle)>(symbol: 'SceneBuilder::pushClipRect') external void _pushClipRect( EngineLayer outEngineLayer, double left, @@ -421,7 +421,7 @@ class SceneBuilder extends NativeFieldWrapperClass1 { return layer; } - @FfiNative, Handle, Handle, Int32, Handle)>('SceneBuilder::pushClipRRect') + @Native, Handle, Handle, Int32, Handle)>(symbol: 'SceneBuilder::pushClipRRect') external void _pushClipRRect(EngineLayer layer, Float32List rrect, int clipBehavior, EngineLayer? oldLayer); /// Pushes a path clip operation onto the operation stack. @@ -449,7 +449,7 @@ class SceneBuilder extends NativeFieldWrapperClass1 { return layer; } - @FfiNative, Handle, Pointer, Int32, Handle)>('SceneBuilder::pushClipPath') + @Native, Handle, Pointer, Int32, Handle)>(symbol: 'SceneBuilder::pushClipPath') external void _pushClipPath(EngineLayer layer, Path path, int clipBehavior, EngineLayer? oldLayer); /// Pushes an opacity operation onto the operation stack. @@ -477,7 +477,7 @@ class SceneBuilder extends NativeFieldWrapperClass1 { return layer; } - @FfiNative, Handle, Int32, Double, Double, Handle)>('SceneBuilder::pushOpacity') + @Native, Handle, Int32, Double, Double, Handle)>(symbol: 'SceneBuilder::pushOpacity') external void _pushOpacity(EngineLayer layer, int alpha, double dx, double dy, EngineLayer? oldLayer); /// Pushes a color filter operation onto the operation stack. @@ -505,7 +505,7 @@ class SceneBuilder extends NativeFieldWrapperClass1 { return layer; } - @FfiNative, Handle, Pointer, Handle)>('SceneBuilder::pushColorFilter') + @Native, Handle, Pointer, Handle)>(symbol: 'SceneBuilder::pushColorFilter') external void _pushColorFilter(EngineLayer layer, _ColorFilter filter, EngineLayer? oldLayer); /// Pushes an image filter operation onto the operation stack. @@ -534,7 +534,7 @@ class SceneBuilder extends NativeFieldWrapperClass1 { return layer; } - @FfiNative, Handle, Pointer, Double, Double, Handle)>('SceneBuilder::pushImageFilter') + @Native, Handle, Pointer, Double, Double, Handle)>(symbol: 'SceneBuilder::pushImageFilter') external void _pushImageFilter(EngineLayer outEngineLayer, _ImageFilter filter, double dx, double dy, EngineLayer? oldLayer); /// Pushes a backdrop filter operation onto the operation stack. @@ -561,7 +561,7 @@ class SceneBuilder extends NativeFieldWrapperClass1 { return layer; } - @FfiNative, Handle, Pointer, Int32, Handle)>('SceneBuilder::pushBackdropFilter') + @Native, Handle, Pointer, Int32, Handle)>(symbol: 'SceneBuilder::pushBackdropFilter') external void _pushBackdropFilter(EngineLayer outEngineLayer, _ImageFilter filter, int blendMode, EngineLayer? oldLayer); /// Pushes a shader mask operation onto the operation stack. @@ -599,8 +599,7 @@ class SceneBuilder extends NativeFieldWrapperClass1 { return layer; } - @FfiNative, Handle, Pointer, Double, Double, Double, Double, Int32, Int32, Handle)>( - 'SceneBuilder::pushShaderMask') + @Native, Handle, Pointer, Double, Double, Double, Double, Int32, Int32, Handle)>(symbol: 'SceneBuilder::pushShaderMask') external void _pushShaderMask( EngineLayer engineLayer, Shader shader, @@ -649,7 +648,7 @@ class SceneBuilder extends NativeFieldWrapperClass1 { return layer; } - @FfiNative, Handle, Pointer, Double, Int32, Int32, Int32, Handle)>('SceneBuilder::pushPhysicalShape') + @Native, Handle, Pointer, Double, Int32, Int32, Int32, Handle)>(symbol: 'SceneBuilder::pushPhysicalShape') external void _pushPhysicalShape( EngineLayer outEngineLayer, Path path, @@ -672,7 +671,7 @@ class SceneBuilder extends NativeFieldWrapperClass1 { _pop(); } - @FfiNative)>('SceneBuilder::pop', isLeaf: true) + @Native)>(symbol: 'SceneBuilder::pop', isLeaf: true) external void _pop(); /// Add a retained engine layer subtree from previous frames. @@ -712,7 +711,7 @@ class SceneBuilder extends NativeFieldWrapperClass1 { _addRetained(wrapper._nativeLayer!); } - @FfiNative, Handle)>('SceneBuilder::addRetained') + @Native, Handle)>(symbol: 'SceneBuilder::addRetained') external void _addRetained(EngineLayer retainedLayer); /// Adds an object to the scene that displays performance statistics. @@ -743,7 +742,7 @@ class SceneBuilder extends NativeFieldWrapperClass1 { _addPerformanceOverlay(enabledOptions, bounds.left, bounds.right, bounds.top, bounds.bottom); } - @FfiNative, Uint64, Double, Double, Double, Double)>('SceneBuilder::addPerformanceOverlay', isLeaf: true) + @Native, Uint64, Double, Double, Double, Double)>(symbol: 'SceneBuilder::addPerformanceOverlay', isLeaf: true) external void _addPerformanceOverlay(int enabledOptions, double left, double right, double top, double bottom); /// Adds a [Picture] to the scene. @@ -778,7 +777,7 @@ class SceneBuilder extends NativeFieldWrapperClass1 { _addPicture(offset.dx, offset.dy, picture, hints); } - @FfiNative, Double, Double, Pointer, Int32)>('SceneBuilder::addPicture') + @Native, Double, Double, Pointer, Int32)>(symbol: 'SceneBuilder::addPicture') external void _addPicture(double dx, double dy, Picture picture, int hints); /// Adds a backend texture to the scene. @@ -804,7 +803,7 @@ class SceneBuilder extends NativeFieldWrapperClass1 { _addTexture(offset.dx, offset.dy, width, height, textureId, freeze, filterQuality.index); } - @FfiNative, Double, Double, Double, Double, Int64, Bool, Int32)>('SceneBuilder::addTexture', isLeaf: true) + @Native, Double, Double, Double, Double, Int64, Bool, Int32)>(symbol: 'SceneBuilder::addTexture', isLeaf: true) external void _addTexture(double dx, double dy, double width, double height, int textureId, bool freeze, int filterQuality); /// Adds a platform view (e.g an iOS UIView) to the scene. @@ -833,7 +832,7 @@ class SceneBuilder extends NativeFieldWrapperClass1 { _addPlatformView(offset.dx, offset.dy, width, height, viewId); } - @FfiNative, Double, Double, Double, Double, Int64)>('SceneBuilder::addPlatformView', isLeaf: true) + @Native, Double, Double, Double, Double, Int64)>(symbol: 'SceneBuilder::addPlatformView', isLeaf: true) external void _addPlatformView(double dx, double dy, double width, double height, int viewId); /// Sets a threshold after which additional debugging information should be recorded. @@ -842,7 +841,7 @@ class SceneBuilder extends NativeFieldWrapperClass1 { /// interested in using this feature, please contact [flutter-dev](https://groups.google.com/forum/#!forum/flutter-dev). /// We'll hopefully be able to figure out how to make this feature more useful /// to you. - @FfiNative, Uint32)>('SceneBuilder::setRasterizerTracingThreshold', isLeaf: true) + @Native, Uint32)>(symbol: 'SceneBuilder::setRasterizerTracingThreshold', isLeaf: true) external void setRasterizerTracingThreshold(int frameInterval); /// Sets whether the raster cache should checkerboard cached entries. This is @@ -860,14 +859,14 @@ class SceneBuilder extends NativeFieldWrapperClass1 { /// /// Currently this interface is difficult to use by end-developers. If you're /// interested in using this feature, please contact [flutter-dev](https://groups.google.com/forum/#!forum/flutter-dev). - @FfiNative, Bool)>('SceneBuilder::setCheckerboardRasterCacheImages', isLeaf: true) + @Native, Bool)>(symbol: 'SceneBuilder::setCheckerboardRasterCacheImages', isLeaf: true) external void setCheckerboardRasterCacheImages(bool checkerboard); /// Sets whether the compositor should checkerboard layers that are rendered /// to offscreen bitmaps. /// /// This is only useful for debugging purposes. - @FfiNative, Bool)>('SceneBuilder::setCheckerboardOffscreenLayers', isLeaf: true) + @Native, Bool)>(symbol: 'SceneBuilder::setCheckerboardOffscreenLayers', isLeaf: true) external void setCheckerboardOffscreenLayers(bool checkerboard); /// Finishes building the scene. @@ -884,6 +883,6 @@ class SceneBuilder extends NativeFieldWrapperClass1 { return scene; } - @FfiNative, Handle)>('SceneBuilder::build') + @Native, Handle)>(symbol: 'SceneBuilder::build') external void _build(Scene outScene); } diff --git a/lib/ui/dart_ui.cc b/lib/ui/dart_ui.cc index 24af045cec348..8d14a2fb822de 100644 --- a/lib/ui/dart_ui.cc +++ b/lib/ui/dart_ui.cc @@ -55,7 +55,7 @@ typedef CanvasPathMeasure PathMeasure; typedef CanvasGradient Gradient; typedef CanvasPath Path; -// List of native static functions used as @FfiNative functions. +// List of native static functions used as @Native functions. // Items are tuples of ('function_name', 'parameter_count'), where: // 'function_name' is the fully qualified name of the native function. // 'parameter_count' is the number of parameters the function has. @@ -65,8 +65,8 @@ typedef CanvasPath Path; // bindings. // If the name does not match a native function, the template will fail to // instatiate, resulting in a compile time error. -// - Resolve the native function pointer associated with an @FfiNative function. -// If there is a mismatch between name or parameter count an @FfiNative is +// - Resolve the native function pointer associated with an @Native function. +// If there is a mismatch between name or parameter count an @Native is // trying to resolve, an exception will be thrown. #define FFI_FUNCTION_LIST(V) \ /* Constructors */ \ @@ -117,7 +117,7 @@ typedef CanvasPath Path; V(DartPluginRegistrant_EnsureInitialized, 0) \ V(Vertices::init, 6) -// List of native instance methods used as @FfiNative functions. +// List of native instance methods used as @Native functions. // Items are tuples of ('class_name', 'method_name', 'parameter_count'), where: // 'class_name' is the name of the class containing the method. // 'method_name' is the name of the method. @@ -129,8 +129,8 @@ typedef CanvasPath Path; // bindings. // If the name does not match a native function, the template will fail to // instatiate, resulting in a compile time error. -// - Resolve the native function pointer associated with an @FfiNative function. -// If there is a mismatch between names or parameter count an @FfiNative is +// - Resolve the native function pointer associated with an @Native function. +// If there is a mismatch between names or parameter count an @Native is // trying to resolve, an exception will be thrown. #define FFI_METHOD_LIST(V) \ V(Canvas, clipPath, 3) \ diff --git a/lib/ui/experiments/scene.dart b/lib/ui/experiments/scene.dart index 73e689b532d62..3f2b2422daf45 100644 --- a/lib/ui/experiments/scene.dart +++ b/lib/ui/experiments/scene.dart @@ -105,25 +105,25 @@ class SceneNode extends NativeFieldWrapperClass1 { }); } - @FfiNative('SceneNode::Create') + @Native(symbol: 'SceneNode::Create') external void _constructor(); - @FfiNative, Handle, Handle)>('SceneNode::initFromAsset') + @Native, Handle, Handle)>(symbol: 'SceneNode::initFromAsset') external String _initFromAsset(String assetKey, _Callback completionCallback); - @FfiNative, Handle)>('SceneNode::initFromTransform') + @Native, Handle)>(symbol: 'SceneNode::initFromTransform') external void _initFromTransform(Float64List matrix4); - @FfiNative, Handle)>('SceneNode::AddChild') + @Native, Handle)>(symbol: 'SceneNode::AddChild') external void _addChild(SceneNode sceneNode); - @FfiNative, Handle)>('SceneNode::SetTransform') + @Native, Handle)>(symbol: 'SceneNode::SetTransform') external void _setTransform(Float64List matrix4); - @FfiNative, Handle, Bool, Bool, Double, Double)>('SceneNode::SetAnimationState') + @Native, Handle, Bool, Bool, Double, Double)>(symbol: 'SceneNode::SetAnimationState') external void _setAnimationState(String animationName, bool playing, bool loop, double weight, double timeScale); - @FfiNative, Handle, Double)>('SceneNode::SeekAnimation') + @Native, Handle, Double)>(symbol: 'SceneNode::SeekAnimation') external void _seekAnimation(String animationName, double time); /// Returns a fresh instance of [SceneShader]. @@ -203,12 +203,12 @@ class SceneShader extends Shader { _dispose(); } - @FfiNative('SceneShader::Create') + @Native(symbol: 'SceneShader::Create') external void _constructor(SceneNode node); - @FfiNative, Handle)>('SceneShader::SetCameraTransform') + @Native, Handle)>(symbol: 'SceneShader::SetCameraTransform') external void _setCameraTransform(Float64List matrix4); - @FfiNative)>('SceneShader::Dispose') + @Native)>(symbol: 'SceneShader::Dispose') external void _dispose(); } diff --git a/lib/ui/isolate_name_server.dart b/lib/ui/isolate_name_server.dart index d19012fe859c3..d2b2f29ccf3c1 100644 --- a/lib/ui/isolate_name_server.dart +++ b/lib/ui/isolate_name_server.dart @@ -70,12 +70,12 @@ class IsolateNameServer { return _removePortNameMapping(name); } - @FfiNative('IsolateNameServerNatives::LookupPortByName') + @Native(symbol: 'IsolateNameServerNatives::LookupPortByName') external static SendPort? _lookupPortByName(String name); - @FfiNative('IsolateNameServerNatives::RegisterPortWithName') + @Native(symbol: 'IsolateNameServerNatives::RegisterPortWithName') external static bool _registerPortWithName(SendPort port, String name); - @FfiNative('IsolateNameServerNatives::RemovePortNameMapping') + @Native(symbol: 'IsolateNameServerNatives::RemovePortNameMapping') external static bool _removePortNameMapping(String name); } diff --git a/lib/ui/natives.dart b/lib/ui/natives.dart index 4fb41bfb41137..6a286fa620d17 100644 --- a/lib/ui/natives.dart +++ b/lib/ui/natives.dart @@ -18,7 +18,7 @@ class DartPluginRegistrant { _ensureInitialized(); } } - @FfiNative('DartPluginRegistrant_EnsureInitialized') + @Native(symbol: 'DartPluginRegistrant_EnsureInitialized') external static void _ensureInitialized(); } @@ -32,10 +32,10 @@ void _printDebug(String arg) { } class _Logger { - @FfiNative('DartRuntimeHooks::Logger_PrintString') + @Native(symbol: 'DartRuntimeHooks::Logger_PrintString') external static void _printString(String? s); - @FfiNative('DartRuntimeHooks::Logger_PrintDebugString') + @Native(symbol: 'DartRuntimeHooks::Logger_PrintDebugString') external static void _printDebugString(String? s); } @@ -108,13 +108,13 @@ List saveCompilationTrace() { throw UnimplementedError(); } -@FfiNative('DartRuntimeHooks::ScheduleMicrotask') +@Native(symbol: 'DartRuntimeHooks::ScheduleMicrotask') external void _scheduleMicrotask(void Function() callback); -@FfiNative('DartRuntimeHooks::GetCallbackHandle') +@Native(symbol: 'DartRuntimeHooks::GetCallbackHandle') external int? _getCallbackHandle(Function closure); -@FfiNative('DartRuntimeHooks::GetCallbackFromHandle') +@Native(symbol: 'DartRuntimeHooks::GetCallbackFromHandle') external Function? _getCallbackFromHandle(int handle); typedef _PrintClosure = void Function(String line); diff --git a/lib/ui/painting.dart b/lib/ui/painting.dart index 85ac21108f97d..e018f6cec270c 100644 --- a/lib/ui/painting.dart +++ b/lib/ui/painting.dart @@ -1879,10 +1879,10 @@ class _Image extends NativeFieldWrapperClass1 { @pragma('vm:entry-point') _Image._(); - @FfiNative)>('Image::width', isLeaf: true) + @Native)>(symbol: 'Image::width', isLeaf: true) external int get width; - @FfiNative)>('Image::height', isLeaf: true) + @Native)>(symbol: 'Image::height', isLeaf: true) external int get height; Future toByteData({ImageByteFormat format = ImageByteFormat.rawRgba}) { @@ -1894,7 +1894,7 @@ class _Image extends NativeFieldWrapperClass1 { } /// Returns an error message on failure, null on success. - @FfiNative, Int32, Handle)>('Image::toByteData') + @Native, Int32, Handle)>(symbol: 'Image::toByteData') external String? _toByteData(int format, _Callback callback); bool _disposed = false; @@ -1913,7 +1913,7 @@ class _Image extends NativeFieldWrapperClass1 { /// This can't be a leaf call because the native function calls Dart API /// (Dart_SetNativeInstanceField). - @FfiNative)>('Image::dispose') + @Native)>(symbol: 'Image::dispose') external void _dispose(); final Set _handles = {}; @@ -2011,7 +2011,7 @@ class Codec extends NativeFieldWrapperClass1 { /// Number of frames in this image. int get frameCount => _cachedFrameCount ??= _frameCount; - @FfiNative)>('Codec::frameCount', isLeaf: true) + @Native)>(symbol: 'Codec::frameCount', isLeaf: true) external int get _frameCount; int? _cachedRepetitionCount; @@ -2021,7 +2021,7 @@ class Codec extends NativeFieldWrapperClass1 { /// * -1 for infinity repetitions. int get repetitionCount => _cachedRepetitionCount ??= _repetitionCount; - @FfiNative)>('Codec::repetitionCount', isLeaf: true) + @Native)>(symbol: 'Codec::repetitionCount', isLeaf: true) external int get _repetitionCount; /// Fetches the next animation frame. @@ -2051,7 +2051,7 @@ class Codec extends NativeFieldWrapperClass1 { } /// Returns an error message on failure, null on success. - @FfiNative, Handle)>('Codec::getNextFrame') + @Native, Handle)>(symbol: 'Codec::getNextFrame') external String? _getNextFrame(void Function(_Image?, int) callback); /// Release the resources used by this object. The object is no longer usable @@ -2059,7 +2059,7 @@ class Codec extends NativeFieldWrapperClass1 { /// /// This can't be a leaf call because the native function calls Dart API /// (Dart_SetNativeInstanceField). - @FfiNative)>('Codec::dispose') + @Native)>(symbol: 'Codec::dispose') external void dispose(); } @@ -2484,7 +2484,7 @@ class EngineLayer extends NativeFieldWrapperClass1 { /// /// This can't be a leaf call because the native function calls Dart API /// (Dart_SetNativeInstanceField). - @FfiNative)>('EngineLayer::dispose') + @Native)>(symbol: 'EngineLayer::dispose') external void dispose(); } @@ -2525,10 +2525,10 @@ class Path extends NativeFieldWrapperClass1 { return clonedPath; } - @FfiNative('Path::Create') + @Native(symbol: 'Path::Create') external void _constructor(); - @FfiNative, Handle)>('Path::clone') + @Native, Handle)>(symbol: 'Path::clone') external void _clone(Path outPath); /// Determines how the interior of this path is calculated. @@ -2537,28 +2537,28 @@ class Path extends NativeFieldWrapperClass1 { PathFillType get fillType => PathFillType.values[_getFillType()]; set fillType(PathFillType value) => _setFillType(value.index); - @FfiNative)>('Path::getFillType', isLeaf: true) + @Native)>(symbol: 'Path::getFillType', isLeaf: true) external int _getFillType(); - @FfiNative, Int32)>('Path::setFillType', isLeaf: true) + @Native, Int32)>(symbol: 'Path::setFillType', isLeaf: true) external void _setFillType(int fillType); /// Starts a new sub-path at the given coordinate. - @FfiNative, Float, Float)>('Path::moveTo', isLeaf: true) + @Native, Float, Float)>(symbol: 'Path::moveTo', isLeaf: true) external void moveTo(double x, double y); /// Starts a new sub-path at the given offset from the current point. - @FfiNative, Float, Float)>('Path::relativeMoveTo', isLeaf: true) + @Native, Float, Float)>(symbol: 'Path::relativeMoveTo', isLeaf: true) external void relativeMoveTo(double dx, double dy); /// Adds a straight line segment from the current point to the given /// point. - @FfiNative, Float, Float)>('Path::lineTo', isLeaf: true) + @Native, Float, Float)>(symbol: 'Path::lineTo', isLeaf: true) external void lineTo(double x, double y); /// Adds a straight line segment from the current point to the point /// at the given offset from the current point. - @FfiNative, Float, Float)>('Path::relativeLineTo', isLeaf: true) + @Native, Float, Float)>(symbol: 'Path::relativeLineTo', isLeaf: true) external void relativeLineTo(double dx, double dy); /// Adds a quadratic bezier segment that curves from the current @@ -2567,14 +2567,14 @@ class Path extends NativeFieldWrapperClass1 { /// /// ![](https://flutter.github.io/assets-for-api-docs/assets/dart-ui/path_quadratic_to.png#gh-light-mode-only) /// ![](https://flutter.github.io/assets-for-api-docs/assets/dart-ui/path_quadratic_to_dark.png#gh-dark-mode-only) - @FfiNative, Float, Float, Float, Float)>('Path::quadraticBezierTo', isLeaf: true) + @Native, Float, Float, Float, Float)>(symbol: 'Path::quadraticBezierTo', isLeaf: true) external void quadraticBezierTo(double x1, double y1, double x2, double y2); /// Adds a quadratic bezier segment that curves from the current /// point to the point at the offset (x2,y2) from the current point, /// using the control point at the offset (x1,y1) from the current /// point. - @FfiNative, Float, Float, Float, Float)>('Path::relativeQuadraticBezierTo', isLeaf: true) + @Native, Float, Float, Float, Float)>(symbol: 'Path::relativeQuadraticBezierTo', isLeaf: true) external void relativeQuadraticBezierTo( double x1, double y1, double x2, double y2); @@ -2584,14 +2584,14 @@ class Path extends NativeFieldWrapperClass1 { /// /// ![](https://flutter.github.io/assets-for-api-docs/assets/dart-ui/path_cubic_to.png#gh-light-mode-only) /// ![](https://flutter.github.io/assets-for-api-docs/assets/dart-ui/path_cubic_to_dark.png#gh-dark-mode-only) - @FfiNative, Float, Float, Float, Float, Float, Float)>('Path::cubicTo', isLeaf: true) + @Native, Float, Float, Float, Float, Float, Float)>(symbol: 'Path::cubicTo', isLeaf: true) external void cubicTo(double x1, double y1, double x2, double y2, double x3, double y3); /// Adds a cubic bezier segment that curves from the current point /// to the point at the offset (x3,y3) from the current point, using /// the control points at the offsets (x1,y1) and (x2,y2) from the /// current point. - @FfiNative, Float, Float, Float, Float, Float, Float)>('Path::relativeCubicTo', isLeaf: true) + @Native, Float, Float, Float, Float, Float, Float)>(symbol: 'Path::relativeCubicTo', isLeaf: true) external void relativeCubicTo(double x1, double y1, double x2, double y2, double x3, double y3); /// Adds a bezier segment that curves from the current point to the @@ -2602,7 +2602,7 @@ class Path extends NativeFieldWrapperClass1 { /// /// ![](https://flutter.github.io/assets-for-api-docs/assets/dart-ui/path_conic_to.png#gh-light-mode-only) /// ![](https://flutter.github.io/assets-for-api-docs/assets/dart-ui/path_conic_to_dark.png#gh-dark-mode-only) - @FfiNative, Float, Float, Float, Float, Float)>('Path::conicTo', isLeaf: true) + @Native, Float, Float, Float, Float, Float)>(symbol: 'Path::conicTo', isLeaf: true) external void conicTo(double x1, double y1, double x2, double y2, double w); /// Adds a bezier segment that curves from the current point to the @@ -2611,7 +2611,7 @@ class Path extends NativeFieldWrapperClass1 { /// the weight w. If the weight is greater than 1, then the curve is /// a hyperbola; if the weight equals 1, it's a parabola; and if it /// is less than 1, it is an ellipse. - @FfiNative, Float, Float, Float, Float, Float)>('Path::relativeConicTo', isLeaf: true) + @Native, Float, Float, Float, Float, Float)>(symbol: 'Path::relativeConicTo', isLeaf: true) external void relativeConicTo(double x1, double y1, double x2, double y2, double w); /// If the `forceMoveTo` argument is false, adds a straight line @@ -2635,7 +2635,7 @@ class Path extends NativeFieldWrapperClass1 { _arcTo(rect.left, rect.top, rect.right, rect.bottom, startAngle, sweepAngle, forceMoveTo); } - @FfiNative, Float, Float, Float, Float, Float, Float, Bool)>('Path::arcTo', isLeaf: true) + @Native, Float, Float, Float, Float, Float, Float, Bool)>(symbol: 'Path::arcTo', isLeaf: true) external void _arcTo(double left, double top, double right, double bottom, double startAngle, double sweepAngle, bool forceMoveTo); /// Appends up to four conic curves weighted to describe an oval of `radius` @@ -2661,7 +2661,7 @@ class Path extends NativeFieldWrapperClass1 { _arcToPoint(arcEnd.dx, arcEnd.dy, radius.x, radius.y, rotation, largeArc, clockwise); } - @FfiNative, Float, Float, Float, Float, Float, Bool, Bool)>('Path::arcToPoint', isLeaf: true) + @Native, Float, Float, Float, Float, Float, Bool, Bool)>(symbol: 'Path::arcToPoint', isLeaf: true) external void _arcToPoint(double arcEndX, double arcEndY, double radiusX, double radiusY, double rotation, bool largeArc, bool clockwise); /// Appends up to four conic curves weighted to describe an oval of `radius` @@ -2690,7 +2690,7 @@ class Path extends NativeFieldWrapperClass1 { _relativeArcToPoint(arcEndDelta.dx, arcEndDelta.dy, radius.x, radius.y, rotation, largeArc, clockwise); } - @FfiNative, Float, Float, Float, Float, Float, Bool, Bool)>('Path::relativeArcToPoint', isLeaf: true) + @Native, Float, Float, Float, Float, Float, Bool, Bool)>(symbol: 'Path::relativeArcToPoint', isLeaf: true) external void _relativeArcToPoint( double arcEndX, double arcEndY, @@ -2707,7 +2707,7 @@ class Path extends NativeFieldWrapperClass1 { _addRect(rect.left, rect.top, rect.right, rect.bottom); } - @FfiNative, Float, Float, Float, Float)>('Path::addRect', isLeaf: true) + @Native, Float, Float, Float, Float)>(symbol: 'Path::addRect', isLeaf: true) external void _addRect(double left, double top, double right, double bottom); /// Adds a new sub-path that consists of a curve that forms the @@ -2720,7 +2720,7 @@ class Path extends NativeFieldWrapperClass1 { _addOval(oval.left, oval.top, oval.right, oval.bottom); } - @FfiNative, Float, Float, Float, Float)>('Path::addOval', isLeaf: true) + @Native, Float, Float, Float, Float)>(symbol: 'Path::addOval', isLeaf: true) external void _addOval(double left, double top, double right, double bottom); /// Adds a new sub-path with one arc segment that consists of the arc @@ -2742,7 +2742,7 @@ class Path extends NativeFieldWrapperClass1 { _addArc(oval.left, oval.top, oval.right, oval.bottom, startAngle, sweepAngle); } - @FfiNative, Float, Float, Float, Float, Float, Float)>('Path::addArc', isLeaf: true) + @Native, Float, Float, Float, Float, Float, Float)>(symbol: 'Path::addArc', isLeaf: true) external void _addArc(double left, double top, double right, double bottom, double startAngle, double sweepAngle); /// Adds a new sub-path with a sequence of line segments that connect the given @@ -2757,7 +2757,7 @@ class Path extends NativeFieldWrapperClass1 { _addPolygon(_encodePointList(points), close); } - @FfiNative, Handle, Bool)>('Path::addPolygon') + @Native, Handle, Bool)>(symbol: 'Path::addPolygon') external void _addPolygon(Float32List points, bool close); /// Adds a new sub-path that consists of the straight lines and @@ -2768,7 +2768,7 @@ class Path extends NativeFieldWrapperClass1 { _addRRect(rrect._getValue32()); } - @FfiNative, Handle)>('Path::addRRect') + @Native, Handle)>(symbol: 'Path::addRRect') external void _addRRect(Float32List rrect); /// Adds the sub-paths of `path`, offset by `offset`, to this path. @@ -2787,10 +2787,10 @@ class Path extends NativeFieldWrapperClass1 { } } - @FfiNative, Pointer, Double, Double)>('Path::addPath') + @Native, Pointer, Double, Double)>(symbol: 'Path::addPath') external void _addPath(Path path, double dx, double dy); - @FfiNative, Pointer, Double, Double, Handle)>('Path::addPathWithMatrix') + @Native, Pointer, Double, Double, Handle)>(symbol: 'Path::addPathWithMatrix') external void _addPathWithMatrix(Path path, double dx, double dy, Float64List matrix); /// Adds the sub-paths of `path`, offset by `offset`, to this path. @@ -2811,21 +2811,21 @@ class Path extends NativeFieldWrapperClass1 { } } - @FfiNative, Pointer, Double, Double)>('Path::extendWithPath') + @Native, Pointer, Double, Double)>(symbol: 'Path::extendWithPath') external void _extendWithPath(Path path, double dx, double dy); - @FfiNative, Pointer, Double, Double, Handle)>('Path::extendWithPathAndMatrix') + @Native, Pointer, Double, Double, Handle)>(symbol: 'Path::extendWithPathAndMatrix') external void _extendWithPathAndMatrix(Path path, double dx, double dy, Float64List matrix); /// Closes the last sub-path, as if a straight line had been drawn /// from the current point to the first point of the sub-path. - @FfiNative)>('Path::close', isLeaf: true) + @Native)>(symbol: 'Path::close', isLeaf: true) external void close(); /// Clears the [Path] object of all sub-paths, returning it to the /// same state it had when it was created. The _current point_ is /// reset to the origin. - @FfiNative)>('Path::reset', isLeaf: true) + @Native)>(symbol: 'Path::reset', isLeaf: true) external void reset(); /// Tests to see if the given point is within the path. (That is, whether the @@ -2840,7 +2840,7 @@ class Path extends NativeFieldWrapperClass1 { return _contains(point.dx, point.dy); } - @FfiNative, Double, Double)>('Path::contains', isLeaf: true) + @Native, Double, Double)>(symbol: 'Path::contains', isLeaf: true) external bool _contains(double x, double y); /// Returns a copy of the path with all the segments of every @@ -2852,7 +2852,7 @@ class Path extends NativeFieldWrapperClass1 { return path; } - @FfiNative, Handle, Double, Double)>('Path::shift') + @Native, Handle, Double, Double)>(symbol: 'Path::shift') external void _shift(Path outPath, double dx, double dy); /// Returns a copy of the path with all the segments of every @@ -2864,7 +2864,7 @@ class Path extends NativeFieldWrapperClass1 { return path; } - @FfiNative, Handle, Handle)>('Path::transform') + @Native, Handle, Handle)>(symbol: 'Path::transform') external void _transform(Path outPath, Float64List matrix4); /// Computes the bounding rectangle for this path. @@ -2887,7 +2887,7 @@ class Path extends NativeFieldWrapperClass1 { return Rect.fromLTRB(rect[0], rect[1], rect[2], rect[3]); } - @FfiNative)>('Path::getBounds') + @Native)>(symbol: 'Path::getBounds') external Float32List _getBounds(); /// Combines the two paths according to the manner specified by the given @@ -2906,7 +2906,7 @@ class Path extends NativeFieldWrapperClass1 { throw StateError('Path.combine() failed. This may be due an invalid path; in particular, check for NaN values.'); } - @FfiNative, Pointer, Pointer, Int32)>('Path::op') + @Native, Pointer, Pointer, Int32)>(symbol: 'Path::op') external bool _op(Path path1, Path path2, int operation); /// Creates a [PathMetrics] object for this path, which can describe various @@ -3132,7 +3132,7 @@ class _PathMeasure extends NativeFieldWrapperClass1 { _constructor(path, forceClosed); } - @FfiNative, Bool)>('PathMeasure::Create') + @Native, Bool)>(symbol: 'PathMeasure::Create') external void _constructor(Path path, bool forceClosed); double length(int contourIndex) { @@ -3140,7 +3140,7 @@ class _PathMeasure extends NativeFieldWrapperClass1 { return _length(contourIndex); } - @FfiNative, Int32)>('PathMeasure::getLength', isLeaf: true) + @Native, Int32)>(symbol: 'PathMeasure::getLength', isLeaf: true) external double _length(int contourIndex); Tangent? getTangentForOffset(int contourIndex, double distance) { @@ -3158,7 +3158,7 @@ class _PathMeasure extends NativeFieldWrapperClass1 { } } - @FfiNative, Int32, Float)>('PathMeasure::getPosTan') + @Native, Int32, Float)>(symbol: 'PathMeasure::getPosTan') external Float32List _getPosTan(int contourIndex, double distance); Path extractPath(int contourIndex, double start, double end, @@ -3169,7 +3169,7 @@ class _PathMeasure extends NativeFieldWrapperClass1 { return path; } - @FfiNative, Handle, Int32, Float, Float, Bool)>('PathMeasure::getSegment') + @Native, Handle, Int32, Float, Float, Bool)>(symbol: 'PathMeasure::getSegment') external void _extractPath(Path outPath, int contourIndex, double start, double end, bool startWithMoveTo); bool isClosed(int contourIndex) { @@ -3177,7 +3177,7 @@ class _PathMeasure extends NativeFieldWrapperClass1 { return _isClosed(contourIndex); } - @FfiNative, Int32)>('PathMeasure::isClosed', isLeaf: true) + @Native, Int32)>(symbol: 'PathMeasure::isClosed', isLeaf: true) external bool _isClosed(int contourIndex); // Move to the next contour in the path. @@ -3192,7 +3192,7 @@ class _PathMeasure extends NativeFieldWrapperClass1 { return next; } - @FfiNative)>('PathMeasure::nextContour', isLeaf: true) + @Native)>(symbol: 'PathMeasure::nextContour', isLeaf: true) external bool _nativeNextContour(); /// The index of the current contour in the list of contours in the path. @@ -3502,19 +3502,19 @@ class _ColorFilter extends NativeFieldWrapperClass1 { /// the values used for the filter. final ColorFilter creator; - @FfiNative('ColorFilter::Create') + @Native(symbol: 'ColorFilter::Create') external void _constructor(); - @FfiNative, Int32, Int32)>('ColorFilter::initMode', isLeaf: true) + @Native, Int32, Int32)>(symbol: 'ColorFilter::initMode', isLeaf: true) external void _initMode(int color, int blendMode); - @FfiNative, Handle)>('ColorFilter::initMatrix') + @Native, Handle)>(symbol: 'ColorFilter::initMatrix') external void _initMatrix(Float32List matrix); - @FfiNative)>('ColorFilter::initLinearToSrgbGamma', isLeaf: true) + @Native)>(symbol: 'ColorFilter::initLinearToSrgbGamma', isLeaf: true) external void _initLinearToSrgbGamma(); - @FfiNative)>('ColorFilter::initSrgbToLinearGamma', isLeaf: true) + @Native)>(symbol: 'ColorFilter::initSrgbToLinearGamma', isLeaf: true) external void _initSrgbToLinearGamma(); } @@ -3815,25 +3815,25 @@ class _ImageFilter extends NativeFieldWrapperClass1 { _initComposed(nativeFilterOuter, nativeFilterInner); } - @FfiNative('ImageFilter::Create') + @Native(symbol: 'ImageFilter::Create') external void _constructor(); - @FfiNative, Double, Double, Int32)>('ImageFilter::initBlur', isLeaf: true) + @Native, Double, Double, Int32)>(symbol: 'ImageFilter::initBlur', isLeaf: true) external void _initBlur(double sigmaX, double sigmaY, int tileMode); - @FfiNative, Double, Double)>('ImageFilter::initDilate', isLeaf: true) + @Native, Double, Double)>(symbol: 'ImageFilter::initDilate', isLeaf: true) external void _initDilate(double radiusX, double radiusY); - @FfiNative, Double, Double)>('ImageFilter::initErode', isLeaf: true) + @Native, Double, Double)>(symbol: 'ImageFilter::initErode', isLeaf: true) external void _initErode(double radiusX, double radiusY); - @FfiNative, Handle, Int32)>('ImageFilter::initMatrix') + @Native, Handle, Int32)>(symbol: 'ImageFilter::initMatrix') external void _initMatrix(Float64List matrix4, int filterQuality); - @FfiNative, Pointer)>('ImageFilter::initColorFilter') + @Native, Pointer)>(symbol: 'ImageFilter::initColorFilter') external void _initColorFilter(_ColorFilter? colorFilter); - @FfiNative, Pointer, Pointer)>('ImageFilter::initComposeFilter') + @Native, Pointer, Pointer)>(symbol: 'ImageFilter::initComposeFilter') external void _initComposed(_ImageFilter outerFilter, _ImageFilter innerFilter); /// The original Dart object that created the native wrapper, which retains @@ -4169,13 +4169,13 @@ class Gradient extends Shader { _initSweep(center.dx, center.dy, colorsBuffer, colorStopsBuffer, tileMode.index, startAngle, endAngle, matrix4); } - @FfiNative('Gradient::Create') + @Native(symbol: 'Gradient::Create') external void _constructor(); - @FfiNative, Handle, Handle, Handle, Int32, Handle)>('Gradient::initLinear') + @Native, Handle, Handle, Handle, Int32, Handle)>(symbol: 'Gradient::initLinear') external void _initLinear(Float32List endPoints, Int32List colors, Float32List? colorStops, int tileMode, Float64List? matrix4); - @FfiNative, Double, Double, Double, Handle, Handle, Int32, Handle)>('Gradient::initRadial') + @Native, Double, Double, Double, Handle, Handle, Int32, Handle)>(symbol: 'Gradient::initRadial') external void _initRadial( double centerX, double centerY, @@ -4185,8 +4185,7 @@ class Gradient extends Shader { int tileMode, Float64List? matrix4); - @FfiNative, Double, Double, Double, Double, Double, Double, Handle, Handle, Int32, Handle)>( - 'Gradient::initTwoPointConical') + @Native, Double, Double, Double, Double, Double, Double, Handle, Handle, Int32, Handle)>(symbol: 'Gradient::initTwoPointConical') external void _initConical( double startX, double startY, @@ -4199,7 +4198,7 @@ class Gradient extends Shader { int tileMode, Float64List? matrix4); - @FfiNative, Double, Double, Handle, Handle, Int32, Double, Double, Handle)>('Gradient::initSweep') + @Native, Double, Double, Handle, Handle, Int32, Double, Double, Handle)>(symbol: 'Gradient::initSweep') external void _initSweep( double centerX, double centerY, @@ -4271,15 +4270,15 @@ class ImageShader extends Shader { _dispose(); } - @FfiNative('ImageShader::Create') + @Native(symbol: 'ImageShader::Create') external void _constructor(); - @FfiNative, Pointer, Int32, Int32, Int32, Handle)>('ImageShader::initWithImage') + @Native, Pointer, Int32, Int32, Int32, Handle)>(symbol: 'ImageShader::initWithImage') external String? _initWithImage(_Image image, int tmx, int tmy, int filterQualityIndex, Float64List matrix4); /// This can't be a leaf call because the native function calls Dart API /// (Dart_SetNativeInstanceField). - @FfiNative)>('ImageShader::dispose') + @Native)>(symbol: 'ImageShader::dispose') external void _dispose(); } @@ -4362,10 +4361,10 @@ class FragmentProgram extends NativeFieldWrapperClass1 { @pragma('vm:entry-point') late int _samplerCount; - @FfiNative('FragmentProgram::Create') + @Native(symbol: 'FragmentProgram::Create') external void _constructor(); - @FfiNative, Handle)>('FragmentProgram::initFromAsset') + @Native, Handle)>(symbol: 'FragmentProgram::initFromAsset') external String _initFromAsset(String assetKey); /// Returns a fresh instance of [FragmentShader]. @@ -4471,16 +4470,16 @@ class FragmentShader extends Shader { _dispose(); } - @FfiNative('ReusableFragmentShader::Create') + @Native(symbol: 'ReusableFragmentShader::Create') external Float32List _constructor(FragmentProgram program, int floatUniforms, int samplerUniforms); - @FfiNative, Handle, Handle)>('ReusableFragmentShader::SetImageSampler') + @Native, Handle, Handle)>(symbol: 'ReusableFragmentShader::SetImageSampler') external void _setImageSampler(int index, _Image sampler); - @FfiNative)>('ReusableFragmentShader::ValidateSamplers') + @Native)>(symbol: 'ReusableFragmentShader::ValidateSamplers') external bool _validateSamplers(); - @FfiNative)>('ReusableFragmentShader::Dispose') + @Native)>(symbol: 'ReusableFragmentShader::Dispose') external void _dispose(); } @@ -4701,7 +4700,7 @@ class Vertices extends NativeFieldWrapperClass1 { } } - @FfiNative('Vertices::init') + @Native(symbol: 'Vertices::init') external static bool _init(Vertices outVertices, int mode, Float32List positions, @@ -4722,7 +4721,7 @@ class Vertices extends NativeFieldWrapperClass1 { /// This can't be a leaf call because the native function calls Dart API /// (Dart_SetNativeInstanceField). - @FfiNative)>('Vertices::dispose') + @Native)>(symbol: 'Vertices::dispose') external void _dispose(); bool _disposed = false; @@ -4824,7 +4823,7 @@ class Canvas extends NativeFieldWrapperClass1 { _constructor(recorder, cullRect.left, cullRect.top, cullRect.right, cullRect.bottom); } - @FfiNative, Double, Double, Double, Double)>('Canvas::Create') + @Native, Double, Double, Double, Double)>(symbol: 'Canvas::Create') external void _constructor(PictureRecorder recorder, double left, double top, double right, double bottom); // The underlying Skia SkCanvas is owned by the PictureRecorder used to create this Canvas. @@ -4840,7 +4839,7 @@ class Canvas extends NativeFieldWrapperClass1 { /// /// * [saveLayer], which does the same thing but additionally also groups the /// commands done until the matching [restore]. - @FfiNative)>('Canvas::save', isLeaf: true) + @Native)>(symbol: 'Canvas::save', isLeaf: true) external void save(); /// Saves a copy of the current transform and clip on the save stack, and then @@ -4962,10 +4961,10 @@ class Canvas extends NativeFieldWrapperClass1 { } } - @FfiNative, Handle, Handle)>('Canvas::saveLayerWithoutBounds') + @Native, Handle, Handle)>(symbol: 'Canvas::saveLayerWithoutBounds') external void _saveLayerWithoutBounds(List? paintObjects, ByteData paintData); - @FfiNative, Double, Double, Double, Double, Handle, Handle)>('Canvas::saveLayer') + @Native, Double, Double, Double, Double, Handle, Handle)>(symbol: 'Canvas::saveLayer') external void _saveLayer(double left, double top, double right, double bottom, List? paintObjects, ByteData paintData); /// Pops the current save stack, if there is anything to pop. @@ -4975,7 +4974,7 @@ class Canvas extends NativeFieldWrapperClass1 { /// /// If the state was pushed with with [saveLayer], then this call will also /// cause the new layer to be composited into the previous layer. - @FfiNative)>('Canvas::restore', isLeaf: true) + @Native)>(symbol: 'Canvas::restore', isLeaf: true) external void restore(); /// Restores the save stack to a previous level as might be obtained from [getSaveCount]. @@ -4987,7 +4986,7 @@ class Canvas extends NativeFieldWrapperClass1 { /// If any of the state stack levels restored by this call were pushed with /// [saveLayer], then this call will also cause those layers to be composited /// into their previous layers. - @FfiNative, Int32)>('Canvas::restoreToCount', isLeaf: true) + @Native, Int32)>(symbol: 'Canvas::restoreToCount', isLeaf: true) external void restoreToCount(int count); /// Returns the number of items on the save stack, including the @@ -4996,12 +4995,12 @@ class Canvas extends NativeFieldWrapperClass1 { /// each matching call to [restore] decrements it. /// /// This number cannot go below 1. - @FfiNative)>('Canvas::getSaveCount', isLeaf: true) + @Native)>(symbol: 'Canvas::getSaveCount', isLeaf: true) external int getSaveCount(); /// Add a translation to the current transform, shifting the coordinate space /// horizontally by the first argument and vertically by the second argument. - @FfiNative, Double, Double)>('Canvas::translate', isLeaf: true) + @Native, Double, Double)>(symbol: 'Canvas::translate', isLeaf: true) external void translate(double dx, double dy); /// Add an axis-aligned scale to the current transform, scaling by the first @@ -5012,18 +5011,18 @@ class Canvas extends NativeFieldWrapperClass1 { /// directions. void scale(double sx, [double? sy]) => _scale(sx, sy ?? sx); - @FfiNative, Double, Double)>('Canvas::scale', isLeaf: true) + @Native, Double, Double)>(symbol: 'Canvas::scale', isLeaf: true) external void _scale(double sx, double sy); /// Add a rotation to the current transform. The argument is in radians clockwise. - @FfiNative, Double)>('Canvas::rotate', isLeaf: true) + @Native, Double)>(symbol: 'Canvas::rotate', isLeaf: true) external void rotate(double radians); /// Add an axis-aligned skew to the current transform, with the first argument /// being the horizontal skew in rise over run units clockwise around the /// origin, and the second argument being the vertical skew in rise over run /// units clockwise around the origin. - @FfiNative, Double, Double)>('Canvas::skew', isLeaf: true) + @Native, Double, Double)>(symbol: 'Canvas::skew', isLeaf: true) external void skew(double sx, double sy); /// Multiply the current transform by the specified 4⨉4 transformation matrix @@ -5036,7 +5035,7 @@ class Canvas extends NativeFieldWrapperClass1 { _transform(matrix4); } - @FfiNative, Handle)>('Canvas::transform') + @Native, Handle)>(symbol: 'Canvas::transform') external void _transform(Float64List matrix4); /// Returns the current transform including the combined result of all transform @@ -5053,7 +5052,7 @@ class Canvas extends NativeFieldWrapperClass1 { return matrix4; } - @FfiNative, Handle)>('Canvas::getTransform') + @Native, Handle)>(symbol: 'Canvas::getTransform') external void _getTransform(Float64List matrix4); /// Reduces the clip region to the intersection of the current clip and the @@ -5076,7 +5075,7 @@ class Canvas extends NativeFieldWrapperClass1 { _clipRect(rect.left, rect.top, rect.right, rect.bottom, clipOp.index, doAntiAlias); } - @FfiNative, Double, Double, Double, Double, Int32, Bool)>('Canvas::clipRect', isLeaf: true) + @Native, Double, Double, Double, Double, Int32, Bool)>(symbol: 'Canvas::clipRect', isLeaf: true) external void _clipRect(double left, double top, double right, double bottom, int clipOp, bool doAntiAlias); /// Reduces the clip region to the intersection of the current clip and the @@ -5095,7 +5094,7 @@ class Canvas extends NativeFieldWrapperClass1 { _clipRRect(rrect._getValue32(), doAntiAlias); } - @FfiNative, Handle, Bool)>('Canvas::clipRRect') + @Native, Handle, Bool)>(symbol: 'Canvas::clipRRect') external void _clipRRect(Float32List rrect, bool doAntiAlias); /// Reduces the clip region to the intersection of the current clip and the @@ -5114,7 +5113,7 @@ class Canvas extends NativeFieldWrapperClass1 { _clipPath(path, doAntiAlias); } - @FfiNative, Pointer, Bool)>('Canvas::clipPath') + @Native, Pointer, Bool)>(symbol: 'Canvas::clipPath') external void _clipPath(Path path, bool doAntiAlias); /// Returns the conservative bounds of the combined result of all clip methods @@ -5175,7 +5174,7 @@ class Canvas extends NativeFieldWrapperClass1 { return Rect.fromLTRB(bounds[0], bounds[1], bounds[2], bounds[3]); } - @FfiNative, Handle)>('Canvas::getLocalClipBounds') + @Native, Handle)>(symbol: 'Canvas::getLocalClipBounds') external void _getLocalClipBounds(Float64List bounds); /// Returns the conservative bounds of the combined result of all clip methods @@ -5198,7 +5197,7 @@ class Canvas extends NativeFieldWrapperClass1 { return Rect.fromLTRB(bounds[0], bounds[1], bounds[2], bounds[3]); } - @FfiNative, Handle)>('Canvas::getDestinationClipBounds') + @Native, Handle)>(symbol: 'Canvas::getDestinationClipBounds') external void _getDestinationClipBounds(Float64List bounds); /// Paints the given [Color] onto the canvas, applying the given @@ -5210,7 +5209,7 @@ class Canvas extends NativeFieldWrapperClass1 { _drawColor(color.value, blendMode.index); } - @FfiNative, Uint32, Int32)>('Canvas::drawColor', isLeaf: true) + @Native, Uint32, Int32)>(symbol: 'Canvas::drawColor', isLeaf: true) external void _drawColor(int color, int blendMode); /// Draws a line between the given points using the given paint. The line is @@ -5227,7 +5226,7 @@ class Canvas extends NativeFieldWrapperClass1 { _drawLine(p1.dx, p1.dy, p2.dx, p2.dy, paint._objects, paint._data); } - @FfiNative, Double, Double, Double, Double, Handle, Handle)>('Canvas::drawLine') + @Native, Double, Double, Double, Double, Handle, Handle)>(symbol: 'Canvas::drawLine') external void _drawLine(double x1, double y1, double x2, double y2, List? paintObjects, ByteData paintData); /// Fills the canvas with the given [Paint]. @@ -5239,7 +5238,7 @@ class Canvas extends NativeFieldWrapperClass1 { _drawPaint(paint._objects, paint._data); } - @FfiNative, Handle, Handle)>('Canvas::drawPaint') + @Native, Handle, Handle)>(symbol: 'Canvas::drawPaint') external void _drawPaint(List? paintObjects, ByteData paintData); /// Draws a rectangle with the given [Paint]. Whether the rectangle is filled @@ -5253,7 +5252,7 @@ class Canvas extends NativeFieldWrapperClass1 { _drawRect(rect.left, rect.top, rect.right, rect.bottom, paint._objects, paint._data); } - @FfiNative, Double, Double, Double, Double, Handle, Handle)>('Canvas::drawRect') + @Native, Double, Double, Double, Double, Handle, Handle)>(symbol: 'Canvas::drawRect') external void _drawRect(double left, double top, double right, double bottom, List? paintObjects, ByteData paintData); /// Draws a rounded rectangle with the given [Paint]. Whether the rectangle is @@ -5267,7 +5266,7 @@ class Canvas extends NativeFieldWrapperClass1 { _drawRRect(rrect._getValue32(), paint._objects, paint._data); } - @FfiNative, Handle, Handle, Handle)>('Canvas::drawRRect') + @Native, Handle, Handle, Handle)>(symbol: 'Canvas::drawRRect') external void _drawRRect(Float32List rrect, List? paintObjects, ByteData paintData); /// Draws a shape consisting of the difference between two rounded rectangles @@ -5282,7 +5281,7 @@ class Canvas extends NativeFieldWrapperClass1 { _drawDRRect(outer._getValue32(), inner._getValue32(), paint._objects, paint._data); } - @FfiNative, Handle, Handle, Handle, Handle)>('Canvas::drawDRRect') + @Native, Handle, Handle, Handle, Handle)>(symbol: 'Canvas::drawDRRect') external void _drawDRRect(Float32List outer, Float32List inner, List? paintObjects, ByteData paintData); /// Draws an axis-aligned oval that fills the given axis-aligned rectangle @@ -5297,7 +5296,7 @@ class Canvas extends NativeFieldWrapperClass1 { _drawOval(rect.left, rect.top, rect.right, rect.bottom, paint._objects, paint._data); } - @FfiNative, Double, Double, Double, Double, Handle, Handle)>('Canvas::drawOval') + @Native, Double, Double, Double, Double, Handle, Handle)>(symbol: 'Canvas::drawOval') external void _drawOval(double left, double top, double right, double bottom, List? paintObjects, ByteData paintData); /// Draws a circle centered at the point given by the first argument and @@ -5313,7 +5312,7 @@ class Canvas extends NativeFieldWrapperClass1 { _drawCircle(c.dx, c.dy, radius, paint._objects, paint._data); } - @FfiNative, Double, Double, Double, Handle, Handle)>('Canvas::drawCircle') + @Native, Double, Double, Double, Handle, Handle)>(symbol: 'Canvas::drawCircle') external void _drawCircle(double x, double y, double radius, List? paintObjects, ByteData paintData); /// Draw an arc scaled to fit inside the given rectangle. @@ -5336,7 +5335,7 @@ class Canvas extends NativeFieldWrapperClass1 { _drawArc(rect.left, rect.top, rect.right, rect.bottom, startAngle, sweepAngle, useCenter, paint._objects, paint._data); } - @FfiNative, Double, Double, Double, Double, Double, Double, Bool, Handle, Handle)>('Canvas::drawArc') + @Native, Double, Double, Double, Double, Double, Double, Bool, Handle, Handle)>(symbol: 'Canvas::drawArc') external void _drawArc( double left, double top, @@ -5359,7 +5358,7 @@ class Canvas extends NativeFieldWrapperClass1 { _drawPath(path, paint._objects, paint._data); } - @FfiNative, Pointer, Handle, Handle)>('Canvas::drawPath') + @Native, Pointer, Handle, Handle)>(symbol: 'Canvas::drawPath') external void _drawPath(Path path, List? paintObjects, ByteData paintData); /// Draws the given [Image] into the canvas with its top-left corner at the @@ -5375,7 +5374,7 @@ class Canvas extends NativeFieldWrapperClass1 { } } - @FfiNative, Pointer, Double, Double, Handle, Handle, Int32)>('Canvas::drawImage') + @Native, Pointer, Double, Double, Handle, Handle, Int32)>(symbol: 'Canvas::drawImage') external String? _drawImage(_Image image, double x, double y, List? paintObjects, ByteData paintData, int filterQualityIndex); /// Draws the subset of the given image described by the `src` argument into @@ -5410,7 +5409,7 @@ class Canvas extends NativeFieldWrapperClass1 { } } - @FfiNative, Pointer, Double, Double, Double, Double, Double, Double, Double, Double, Handle, Handle, Int32)>('Canvas::drawImageRect') + @Native, Pointer, Double, Double, Double, Double, Double, Double, Double, Double, Handle, Handle, Int32)>(symbol: 'Canvas::drawImageRect') external String? _drawImageRect( _Image image, double srcLeft, @@ -5461,7 +5460,7 @@ class Canvas extends NativeFieldWrapperClass1 { } } - @FfiNative, Pointer, Double, Double, Double, Double, Double, Double, Double, Double, Handle, Handle, Int32)>('Canvas::drawImageNine') + @Native, Pointer, Double, Double, Double, Double, Double, Double, Double, Double, Handle, Handle, Int32)>(symbol: 'Canvas::drawImageNine') external String? _drawImageNine( _Image image, double centerLeft, @@ -5484,7 +5483,7 @@ class Canvas extends NativeFieldWrapperClass1 { _drawPicture(picture); } - @FfiNative, Pointer)>('Canvas::drawPicture') + @Native, Pointer)>(symbol: 'Canvas::drawPicture') external void _drawPicture(Picture picture); /// Draws the text in the given [Paragraph] into this canvas at the given @@ -5555,7 +5554,7 @@ class Canvas extends NativeFieldWrapperClass1 { _drawPoints(paint._objects, paint._data, pointMode.index, points); } - @FfiNative, Handle, Handle, Int32, Handle)>('Canvas::drawPoints') + @Native, Handle, Handle, Int32, Handle)>(symbol: 'Canvas::drawPoints') external void _drawPoints(List? paintObjects, ByteData paintData, int pointMode, Float32List points); /// Draws a set of [Vertices] onto the canvas as one or more triangles. @@ -5594,7 +5593,7 @@ class Canvas extends NativeFieldWrapperClass1 { _drawVertices(vertices, blendMode.index, paint._objects, paint._data); } - @FfiNative, Pointer, Int32, Handle, Handle)>('Canvas::drawVertices') + @Native, Pointer, Int32, Handle, Handle)>(symbol: 'Canvas::drawVertices') external void _drawVertices(Vertices vertices, int blendMode, List? paintObjects, ByteData paintData); /// Draws many parts of an image - the [atlas] - onto the canvas. @@ -5967,7 +5966,7 @@ class Canvas extends NativeFieldWrapperClass1 { } } - @FfiNative, Handle, Handle, Int32, Pointer, Handle, Handle, Handle, Int32, Handle)>('Canvas::drawAtlas') + @Native, Handle, Handle, Int32, Pointer, Handle, Handle, Handle, Int32, Handle)>(symbol: 'Canvas::drawAtlas') external String? _drawAtlas( List? paintObjects, ByteData paintData, @@ -5992,7 +5991,7 @@ class Canvas extends NativeFieldWrapperClass1 { _drawShadow(path, color.value, elevation, transparentOccluder); } - @FfiNative, Pointer, Uint32, Double, Bool)>('Canvas::drawShadow') + @Native, Pointer, Uint32, Double, Bool)>(symbol: 'Canvas::drawShadow') external void _drawShadow(Path path, int color, double elevation, bool transparentOccluder); } @@ -6050,7 +6049,7 @@ class Picture extends NativeFieldWrapperClass1 { ); } - @FfiNative, Uint32, Uint32, Handle)>('Picture::toImage') + @Native, Uint32, Uint32, Handle)>(symbol: 'Picture::toImage') external String? _toImage(int width, int height, void Function(_Image?) callback); /// Synchronously creates a handle to an image of this picture. @@ -6081,7 +6080,7 @@ class Picture extends NativeFieldWrapperClass1 { return Image._(image, image.width, image.height); } - @FfiNative, Uint32, Uint32, Handle)>('Picture::toImageSync') + @Native, Uint32, Uint32, Handle)>(symbol: 'Picture::toImageSync') external void _toImageSync(int width, int height, _Image outImage); /// Release the resources used by this object. The object is no longer usable @@ -6098,7 +6097,7 @@ class Picture extends NativeFieldWrapperClass1 { /// This can't be a leaf call because the native function calls Dart API /// (Dart_SetNativeInstanceField). - @FfiNative)>('Picture::dispose') + @Native)>(symbol: 'Picture::dispose') external void _dispose(); bool _disposed = false; @@ -6119,7 +6118,7 @@ class Picture extends NativeFieldWrapperClass1 { /// /// The actual size of this picture may be larger, particularly if it contains /// references to image or other large objects. - @FfiNative)>('Picture::GetAllocationSize', isLeaf: true) + @Native)>(symbol: 'Picture::GetAllocationSize', isLeaf: true) external int get approximateBytesUsed; } @@ -6134,7 +6133,7 @@ class PictureRecorder extends NativeFieldWrapperClass1 { @pragma('vm:entry-point') PictureRecorder() { _constructor(); } - @FfiNative('PictureRecorder::Create') + @Native(symbol: 'PictureRecorder::Create') external void _constructor(); /// Whether this object is currently recording commands. @@ -6165,7 +6164,7 @@ class PictureRecorder extends NativeFieldWrapperClass1 { return picture; } - @FfiNative, Handle)>('PictureRecorder::endRecording') + @Native, Handle)>(symbol: 'PictureRecorder::endRecording') external void _endRecording(Picture outPicture); Canvas? _canvas; @@ -6426,13 +6425,13 @@ class ImmutableBuffer extends NativeFieldWrapperClass1 { }); } - @FfiNative('ImmutableBuffer::init') + @Native(symbol: 'ImmutableBuffer::init') external String? _init(Uint8List list, _Callback callback); - @FfiNative('ImmutableBuffer::initFromAsset') + @Native(symbol: 'ImmutableBuffer::initFromAsset') external String? _initFromAsset(String assetKey, _Callback callback); - @FfiNative('ImmutableBuffer::initFromFile') + @Native(symbol: 'ImmutableBuffer::initFromFile') external String? _initFromFile(String assetKey, _Callback callback); /// The length, in bytes, of the underlying data. @@ -6473,7 +6472,7 @@ class ImmutableBuffer extends NativeFieldWrapperClass1 { /// This can't be a leaf call because the native function calls Dart API /// (Dart_SetNativeInstanceField). - @FfiNative)>('ImmutableBuffer::dispose') + @Native)>(symbol: 'ImmutableBuffer::dispose') external void _dispose(); } @@ -6516,15 +6515,15 @@ class ImageDescriptor extends NativeFieldWrapperClass1 { }).then((_) => descriptor); } - @FfiNative, Handle)>('ImageDescriptor::initEncoded') + @Native, Handle)>(symbol: 'ImageDescriptor::initEncoded') external String? _initEncoded(ImmutableBuffer buffer, _Callback callback); - @FfiNative('ImageDescriptor::initRaw') + @Native(symbol: 'ImageDescriptor::initRaw') external static void _initRaw(ImageDescriptor outDescriptor, ImmutableBuffer buffer, int width, int height, int rowBytes, int pixelFormat); int? _width; - @FfiNative)>('ImageDescriptor::width', isLeaf: true) + @Native)>(symbol: 'ImageDescriptor::width', isLeaf: true) external int _getWidth(); /// The width, in pixels, of the image. @@ -6534,7 +6533,7 @@ class ImageDescriptor extends NativeFieldWrapperClass1 { int? _height; - @FfiNative)>('ImageDescriptor::height', isLeaf: true) + @Native)>(symbol: 'ImageDescriptor::height', isLeaf: true) external int _getHeight(); /// The height, in pixels, of the image. @@ -6544,7 +6543,7 @@ class ImageDescriptor extends NativeFieldWrapperClass1 { int? _bytesPerPixel; - @FfiNative)>('ImageDescriptor::bytesPerPixel', isLeaf: true) + @Native)>(symbol: 'ImageDescriptor::bytesPerPixel', isLeaf: true) external int _getBytesPerPixel(); /// The number of bytes per pixel in the image. @@ -6557,7 +6556,7 @@ class ImageDescriptor extends NativeFieldWrapperClass1 { /// /// This can't be a leaf call because the native function calls Dart API /// (Dart_SetNativeInstanceField). - @FfiNative)>('ImageDescriptor::dispose') + @Native)>(symbol: 'ImageDescriptor::dispose') external void dispose(); /// Creates a [Codec] object which is suitable for decoding the data in the @@ -6595,7 +6594,7 @@ class ImageDescriptor extends NativeFieldWrapperClass1 { return codec; } - @FfiNative, Handle, Int32, Int32)>('ImageDescriptor::instantiateCodec') + @Native, Handle, Int32, Int32)>(symbol: 'ImageDescriptor::instantiateCodec') external void _instantiateCodec(Codec outCodec, int targetWidth, int targetHeight); } diff --git a/lib/ui/platform_dispatcher.dart b/lib/ui/platform_dispatcher.dart index b3b4de7369012..9cce6b368a735 100644 --- a/lib/ui/platform_dispatcher.dart +++ b/lib/ui/platform_dispatcher.dart @@ -87,7 +87,7 @@ class RootIsolateToken { return token == 0 ? null : RootIsolateToken._(token); }(); - @FfiNative('PlatformConfigurationNativeApi::GetRootIsolateToken') + @Native(symbol: 'PlatformConfigurationNativeApi::GetRootIsolateToken') external static int __getRootIsolateToken(); } @@ -520,7 +520,7 @@ class PlatformDispatcher { void _nativeSetNeedsReportTimings(bool value) => __nativeSetNeedsReportTimings(value); - @FfiNative('PlatformConfigurationNativeApi::SetNeedsReportTimings') + @Native(symbol: 'PlatformConfigurationNativeApi::SetNeedsReportTimings') external static void __nativeSetNeedsReportTimings(bool value); // Called from the engine, via hooks.dart @@ -553,7 +553,7 @@ class PlatformDispatcher { String? _sendPlatformMessage(String name, PlatformMessageResponseCallback? callback, ByteData? data) => __sendPlatformMessage(name, callback, data); - @FfiNative('PlatformConfigurationNativeApi::SendPlatformMessage') + @Native(symbol: 'PlatformConfigurationNativeApi::SendPlatformMessage') external static String? __sendPlatformMessage(String name, PlatformMessageResponseCallback? callback, ByteData? data); /// Sends a message to a platform-specific plugin via a [SendPort]. @@ -579,7 +579,7 @@ class PlatformDispatcher { String? _sendPortPlatformMessage(String name, int identifier, int port, ByteData? data) => __sendPortPlatformMessage(name, identifier, port, data); - @FfiNative('PlatformConfigurationNativeApi::SendPortPlatformMessage') + @Native(symbol: 'PlatformConfigurationNativeApi::SendPortPlatformMessage') external static String? __sendPortPlatformMessage(String name, int identifier, int port, ByteData? data); /// Registers the current isolate with the isolate identified with by the @@ -589,7 +589,7 @@ class PlatformDispatcher { DartPluginRegistrant.ensureInitialized(); __registerBackgroundIsolate(token._token); } - @FfiNative('PlatformConfigurationNativeApi::RegisterBackgroundIsolate') + @Native(symbol: 'PlatformConfigurationNativeApi::RegisterBackgroundIsolate') external static void __registerBackgroundIsolate(int rootIsolateId); /// Called whenever this platform dispatcher receives a message from a @@ -618,7 +618,7 @@ class PlatformDispatcher { /// Called by [_dispatchPlatformMessage]. void _respondToPlatformMessage(int responseId, ByteData? data) => __respondToPlatformMessage(responseId, data); - @FfiNative('PlatformConfigurationNativeApi::RespondToPlatformMessage') + @Native(symbol: 'PlatformConfigurationNativeApi::RespondToPlatformMessage') external static void __respondToPlatformMessage(int responseId, ByteData? data); /// Wraps the given [callback] in another callback that ensures that the @@ -678,7 +678,7 @@ class PlatformDispatcher { /// Note that this does not rename any child isolates of the root. void setIsolateDebugName(String name) => _setIsolateDebugName(name); - @FfiNative('PlatformConfigurationNativeApi::SetIsolateDebugName') + @Native(symbol: 'PlatformConfigurationNativeApi::SetIsolateDebugName') external static void _setIsolateDebugName(String name); /// Requests the Dart VM to adjusts the GC heuristics based on the requested `performance_mode`. @@ -691,7 +691,7 @@ class PlatformDispatcher { _requestDartPerformanceMode(mode.index); } - @FfiNative('PlatformConfigurationNativeApi::RequestDartPerformanceMode') + @Native(symbol: 'PlatformConfigurationNativeApi::RequestDartPerformanceMode') external static int _requestDartPerformanceMode(int mode); /// The embedder can specify data that the isolate can request synchronously @@ -705,7 +705,7 @@ class PlatformDispatcher { /// platform channel may be used. ByteData? getPersistentIsolateData() => _getPersistentIsolateData(); - @FfiNative('PlatformConfigurationNativeApi::GetPersistentIsolateData') + @Native(symbol: 'PlatformConfigurationNativeApi::GetPersistentIsolateData') external static ByteData? _getPersistentIsolateData(); /// Requests that, at the next appropriate opportunity, the [onBeginFrame] and @@ -717,7 +717,7 @@ class PlatformDispatcher { /// scheduling of frames. void scheduleFrame() => _scheduleFrame(); - @FfiNative('PlatformConfigurationNativeApi::ScheduleFrame') + @Native(symbol: 'PlatformConfigurationNativeApi::ScheduleFrame') external static void _scheduleFrame(); /// Additional accessibility features that may be enabled by the platform. @@ -768,7 +768,7 @@ class PlatformDispatcher { ''') void updateSemantics(SemanticsUpdate update) => _updateSemantics(update); - @FfiNative)>('PlatformConfigurationNativeApi::UpdateSemantics') + @Native)>(symbol: 'PlatformConfigurationNativeApi::UpdateSemantics') external static void _updateSemantics(SemanticsUpdate update); /// The system-reported default locale of the device. @@ -830,7 +830,7 @@ class PlatformDispatcher { List _computePlatformResolvedLocale(List supportedLocalesData) => __computePlatformResolvedLocale(supportedLocalesData); - @FfiNative('PlatformConfigurationNativeApi::ComputePlatformResolvedLocale') + @Native(symbol: 'PlatformConfigurationNativeApi::ComputePlatformResolvedLocale') external static List __computePlatformResolvedLocale(List supportedLocalesData); /// A callback that is invoked whenever [locale] changes value. @@ -1213,7 +1213,7 @@ class PlatformDispatcher { /// requests from the embedder. String get defaultRouteName => _defaultRouteName(); - @FfiNative('PlatformConfigurationNativeApi::DefaultRouteName') + @Native(symbol: 'PlatformConfigurationNativeApi::DefaultRouteName') external static String _defaultRouteName(); } diff --git a/lib/ui/semantics.dart b/lib/ui/semantics.dart index 9bf8d2be76d8c..feb9b825d03fc 100644 --- a/lib/ui/semantics.dart +++ b/lib/ui/semantics.dart @@ -712,7 +712,7 @@ class SpellOutStringAttribute extends StringAttribute { _initSpellOutStringAttribute(this, range.start, range.end); } - @FfiNative('NativeStringAttribute::initSpellOutStringAttribute') + @Native(symbol: 'NativeStringAttribute::initSpellOutStringAttribute') external static void _initSpellOutStringAttribute(SpellOutStringAttribute instance, int start, int end); @override @@ -748,7 +748,7 @@ class LocaleStringAttribute extends StringAttribute { /// The lanuage of this attribute. final Locale locale; - @FfiNative('NativeStringAttribute::initLocaleStringAttribute') + @Native(symbol: 'NativeStringAttribute::initLocaleStringAttribute') external static void _initLocaleStringAttribute(LocaleStringAttribute instance, int start, int end, String locale); @override @@ -773,7 +773,7 @@ class SemanticsUpdateBuilder extends NativeFieldWrapperClass1 { @pragma('vm:entry-point') SemanticsUpdateBuilder() { _constructor(); } - @FfiNative('SemanticsUpdateBuilder::Create') + @Native(symbol: 'SemanticsUpdateBuilder::Create') external void _constructor(); /// Update the information associated with the node with the given `id`. @@ -934,7 +934,7 @@ class SemanticsUpdateBuilder extends NativeFieldWrapperClass1 { additionalActions, ); } - @FfiNative< + @Native< Void Function( Pointer, Int32, @@ -971,7 +971,7 @@ class SemanticsUpdateBuilder extends NativeFieldWrapperClass1 { Handle, Handle, Handle, - Handle)>('SemanticsUpdateBuilder::updateNode') + Handle)>(symbol: 'SemanticsUpdateBuilder::updateNode') external void _updateNode( int id, int flags, @@ -1029,7 +1029,7 @@ class SemanticsUpdateBuilder extends NativeFieldWrapperClass1 { assert(overrideId != null); _updateCustomAction(id, label ?? '', hint ?? '', overrideId); } - @FfiNative, Int32, Handle, Handle, Int32)>('SemanticsUpdateBuilder::updateCustomAction') + @Native, Int32, Handle, Handle, Int32)>(symbol: 'SemanticsUpdateBuilder::updateCustomAction') external void _updateCustomAction(int id, String label, String hint, int overrideId); /// Creates a [SemanticsUpdate] object that encapsulates the updates recorded @@ -1044,7 +1044,7 @@ class SemanticsUpdateBuilder extends NativeFieldWrapperClass1 { _build(semanticsUpdate); return semanticsUpdate; } - @FfiNative, Handle)>('SemanticsUpdateBuilder::build') + @Native, Handle)>(symbol: 'SemanticsUpdateBuilder::build') external void _build(SemanticsUpdate outSemanticsUpdate); } @@ -1070,6 +1070,6 @@ class SemanticsUpdate extends NativeFieldWrapperClass1 { /// /// This can't be a leaf call because the native function calls Dart API /// (Dart_SetNativeInstanceField). - @FfiNative)>('SemanticsUpdate::dispose') + @Native)>(symbol: 'SemanticsUpdate::dispose') external void dispose(); } diff --git a/lib/ui/text.dart b/lib/ui/text.dart index 69983ae736e27..2a0c4c39ff9d3 100644 --- a/lib/ui/text.dart +++ b/lib/ui/text.dart @@ -2697,44 +2697,44 @@ class Paragraph extends NativeFieldWrapperClass1 { /// The amount of horizontal space this paragraph occupies. /// /// Valid only after [layout] has been called. - @FfiNative)>('Paragraph::width', isLeaf: true) + @Native)>(symbol: 'Paragraph::width', isLeaf: true) external double get width; /// The amount of vertical space this paragraph occupies. /// /// Valid only after [layout] has been called. - @FfiNative)>('Paragraph::height', isLeaf: true) + @Native)>(symbol: 'Paragraph::height', isLeaf: true) external double get height; /// The distance from the left edge of the leftmost glyph to the right edge of /// the rightmost glyph in the paragraph. /// /// Valid only after [layout] has been called. - @FfiNative)>('Paragraph::longestLine', isLeaf: true) + @Native)>(symbol: 'Paragraph::longestLine', isLeaf: true) external double get longestLine; /// The minimum width that this paragraph could be without failing to paint /// its contents within itself. /// /// Valid only after [layout] has been called. - @FfiNative)>('Paragraph::minIntrinsicWidth', isLeaf: true) + @Native)>(symbol: 'Paragraph::minIntrinsicWidth', isLeaf: true) external double get minIntrinsicWidth; /// Returns the smallest width beyond which increasing the width never /// decreases the height. /// /// Valid only after [layout] has been called. - @FfiNative)>('Paragraph::maxIntrinsicWidth', isLeaf: true) + @Native)>(symbol: 'Paragraph::maxIntrinsicWidth', isLeaf: true) external double get maxIntrinsicWidth; /// The distance from the top of the paragraph to the alphabetic /// baseline of the first line, in logical pixels. - @FfiNative)>('Paragraph::alphabeticBaseline', isLeaf: true) + @Native)>(symbol: 'Paragraph::alphabeticBaseline', isLeaf: true) external double get alphabeticBaseline; /// The distance from the top of the paragraph to the ideographic /// baseline of the first line, in logical pixels. - @FfiNative)>('Paragraph::ideographicBaseline', isLeaf: true) + @Native)>(symbol: 'Paragraph::ideographicBaseline', isLeaf: true) external double get ideographicBaseline; /// True if there is more vertical content, but the text was truncated, either @@ -2744,7 +2744,7 @@ class Paragraph extends NativeFieldWrapperClass1 { /// /// See the discussion of the `maxLines` and `ellipsis` arguments at /// [ParagraphStyle.new]. - @FfiNative)>('Paragraph::didExceedMaxLines', isLeaf: true) + @Native)>(symbol: 'Paragraph::didExceedMaxLines', isLeaf: true) external bool get didExceedMaxLines; /// Computes the size and position of each glyph in the paragraph. @@ -2757,7 +2757,7 @@ class Paragraph extends NativeFieldWrapperClass1 { return true; }()); } - @FfiNative, Double)>('Paragraph::layout', isLeaf: true) + @Native, Double)>(symbol: 'Paragraph::layout', isLeaf: true) external void _layout(double width); List _decodeTextBoxes(Float32List encoded) { @@ -2796,7 +2796,7 @@ class Paragraph extends NativeFieldWrapperClass1 { } // See paragraph.cc for the layout of this return value. - @FfiNative, Uint32, Uint32, Uint32, Uint32)>('Paragraph::getRectsForRange') + @Native, Uint32, Uint32, Uint32, Uint32)>(symbol: 'Paragraph::getRectsForRange') external Float32List _getBoxesForRange(int start, int end, int boxHeightStyle, int boxWidthStyle); /// Returns a list of text boxes that enclose all placeholders in the paragraph. @@ -2810,7 +2810,7 @@ class Paragraph extends NativeFieldWrapperClass1 { return _decodeTextBoxes(_getBoxesForPlaceholders()); } - @FfiNative)>('Paragraph::getRectsForPlaceholders') + @Native)>(symbol: 'Paragraph::getRectsForPlaceholders') external Float32List _getBoxesForPlaceholders(); /// Returns the text position closest to the given offset. @@ -2819,7 +2819,7 @@ class Paragraph extends NativeFieldWrapperClass1 { return TextPosition(offset: encoded[0], affinity: TextAffinity.values[encoded[1]]); } - @FfiNative, Double, Double)>('Paragraph::getPositionForOffset') + @Native, Double, Double)>(symbol: 'Paragraph::getPositionForOffset') external List _getPositionForOffset(double dx, double dy); /// Returns the [TextRange] of the word at the given [TextPosition]. @@ -2848,7 +2848,7 @@ class Paragraph extends NativeFieldWrapperClass1 { return TextRange(start: boundary[0], end: boundary[1]); } - @FfiNative, Uint32)>('Paragraph::getWordBoundary') + @Native, Uint32)>(symbol: 'Paragraph::getWordBoundary') external List _getWordBoundary(int offset); /// Returns the [TextRange] of the line at the given [TextPosition]. @@ -2880,13 +2880,13 @@ class Paragraph extends NativeFieldWrapperClass1 { return line; } - @FfiNative, Uint32)>('Paragraph::getLineBoundary') + @Native, Uint32)>(symbol: 'Paragraph::getLineBoundary') external List _getLineBoundary(int offset); // Redirecting the paint function in this way solves some dependency problems // in the C++ code. If we straighten out the C++ dependencies, we can remove // this indirection. - @FfiNative, Pointer, Double, Double)>('Paragraph::paint') + @Native, Pointer, Double, Double)>(symbol: 'Paragraph::paint') external void _paint(Canvas canvas, double x, double y); /// Returns the full list of [LineMetrics] that describe in detail the various @@ -2917,7 +2917,7 @@ class Paragraph extends NativeFieldWrapperClass1 { return metrics; } - @FfiNative)>('Paragraph::computeLineMetrics') + @Native)>(symbol: 'Paragraph::computeLineMetrics') external Float64List _computeLineMetrics(); /// Release the resources used by this object. The object is no longer usable @@ -2933,7 +2933,7 @@ class Paragraph extends NativeFieldWrapperClass1 { /// This can't be a leaf call because the native function calls Dart API /// (Dart_SetNativeInstanceField). - @FfiNative)>('Paragraph::dispose') + @Native)>(symbol: 'Paragraph::dispose') external void _dispose(); bool _disposed = false; @@ -3004,7 +3004,7 @@ class ParagraphBuilder extends NativeFieldWrapperClass1 { ); } - @FfiNative('ParagraphBuilder::Create') + @Native(symbol: 'ParagraphBuilder::Create') external void _constructor( Int32List encoded, ByteData? strutData, @@ -3084,7 +3084,7 @@ class ParagraphBuilder extends NativeFieldWrapperClass1 { ); } - @FfiNative< + @Native< Void Function( Pointer, Handle, @@ -3101,7 +3101,7 @@ class ParagraphBuilder extends NativeFieldWrapperClass1 { Handle, Handle, Handle, - Handle)>('ParagraphBuilder::pushStyle') + Handle)>(symbol: 'ParagraphBuilder::pushStyle') external void _pushStyle( Int32List encoded, List fontFamilies, @@ -3128,7 +3128,7 @@ class ParagraphBuilder extends NativeFieldWrapperClass1 { /// added to the paragraph is affected by all the styles in the stack. Calling /// [pop] removes the topmost style in the stack, leaving the remaining styles /// in effect. - @FfiNative)>('ParagraphBuilder::pop', isLeaf: true) + @Native)>(symbol: 'ParagraphBuilder::pop', isLeaf: true) external void pop(); /// Adds the given text to the paragraph. @@ -3141,7 +3141,7 @@ class ParagraphBuilder extends NativeFieldWrapperClass1 { } } - @FfiNative, Handle)>('ParagraphBuilder::addText') + @Native, Handle)>(symbol: 'ParagraphBuilder::addText') external String? _addText(String text); /// Adds an inline placeholder space to the paragraph. @@ -3208,7 +3208,7 @@ class ParagraphBuilder extends NativeFieldWrapperClass1 { _placeholderScales.add(scale); } - @FfiNative, Double, Double, Uint32, Double, Uint32)>('ParagraphBuilder::addPlaceholder') + @Native, Double, Double, Uint32, Double, Uint32)>(symbol: 'ParagraphBuilder::addPlaceholder') external void _addPlaceholder(double width, double height, int alignment, double baselineOffset, int baseline); /// Applies the given paragraph style and returns a [Paragraph] containing the @@ -3222,7 +3222,7 @@ class ParagraphBuilder extends NativeFieldWrapperClass1 { return paragraph; } - @FfiNative, Handle)>('ParagraphBuilder::build') + @Native, Handle)>(symbol: 'ParagraphBuilder::build') external void _build(Paragraph outParagraph); } @@ -3259,5 +3259,5 @@ FutureOr _sendFontChangeMessage() async { } } -@FfiNative('FontCollection::LoadFontFromList') +@Native(symbol: 'FontCollection::LoadFontFromList') external void _loadFontFromList(Uint8List list, _Callback callback, String fontFamily); diff --git a/lib/ui/window.dart b/lib/ui/window.dart index b823dd34ea215..e37a4854475e2 100644 --- a/lib/ui/window.dart +++ b/lib/ui/window.dart @@ -267,7 +267,7 @@ class FlutterView { /// painting. void render(Scene scene) => _render(scene); - @FfiNative)>('PlatformConfigurationNativeApi::Render') + @Native)>(symbol: 'PlatformConfigurationNativeApi::Render') external static void _render(Scene scene); /// Change the retained semantics data about this [FlutterView]. @@ -280,7 +280,7 @@ class FlutterView { /// cannot be used further. void updateSemantics(SemanticsUpdate update) => _updateSemantics(update); - @FfiNative)>('PlatformConfigurationNativeApi::UpdateSemantics') + @Native)>(symbol: 'PlatformConfigurationNativeApi::UpdateSemantics') external static void _updateSemantics(SemanticsUpdate update); } diff --git a/third_party/tonic/tests/fixtures/tonic_test.dart b/third_party/tonic/tests/fixtures/tonic_test.dart index 38c5fb0707c77..4d408fda83a3d 100644 --- a/third_party/tonic/tests/fixtures/tonic_test.dart +++ b/third_party/tonic/tests/fixtures/tonic_test.dart @@ -32,7 +32,7 @@ void testClearLater() { // Test helpers for simple void calls through Tonic. -@FfiNative('Nop', isLeaf: true) +@Native(symbol: 'Nop', isLeaf: true) external void nop(); @pragma('vm:entry-point') @@ -43,7 +43,7 @@ void callNop() { // Test helpers for calls with bool through Tonic. -@FfiNative('EchoBool') +@Native(symbol: 'EchoBool') external bool echoBool(bool arg); @pragma('vm:entry-point') @@ -55,7 +55,7 @@ void callEchoBool() { // Test helpers for calls with int through Tonic. -@FfiNative('EchoIntPtr') +@Native(symbol: 'EchoIntPtr') external int echoIntPtr(int arg); @pragma('vm:entry-point') @@ -67,7 +67,7 @@ void callEchoIntPtr() { // Test helpers for calls with float through Tonic. -@FfiNative('EchoFloat') +@Native(symbol: 'EchoFloat') external double echoFloat(double arg); @pragma('vm:entry-point') @@ -79,7 +79,7 @@ void callEchoFloat() { // Test helpers for calls with double through Tonic. -@FfiNative('EchoDouble') +@Native(symbol: 'EchoDouble') external double echoDouble(double arg); @pragma('vm:entry-point') @@ -91,7 +91,7 @@ void callEchoDouble() { // Test helpers for calls with Dart_Handle through Tonic. -@FfiNative('EchoHandle') +@Native(symbol: 'EchoHandle') external Object echoHandle(Object arg); @pragma('vm:entry-point') @@ -103,7 +103,7 @@ void callEchoHandle() { // Test helpers for calls with std::string through Tonic. -@FfiNative('EchoString') +@Native(symbol: 'EchoString') external String echoString(String arg); @pragma('vm:entry-point') @@ -115,7 +115,7 @@ void callEchoString() { // Test helpers for calls with std::u16string through Tonic. -@FfiNative('EchoU16String') +@Native(symbol: 'EchoU16String') external String echoU16String(String arg); @pragma('vm:entry-point') @@ -127,7 +127,7 @@ void callEchoU16String() { // Test helpers for calls with std::vector through Tonic. -@FfiNative('EchoVector') +@Native(symbol: 'EchoVector') external List echoVector(List arg); @pragma('vm:entry-point') @@ -144,19 +144,17 @@ class MyNativeClass extends NativeFieldWrapperClass1 { _Create(this, value); } - @FfiNative('CreateNative') + @Native(symbol: 'CreateNative') external static void _Create(MyNativeClass self, int value); - @FfiNative, Int32, Handle)>( - 'MyNativeClass::MyTestFunction') + @Native, Int32, Handle)>(symbol: 'MyNativeClass::MyTestFunction') external static int myTestFunction(MyNativeClass self, int x, Object handle); - @FfiNative, Int64)>( - 'MyNativeClass::MyTestMethod') + @Native, Int64)>(symbol: 'MyNativeClass::MyTestMethod') external Object myTestMethod(int a); } -@FfiNative)>('EchoWrappable') +@Native)>(symbol: 'EchoWrappable') external int echoWrappable(MyNativeClass arg); @pragma('vm:entry-point') @@ -169,7 +167,7 @@ void callEchoWrappable() { // Test helpers for calls with TypedList<..> through Tonic. -@FfiNative('EchoTypedList') +@Native(symbol: 'EchoTypedList') external Float32List echoTypedList(Float32List arg); @pragma('vm:entry-point') From 71ee5f19bc164c140055007d39bb3240d04a2376 Mon Sep 17 00:00:00 2001 From: Ahmed Ashour Date: Tue, 24 Jan 2023 18:54:19 +0100 Subject: [PATCH 15/15] Remove superfluous words from comments (#39068) * Remove superfluous words. * Format * Duplicate in consecutive lines. --- DEPS | 2 +- Doxyfile | 2 +- ci/scan_flattened_deps.py | 2 +- impeller/entity/entity_unittests.cc | 2 +- impeller/geometry/path.h | 2 +- impeller/renderer/texture_descriptor.h | 2 +- lib/snapshot/BUILD.gn | 2 +- lib/ui/geometry.dart | 2 +- lib/ui/painting.dart | 8 ++++---- lib/ui/platform_dispatcher.dart | 2 +- lib/ui/text.dart | 4 ++-- lib/ui/ui_dart_state.h | 2 +- lib/web_ui/lib/src/engine/html/path/path.dart | 4 ++-- lib/web_ui/lib/src/engine/keyboard_binding.dart | 2 +- lib/web_ui/lib/src/engine/navigation/history.dart | 2 +- lib/web_ui/lib/src/engine/safe_browser_api.dart | 2 +- .../lib/src/engine/text/font_collection.dart | 2 +- .../lib/src/engine/text_editing/text_editing.dart | 2 +- lib/web_ui/test/engine/profiler_test.dart | 2 +- runtime/dart_isolate.h | 2 +- runtime/runtime_controller.h | 4 ++-- shell/common/animator.h | 2 +- shell/common/engine.h | 4 ++-- shell/common/platform_message_handler.h | 4 ++-- shell/common/platform_view.h | 4 ++-- shell/common/run_configuration.h | 2 +- shell/common/shell.cc | 2 +- .../io/flutter/app/FlutterActivityDelegate.java | 2 +- .../flutter/embedding/engine/FlutterShellArgs.java | 2 +- .../DeferredComponentManager.java | 12 ++++++------ .../plugin/platform/PlatformViewsController.java | 2 +- .../plugin/platform/VirtualDisplayController.java | 2 +- .../common/client_wrapper/standard_codec.cc | 2 +- .../platform/common/incoming_message_dispatcher.h | 2 +- shell/platform/darwin/Doxyfile | 2 +- .../Source/FlutterEmbedderKeyResponder.mm | 2 +- .../ios/framework/Source/FlutterTextInputPlugin.mm | 2 +- .../Headers/FlutterPluginRegistrarMacOS.h | 2 +- .../framework/Source/FlutterTextInputPlugin.mm | 2 +- shell/platform/embedder/embedder.h | 2 +- shell/platform/embedder/embedder_task_runner.h | 2 +- .../platform/embedder/tests/embedder_unittests.cc | 2 +- .../dart_runner/dart_test_component_controller.h | 2 +- .../tests/integration/utils/portable_ui_test.h | 4 ++-- .../fuchsia/runtime/dart/utils/vmservice_object.cc | 2 +- shell/platform/glfw/client_wrapper/BUILD.gn | 2 +- .../include/flutter/flutter_window_controller.h | 2 +- shell/platform/linux/fl_engine_private.h | 2 +- shell/platform/linux/fl_event_channel_test.cc | 14 +++++++------- shell/platform/linux/fl_method_channel_test.cc | 10 +++++----- shell/platform/windows/keyboard_key_handler.h | 2 +- shell/platform/windows/keyboard_manager.h | 2 +- .../ax/platform/ax_platform_node_delegate.h | 2 +- ...platform_node_textrangeprovider_win_unittest.cc | 2 +- .../ax/platform/ax_platform_node_win.h | 2 +- third_party/txt/src/txt/font_collection.cc | 2 +- third_party/txt/src/utils/TypeHelpers.h | 2 +- tools/fuchsia/gn-sdk/config/config.gni | 2 +- tools/gn | 3 +-- 59 files changed, 84 insertions(+), 85 deletions(-) diff --git a/DEPS b/DEPS index ad3575cd8c8eb..3fb5e41336dff 100644 --- a/DEPS +++ b/DEPS @@ -242,7 +242,7 @@ deps = { # # The dependencies in this section should match the layout in the Fuchsia gn # build. Eventually, we'll manage these dependencies together with Fuchsia - # and not have to specific specific hashes. + # and not have to specific hashes. 'src/third_party/rapidjson': Var('fuchsia_git') + '/third_party/rapidjson' + '@' + 'ef3564c5c8824989393b87df25355baf35ff544b', diff --git a/Doxyfile b/Doxyfile index 0a8467d2e321c..0c90080d2406d 100644 --- a/Doxyfile +++ b/Doxyfile @@ -707,7 +707,7 @@ SHOW_NAMESPACES = YES # The FILE_VERSION_FILTER tag can be used to specify a program or script that # doxygen should invoke to get the current version for each file (typically from # the version control system). Doxygen will invoke the program by executing (via -# popen()) the command command input-file, where command is the value of the +# popen()) the command input-file, where command is the value of the # FILE_VERSION_FILTER tag, and input-file is the name of an input file provided # by doxygen. Whatever the program writes to standard output is used as the file # version. For an example see the documentation. diff --git a/ci/scan_flattened_deps.py b/ci/scan_flattened_deps.py index ece1154fb97a4..2f51bdf09b683 100644 --- a/ci/scan_flattened_deps.py +++ b/ci/scan_flattened_deps.py @@ -27,7 +27,7 @@ SECONDS_PER_YEAR = 31556952 UPSTREAM_PREFIX = 'upstream_' -failed_deps = [] # deps which fail to be be cloned or git-merge based +failed_deps = [] # deps which fail to be cloned or git-merge based sarif_log = { '$schema': diff --git a/impeller/entity/entity_unittests.cc b/impeller/entity/entity_unittests.cc index c82eb768e8df3..fffc7bb5c4fcb 100644 --- a/impeller/entity/entity_unittests.cc +++ b/impeller/entity/entity_unittests.cc @@ -679,7 +679,7 @@ TEST_P(EntityTest, BlendingModeOptions) { std::vector blend_mode_values; { // Force an exhausiveness check with a switch. When adding blend modes, - // update this switch with a new name/value to to make it selectable in the + // update this switch with a new name/value to make it selectable in the // test GUI. const BlendMode b{}; diff --git a/impeller/geometry/path.h b/impeller/geometry/path.h index 22879e5de3751..8ffce75882ecc 100644 --- a/impeller/geometry/path.h +++ b/impeller/geometry/path.h @@ -25,7 +25,7 @@ enum class FillType { //------------------------------------------------------------------------------ /// @brief Paths are lightweight objects that describe a collection of /// linear, quadratic, or cubic segments. These segments may be -/// be broken up by move commands, which are effectively linear +/// broken up by move commands, which are effectively linear /// commands that pick up the pen rather than continuing to draw. /// /// All shapes supported by Impeller are paths either directly or diff --git a/impeller/renderer/texture_descriptor.h b/impeller/renderer/texture_descriptor.h index d4ed61a1ef5b5..ce1963460e19d 100644 --- a/impeller/renderer/texture_descriptor.h +++ b/impeller/renderer/texture_descriptor.h @@ -14,7 +14,7 @@ namespace impeller { //------------------------------------------------------------------------------ /// @brief A lightweight object that describes the attributes of a texture -/// that can then used used an allocator to create that texture. +/// that can then used an allocator to create that texture. /// struct TextureDescriptor { StorageMode storage_mode = StorageMode::kDeviceTransient; diff --git a/lib/snapshot/BUILD.gn b/lib/snapshot/BUILD.gn index 98bee65ef8d1d..9247a529d0201 100644 --- a/lib/snapshot/BUILD.gn +++ b/lib/snapshot/BUILD.gn @@ -36,7 +36,7 @@ group("generate_snapshot_bins") { deps += [ ":create_arm_gen_snapshot" ] } - # Build analyze_snapshot for for 64-bit target CPUs. + # Build analyze_snapshot for 64-bit target CPUs. if (target_cpu == "x64" || target_cpu == "arm64") { deps += [ "//third_party/dart/runtime/bin:analyze_snapshot($host_toolchain)" ] diff --git a/lib/ui/geometry.dart b/lib/ui/geometry.dart index c6f300b65bf52..25078b56602e7 100644 --- a/lib/ui/geometry.dart +++ b/lib/ui/geometry.dart @@ -1227,7 +1227,7 @@ class RRect { brRadiusY: bottomRight.y, ); - /// Construct a rounded rectangle from its bounding box and and topLeft, + /// Construct a rounded rectangle from its bounding box and topLeft, /// topRight, bottomRight, and bottomLeft radii. /// /// The corner radii default to [Radius.zero], i.e. right-angled corners. Will diff --git a/lib/ui/painting.dart b/lib/ui/painting.dart index e018f6cec270c..51ae64542fbdb 100644 --- a/lib/ui/painting.dart +++ b/lib/ui/painting.dart @@ -2646,7 +2646,7 @@ class Path extends NativeFieldWrapperClass1 { /// `clockwise` and `largeArc` in such a way that the sweep angle /// is always less than 360 degrees. /// - /// A simple line is appended if either either radii are zero or the last + /// A simple line is appended if either radii are zero or the last /// point in the path is `arcEnd`. The radii are scaled to fit the last path /// point if both are greater than zero but too small to describe an arc. /// @@ -2674,7 +2674,7 @@ class Path extends NativeFieldWrapperClass1 { /// path in a direction determined by `clockwise` and `largeArc` /// in such a way that the sweep angle is always less than 360 degrees. /// - /// A simple line is appended if either either radii are zero, or, both + /// A simple line is appended if either radii are zero, or, both /// `arcEndDelta.dx` and `arcEndDelta.dy` are zero. The radii are scaled to /// fit the last path point if both are greater than zero but too small to /// describe an arc. @@ -4972,7 +4972,7 @@ class Canvas extends NativeFieldWrapperClass1 { /// /// Use [save] and [saveLayer] to push state onto the stack. /// - /// If the state was pushed with with [saveLayer], then this call will also + /// If the state was pushed with [saveLayer], then this call will also /// cause the new layer to be composited into the previous layer. @Native)>(symbol: 'Canvas::restore', isLeaf: true) external void restore(); @@ -6259,7 +6259,7 @@ class Shadow { /// Linearly interpolate between two shadows. /// - /// If either shadow is null, this function linearly interpolates from a + /// If either shadow is null, this function linearly interpolates from /// a shadow that matches the other shadow in color but has a zero /// offset and a zero blurRadius. /// diff --git a/lib/ui/platform_dispatcher.dart b/lib/ui/platform_dispatcher.dart index 9cce6b368a735..b0e596873cf98 100644 --- a/lib/ui/platform_dispatcher.dart +++ b/lib/ui/platform_dispatcher.dart @@ -1928,7 +1928,7 @@ class Locale { /// [language](https://github.com/unicode-org/cldr/blob/master/common/validity/language.xml), /// [region](https://github.com/unicode-org/cldr/blob/master/common/validity/region.xml). The /// primary language subtag must be at least two and at most eight lowercase - /// letters, but not four letters. The region region subtag must be two + /// letters, but not four letters. The region subtag must be two /// uppercase letters or three digits. See the [Unicode Language /// Identifier](https://www.unicode.org/reports/tr35/#Unicode_language_identifier) /// specification. diff --git a/lib/ui/text.dart b/lib/ui/text.dart index 2a0c4c39ff9d3..5448044440be5 100644 --- a/lib/ui/text.dart +++ b/lib/ui/text.dart @@ -1194,7 +1194,7 @@ class TextHeightBehavior { /// Whether to apply the [TextStyle.height] modifier to the ascent of the first /// line in the paragraph. /// - /// When true, the [TextStyle.height] modifier will be applied to to the ascent + /// When true, the [TextStyle.height] modifier will be applied to the ascent /// of the first line. When false, the font's default ascent will be used and /// the [TextStyle.height] will have no effect on the ascent of the first line. /// @@ -1206,7 +1206,7 @@ class TextHeightBehavior { /// Whether to apply the [TextStyle.height] modifier to the descent of the last /// line in the paragraph. /// - /// When true, the [TextStyle.height] modifier will be applied to to the descent + /// When true, the [TextStyle.height] modifier will be applied to the descent /// of the last line. When false, the font's default descent will be used and /// the [TextStyle.height] will have no effect on the descent of the last line. /// diff --git a/lib/ui/ui_dart_state.h b/lib/ui/ui_dart_state.h index b00d6bd72975a..6792d8471f9d5 100644 --- a/lib/ui/ui_dart_state.h +++ b/lib/ui/ui_dart_state.h @@ -170,7 +170,7 @@ class UIDartState : public tonic::DartState { return unhandled_exception_callback_; } - /// Returns a enumeration that that uniquely represents this root isolate. + /// Returns a enumeration that uniquely represents this root isolate. /// Returns `0` if called from a non-root isolate. int64_t GetRootIsolateToken() const; diff --git a/lib/web_ui/lib/src/engine/html/path/path.dart b/lib/web_ui/lib/src/engine/html/path/path.dart index 066836901f7e6..57a1312d49349 100644 --- a/lib/web_ui/lib/src/engine/html/path/path.dart +++ b/lib/web_ui/lib/src/engine/html/path/path.dart @@ -658,7 +658,7 @@ class SurfacePath implements ui.Path { /// `clockwise` and `largeArc` in such a way that the sweep angle /// is always less than 360 degrees. /// - /// A simple line is appended if either either radii are zero or the last + /// A simple line is appended if either radii are zero or the last /// point in the path is `arcEnd`. The radii are scaled to fit the last path /// point if both are greater than zero but too small to describe an arc. /// @@ -851,7 +851,7 @@ class SurfacePath implements ui.Path { /// path in a direction determined by `clockwise` and `largeArc` /// in such a way that the sweep angle is always less than 360 degrees. /// - /// A simple line is appended if either either radii are zero, or, both + /// A simple line is appended if either radii are zero, or, both /// `arcEndDelta.dx` and `arcEndDelta.dy` are zero. The radii are scaled to /// fit the last path point if both are greater than zero but too small to /// describe an arc. diff --git a/lib/web_ui/lib/src/engine/keyboard_binding.dart b/lib/web_ui/lib/src/engine/keyboard_binding.dart index 862a30f7bc8db..deffc64f47ab3 100644 --- a/lib/web_ui/lib/src/engine/keyboard_binding.dart +++ b/lib/web_ui/lib/src/engine/keyboard_binding.dart @@ -369,7 +369,7 @@ class KeyboardConverter { _keyGuards.remove(physicalKey)?.call(); _keyGuards[physicalKey] = cancelingCallback; } - // Call this method on an up event event of a non-modifier key. + // Call this method on an up event of a non-modifier key. void _stopGuardingKey(int physicalKey) { _keyGuards.remove(physicalKey)?.call(); } diff --git a/lib/web_ui/lib/src/engine/navigation/history.dart b/lib/web_ui/lib/src/engine/navigation/history.dart index 4f1a3c43e4bc3..b57557ce9ee04 100644 --- a/lib/web_ui/lib/src/engine/navigation/history.dart +++ b/lib/web_ui/lib/src/engine/navigation/history.dart @@ -32,7 +32,7 @@ BrowserHistory createHistoryForExistingState(UrlStrategy? urlStrategy) { /// interact with the html browser history and should come up with their own /// ways to manage the states in the browser history. /// -/// There should only be one global instance among all all subclasses. +/// There should only be one global instance among all subclasses. /// /// See also: /// diff --git a/lib/web_ui/lib/src/engine/safe_browser_api.dart b/lib/web_ui/lib/src/engine/safe_browser_api.dart index 185a0e6c79cc7..38c7f52c3db94 100644 --- a/lib/web_ui/lib/src/engine/safe_browser_api.dart +++ b/lib/web_ui/lib/src/engine/safe_browser_api.dart @@ -1040,7 +1040,7 @@ class OffScreenCanvas { } } - /// Draws an image to canvas for both offscreen canvas canvas context2d. + /// Draws an image to canvas for both offscreen canvas context2d. void drawImage(Object image, int x, int y, int width, int height) { js_util.callMethod( getContext2d()!, 'drawImage', [image, x, y, width, height]); diff --git a/lib/web_ui/lib/src/engine/text/font_collection.dart b/lib/web_ui/lib/src/engine/text/font_collection.dart index ba33172b029c0..9918326c6bbec 100644 --- a/lib/web_ui/lib/src/engine/text/font_collection.dart +++ b/lib/web_ui/lib/src/engine/text/font_collection.dart @@ -132,7 +132,7 @@ class FontManager { /// /// Safari 12 and Firefox crash if you create a [DomFontFace] with a font /// family that is not correct CSS syntax. Font family names with invalid - /// characters are accepted accepted on these browsers, when wrapped it in + /// characters are accepted on these browsers, when wrapped it in /// quotes. /// /// Additionally, for Safari 12 to work [DomFontFace] name should be diff --git a/lib/web_ui/lib/src/engine/text_editing/text_editing.dart b/lib/web_ui/lib/src/engine/text_editing/text_editing.dart index ac995a6359c4e..dd89519d36263 100644 --- a/lib/web_ui/lib/src/engine/text_editing/text_editing.dart +++ b/lib/web_ui/lib/src/engine/text_editing/text_editing.dart @@ -1364,7 +1364,7 @@ abstract class DefaultTextEditingStrategy with CompositionAwareMixin implements editingDeltaState.deltaStart = lastEditingState!.extentOffset!; editingDeltaState.deltaEnd = lastEditingState!.extentOffset!; } else if (eventData != null) { - // When event.data is not null we we will begin by considering this delta as an insertion + // When event.data is not null we will begin by considering this delta as an insertion // at the selection extentOffset. This may change due to logic in handleChange to handle // composition and other IME behaviors. editingDeltaState.deltaText = eventData; diff --git a/lib/web_ui/test/engine/profiler_test.dart b/lib/web_ui/test/engine/profiler_test.dart index 13b439d03dc2b..aceda511064c8 100644 --- a/lib/web_ui/test/engine/profiler_test.dart +++ b/lib/web_ui/test/engine/profiler_test.dart @@ -73,7 +73,7 @@ void _profilerTests() { () => Profiler.instance.benchmark('foo', 123), // dart2js throws a NoSuchMethodError, dart2wasm throws a TypeError here. - // Just make make sure it throws an error in this case. + // Just make sure it throws an error in this case. throwsA(isA()), ); expect(data, isEmpty); diff --git a/runtime/dart_isolate.h b/runtime/dart_isolate.h index 16efd22c3a729..ace47f0eaad77 100644 --- a/runtime/dart_isolate.h +++ b/runtime/dart_isolate.h @@ -103,7 +103,7 @@ class DartIsolate : public UIDartState { /// Uninitialized, //-------------------------------------------------------------------------- - /// The Dart isolate has been been fully initialized but none of the + /// The Dart isolate has been fully initialized but none of the /// libraries referenced by that isolate have been loaded yet. This is an /// internal phase and callers can never get a reference to a Dart isolate /// in this phase. diff --git a/runtime/runtime_controller.h b/runtime/runtime_controller.h index 7bfe9254b3e79..ecfb6f2d2c210 100644 --- a/runtime/runtime_controller.h +++ b/runtime/runtime_controller.h @@ -477,7 +477,7 @@ class RuntimeController : public PlatformConfigurationClient { /// @brief Get an identifier that represents the Dart isolate group the /// root isolate is in. /// - /// @return The root isolate isolate group identifier, zero if one can't + /// @return The root isolate group identifier, zero if one can't /// be established. uint64_t GetRootIsolateGroup() const; @@ -535,7 +535,7 @@ class RuntimeController : public PlatformConfigurationClient { /// temporary conditions such as no network. /// Transient errors allow the dart VM to /// re-request the same deferred library and - /// and loading_unit_id again. Non-transient + /// loading_unit_id again. Non-transient /// errors are permanent and attempts to /// re-request the library will instantly /// complete with an error. diff --git a/shell/common/animator.h b/shell/common/animator.h index 79373b5f0f246..dfacb4a786bf3 100644 --- a/shell/common/animator.h +++ b/shell/common/animator.h @@ -78,7 +78,7 @@ class Animator final { // Enqueue |trace_flow_id| into |trace_flow_ids_|. The flow event will be // ended at either the next frame, or the next vsync interval with no active - // active rendering. + // rendering. void EnqueueTraceFlowId(uint64_t trace_flow_id); private: diff --git a/shell/common/engine.h b/shell/common/engine.h index 2e89710825384..400736735e06b 100644 --- a/shell/common/engine.h +++ b/shell/common/engine.h @@ -707,7 +707,7 @@ class Engine final : public RuntimeDelegate, PointerDataDispatcher::Delegate { /// @param[in] trace_flow_id The trace flow identifier associated with the /// pointer data packet. The engine uses this trace /// identifier to connect trace flows in the - /// timeline from the input event event to the + /// timeline from the input event to the /// frames generated due to those input events. /// These flows are tagged as "PointerEvent" in the /// timeline and allow grouping frames and input @@ -870,7 +870,7 @@ class Engine final : public RuntimeDelegate, PointerDataDispatcher::Delegate { /// temporary conditions such as no network. /// Transient errors allow the dart VM to /// re-request the same deferred library and - /// and loading_unit_id again. Non-transient + /// loading_unit_id again. Non-transient /// errors are permanent and attempts to /// re-request the library will instantly /// complete with an error. diff --git a/shell/common/platform_message_handler.h b/shell/common/platform_message_handler.h index 99a4f6631cf89..aa101829f5ba7 100644 --- a/shell/common/platform_message_handler.h +++ b/shell/common/platform_message_handler.h @@ -24,10 +24,10 @@ class PlatformMessageHandler { virtual void HandlePlatformMessage( std::unique_ptr message) = 0; - /// Returns true if the platform message will ALWAYS be be dispatched to the + /// Returns true if the platform message will ALWAYS be dispatched to the /// platform thread. /// - /// Platforms thats support Background Platform Channels will return + /// Platforms that support Background Platform Channels will return /// false. virtual bool DoesHandlePlatformMessageOnPlatformThread() const = 0; diff --git a/shell/common/platform_view.h b/shell/common/platform_view.h index f9e9bcb58dbf3..9ec848e34568d 100644 --- a/shell/common/platform_view.h +++ b/shell/common/platform_view.h @@ -278,7 +278,7 @@ class PlatformView { /// temporary conditions such as no network. /// Transient errors allow the dart VM to /// re-request the same deferred library and - /// and loading_unit_id again. Non-transient + /// loading_unit_id again. Non-transient /// errors are permanent and attempts to /// re-request the library will instantly /// complete with an error. @@ -759,7 +759,7 @@ class PlatformView { /// temporary conditions such as no network. /// Transient errors allow the dart VM to /// re-request the same deferred library and - /// and loading_unit_id again. Non-transient + /// loading_unit_id again. Non-transient /// errors are permanent and attempts to /// re-request the library will instantly /// complete with an error. diff --git a/shell/common/run_configuration.h b/shell/common/run_configuration.h index c1efeec34d8ca..57b6d784f09ba 100644 --- a/shell/common/run_configuration.h +++ b/shell/common/run_configuration.h @@ -35,7 +35,7 @@ class RunConfiguration { /// will attempt to look for the VM and isolate snapshots in the /// assets directory (must be specified in settings). In AOT mode, /// it will attempt to look for known snapshot symbols in the - /// currently currently loaded process. The entrypoint defaults to + /// currently loaded process. The entrypoint defaults to /// the "main" method in the root library. /// /// @param[in] settings The settings object used to look for the various diff --git a/shell/common/shell.cc b/shell/common/shell.cc index a4cf64505b8ee..32a777d3583ba 100644 --- a/shell/common/shell.cc +++ b/shell/common/shell.cc @@ -1709,7 +1709,7 @@ bool Shell::OnServiceProtocolFlushUIThreadTasks( // It can potentially starve the service isolate if the main isolate pauses // at a breakpoint or is in an infinite loop. // - // It should be invoked from the VM Service and and blocks it until UI thread + // It should be invoked from the VM Service and blocks it until UI thread // tasks are processed. response->SetObject(); response->AddMember("type", "Success", response->GetAllocator()); diff --git a/shell/platform/android/io/flutter/app/FlutterActivityDelegate.java b/shell/platform/android/io/flutter/app/FlutterActivityDelegate.java index 0fe692c49c6c7..21a9443228156 100644 --- a/shell/platform/android/io/flutter/app/FlutterActivityDelegate.java +++ b/shell/platform/android/io/flutter/app/FlutterActivityDelegate.java @@ -329,7 +329,7 @@ private static String[] getArgsFromIntent(Intent intent) { args.add("--endless-trace-buffer"); } // NOTE: all flags provided with this argument are subject to filtering - // based on a a list of allowed flags in shell/common/switches.cc. If any + // based on a list of allowed flags in shell/common/switches.cc. If any // flag provided is not allowed, the process will immediately terminate. if (intent.hasExtra("dart-flags")) { args.add("--dart-flags=" + intent.getStringExtra("dart-flags")); diff --git a/shell/platform/android/io/flutter/embedding/engine/FlutterShellArgs.java b/shell/platform/android/io/flutter/embedding/engine/FlutterShellArgs.java index 83c522421ce41..c741f6a3b58e4 100644 --- a/shell/platform/android/io/flutter/embedding/engine/FlutterShellArgs.java +++ b/shell/platform/android/io/flutter/embedding/engine/FlutterShellArgs.java @@ -129,7 +129,7 @@ public static FlutterShellArgs fromIntent(@NonNull Intent intent) { } // NOTE: all flags provided with this argument are subject to filtering - // based on a a list of allowed flags in shell/common/switches.cc. If any + // based on a list of allowed flags in shell/common/switches.cc. If any // flag provided is not allowed, the process will immediately terminate. if (intent.hasExtra(ARG_KEY_DART_FLAGS)) { args.add(ARG_DART_FLAGS + "=" + intent.getStringExtra(ARG_KEY_DART_FLAGS)); diff --git a/shell/platform/android/io/flutter/embedding/engine/deferredcomponents/DeferredComponentManager.java b/shell/platform/android/io/flutter/embedding/engine/deferredcomponents/DeferredComponentManager.java index f537622b31a69..e505feb8541ae 100644 --- a/shell/platform/android/io/flutter/embedding/engine/deferredcomponents/DeferredComponentManager.java +++ b/shell/platform/android/io/flutter/embedding/engine/deferredcomponents/DeferredComponentManager.java @@ -114,12 +114,12 @@ public interface DeferredComponentManager { * negative loadingUnitId is passed, then componentName must not be null. Passing a * loadingUnitId larger than the highest valid loading unit's id will cause the Dart * loadLibrary() to complete with a failure. - * @param componentName The deferred component component name as defined in bundle_config.yaml. - * This may be null if the deferred component to be loaded is associated with a loading - * unit/deferred dart library. In this case, it is this method's responsibility to map the - * loadingUnitId to its corresponding componentName. When loading asset-only or other deferred - * components without an associated Dart deferred library, loading unit id should a negative - * value and componentName must be non-null. + * @param componentName The deferred component name as defined in bundle_config.yaml. This may be + * null if the deferred component to be loaded is associated with a loading unit/deferred dart + * library. In this case, it is this method's responsibility to map the loadingUnitId to its + * corresponding componentName. When loading asset-only or other deferred components without + * an associated Dart deferred library, loading unit id should a negative value and + * componentName must be non-null. */ public abstract void installDeferredComponent(int loadingUnitId, String componentName); diff --git a/shell/platform/android/io/flutter/plugin/platform/PlatformViewsController.java b/shell/platform/android/io/flutter/plugin/platform/PlatformViewsController.java index a22d164fb2473..4b61cdc10d8d8 100644 --- a/shell/platform/android/io/flutter/plugin/platform/PlatformViewsController.java +++ b/shell/platform/android/io/flutter/plugin/platform/PlatformViewsController.java @@ -525,7 +525,7 @@ private void configureForHybridComposition( private long configureForVirtualDisplay( @NonNull PlatformView platformView, @NonNull PlatformViewsChannel.PlatformViewCreationRequest request) { - // This mode adds the view to a virtual display, which is is wired up to a GL texture that + // This mode adds the view to a virtual display, which is wired up to a GL texture that // is composed by the Flutter engine. // API level 20 is required to use VirtualDisplay#setSurface. diff --git a/shell/platform/android/io/flutter/plugin/platform/VirtualDisplayController.java b/shell/platform/android/io/flutter/plugin/platform/VirtualDisplayController.java index f8125ea097b13..3438db5dd648c 100644 --- a/shell/platform/android/io/flutter/plugin/platform/VirtualDisplayController.java +++ b/shell/platform/android/io/flutter/plugin/platform/VirtualDisplayController.java @@ -161,7 +161,7 @@ public void onViewAttachedToWindow(View v) { @Override public void run() { // We need some delay here until the frame propagates through the vd surface to - // to the texture, + // the texture, // 128ms was picked pretty arbitrarily based on trial and error. // As long as we invoke the runnable after a new frame is available we avoid the // scaling jank diff --git a/shell/platform/common/client_wrapper/standard_codec.cc b/shell/platform/common/client_wrapper/standard_codec.cc index c5c80ae5c2f27..5e93d407c2c0e 100644 --- a/shell/platform/common/client_wrapper/standard_codec.cc +++ b/shell/platform/common/client_wrapper/standard_codec.cc @@ -98,7 +98,7 @@ EncodableValue StandardCodecSerializer::ReadValue( void StandardCodecSerializer::WriteValue(const EncodableValue& value, ByteStreamWriter* stream) const { stream->WriteByte(static_cast(EncodedTypeForValue(value))); - // TODO(cbracken): Consider replacing this this with std::visit. + // TODO(cbracken): Consider replacing this with std::visit. switch (value.index()) { case 0: case 1: diff --git a/shell/platform/common/incoming_message_dispatcher.h b/shell/platform/common/incoming_message_dispatcher.h index 6900654254958..90a8f901f84b3 100644 --- a/shell/platform/common/incoming_message_dispatcher.h +++ b/shell/platform/common/incoming_message_dispatcher.h @@ -30,7 +30,7 @@ class IncomingMessageDispatcher { IncomingMessageDispatcher& operator=(IncomingMessageDispatcher const&) = delete; - // Routes |message| to to the registered handler for its channel, if any. + // Routes |message| to the registered handler for its channel, if any. // // If input blocking has been enabled on that channel, wraps the call to the // handler with calls to the given callbacks to block and then unblock input. diff --git a/shell/platform/darwin/Doxyfile b/shell/platform/darwin/Doxyfile index 6f9fb5ddbd453..b6ba3e0e33083 100644 --- a/shell/platform/darwin/Doxyfile +++ b/shell/platform/darwin/Doxyfile @@ -727,7 +727,7 @@ SHOW_NAMESPACES = YES # The FILE_VERSION_FILTER tag can be used to specify a program or script that # doxygen should invoke to get the current version for each file (typically from # the version control system). Doxygen will invoke the program by executing (via -# popen()) the command command input-file, where command is the value of the +# popen()) the command input-file, where command is the value of the # FILE_VERSION_FILTER tag, and input-file is the name of an input file provided # by doxygen. Whatever the program writes to standard output is used as the file # version. For an example see the documentation. diff --git a/shell/platform/darwin/ios/framework/Source/FlutterEmbedderKeyResponder.mm b/shell/platform/darwin/ios/framework/Source/FlutterEmbedderKeyResponder.mm index 2ba01e2d5917a..ef488f3384a79 100644 --- a/shell/platform/darwin/ios/framework/Source/FlutterEmbedderKeyResponder.mm +++ b/shell/platform/darwin/ios/framework/Source/FlutterEmbedderKeyResponder.mm @@ -863,7 +863,7 @@ - (UInt32)adjustModifiers:(nonnull FlutterUIPressProxy*)press API_AVAILABLE(ios( // The caps lock modifier needs to be unset only if it was already on // and this is a key up. This is because it indicates the lock state, and // not the key press state. The caps lock state should be on between the - // first down, and the second up (i.e. while the lock in in effect), and + // first down, and the second up (i.e. while the lock in effect), and // this code turns it off at the second up event. The OS leaves it on still // because of iOS's weird late processing of modifier states. Synthesis of // the appropriate synthesized key events happens in synchronizeModifiers. diff --git a/shell/platform/darwin/ios/framework/Source/FlutterTextInputPlugin.mm b/shell/platform/darwin/ios/framework/Source/FlutterTextInputPlugin.mm index edd6a594edfc0..7a342c68a1343 100644 --- a/shell/platform/darwin/ios/framework/Source/FlutterTextInputPlugin.mm +++ b/shell/platform/darwin/ios/framework/Source/FlutterTextInputPlugin.mm @@ -662,7 +662,7 @@ @implementation FlutterTextPlaceholder @end // A FlutterTextInputView that masquerades as a UITextField, and forwards -// selectors it can't respond to to a shared UITextField instance. +// selectors it can't respond to a shared UITextField instance. // // Relevant API docs claim that password autofill supports any custom view // that adopts the UITextInput protocol, automatic strong password seems to diff --git a/shell/platform/darwin/macos/framework/Headers/FlutterPluginRegistrarMacOS.h b/shell/platform/darwin/macos/framework/Headers/FlutterPluginRegistrarMacOS.h index 12c7f618a38e8..c341f2354dcd9 100644 --- a/shell/platform/darwin/macos/framework/Headers/FlutterPluginRegistrarMacOS.h +++ b/shell/platform/darwin/macos/framework/Headers/FlutterPluginRegistrarMacOS.h @@ -16,7 +16,7 @@ /** * The protocol for an object managing registration for a plugin. It provides access to application - * context, as as allowing registering for callbacks for handling various conditions. + * context, as allowing registering for callbacks for handling various conditions. * * Currently the macOS PluginRegistrar has very limited functionality, but is expected to expand * over time to more closely match the functionality of FlutterPluginRegistrar. diff --git a/shell/platform/darwin/macos/framework/Source/FlutterTextInputPlugin.mm b/shell/platform/darwin/macos/framework/Source/FlutterTextInputPlugin.mm index d6687772bc7f5..e4d97b5b7d30d 100644 --- a/shell/platform/darwin/macos/framework/Source/FlutterTextInputPlugin.mm +++ b/shell/platform/darwin/macos/framework/Source/FlutterTextInputPlugin.mm @@ -554,7 +554,7 @@ - (void)keyUp:(NSEvent*)event { - (BOOL)performKeyEquivalent:(NSEvent*)event { if ([_flutterViewController isDispatchingKeyEvent:event]) { // When NSWindow is nextResponder, keyboard manager will send to it - // unhandled events (through [NSWindow keyDown:]). If event has has both + // unhandled events (through [NSWindow keyDown:]). If event has both // control and cmd modifiers set (i.e. cmd+control+space - emoji picker) // NSWindow will then send this event as performKeyEquivalent: to first // responder, which is FlutterTextInputPlugin. If that's the case, the diff --git a/shell/platform/embedder/embedder.h b/shell/platform/embedder/embedder.h index bff1be0df26c3..e1a4253becf54 100644 --- a/shell/platform/embedder/embedder.h +++ b/shell/platform/embedder/embedder.h @@ -830,7 +830,7 @@ typedef enum { /// any other buttons are still pressed when one button is released, that /// should be sent as a kMove rather than a kUp. kUp, - /// The pointer, which must have been been up, is now down. + /// The pointer, which must have been up, is now down. /// /// For touch, this means that the pointer has come into contact with the /// screen. For a mouse, it means a button is now pressed. Note that if any diff --git a/shell/platform/embedder/embedder_task_runner.h b/shell/platform/embedder/embedder_task_runner.h index be11912f2b841..5c0e1e845d43b 100644 --- a/shell/platform/embedder/embedder_task_runner.h +++ b/shell/platform/embedder/embedder_task_runner.h @@ -34,7 +34,7 @@ class EmbedderTaskRunner final : public fml::TaskRunner { fml::TimePoint target_time)> post_task_callback; //-------------------------------------------------------------------------- - /// Asks the embedder if tasks posted to it on this task task runner via the + /// Asks the embedder if tasks posted to it on this task runner via the /// `post_task_callback` will be executed (after task expiry) on the calling /// thread. /// diff --git a/shell/platform/embedder/tests/embedder_unittests.cc b/shell/platform/embedder/tests/embedder_unittests.cc index e9616336a598a..ebf916f5cd1c2 100644 --- a/shell/platform/embedder/tests/embedder_unittests.cc +++ b/shell/platform/embedder/tests/embedder_unittests.cc @@ -117,7 +117,7 @@ TEST_F(EmbedderTest, CanInvokeCustomEntrypointMacro) { auto native_entry1 = CREATE_NATIVE_ENTRY(entry1); context.AddNativeCallback("SayHiFromCustomEntrypoint1", native_entry1); - // Can be wrapped in in the args. + // Can be wrapped in the args. auto entry2 = [&latch2](Dart_NativeArguments args) { FML_LOG(INFO) << "In Callback 2"; latch2.Signal(); diff --git a/shell/platform/fuchsia/dart_runner/dart_test_component_controller.h b/shell/platform/fuchsia/dart_runner/dart_test_component_controller.h index 3fbbc422a6244..2d39e73c6232a 100644 --- a/shell/platform/fuchsia/dart_runner/dart_test_component_controller.h +++ b/shell/platform/fuchsia/dart_runner/dart_test_component_controller.h @@ -67,7 +67,7 @@ class DartTestComponentController } private: - /// Helper for actually running the Dart main. Returns Returns a promise. + /// Helper for actually running the Dart main. Returns a promise. fpromise::promise<> RunDartMain(); /// Creates and binds the namespace for this component. Returns true if diff --git a/shell/platform/fuchsia/flutter/tests/integration/utils/portable_ui_test.h b/shell/platform/fuchsia/flutter/tests/integration/utils/portable_ui_test.h index 1e6c0fcb649fb..7440dc52aad58 100644 --- a/shell/platform/fuchsia/flutter/tests/integration/utils/portable_ui_test.h +++ b/shell/platform/fuchsia/flutter/tests/integration/utils/portable_ui_test.h @@ -114,10 +114,10 @@ class PortableUITest : public ::loop_fixture::RealLoop { virtual void ExtendRealm() = 0; // Returns the test-specific test-ui-stack component url to use. - // Usually overriden to return a value from gtest GetParam() + // Usually overridden to return a value from gtest GetParam() virtual std::string GetTestUIStackUrl() = 0; - // Helper method to watch watch for view geometry updates. + // Helper method to watch for view geometry updates. void WatchViewGeometry(); // Helper method to process a view geometry update. diff --git a/shell/platform/fuchsia/runtime/dart/utils/vmservice_object.cc b/shell/platform/fuchsia/runtime/dart/utils/vmservice_object.cc index fc196bb847880..5c196e8a45172 100644 --- a/shell/platform/fuchsia/runtime/dart/utils/vmservice_object.cc +++ b/shell/platform/fuchsia/runtime/dart/utils/vmservice_object.cc @@ -37,7 +37,7 @@ namespace dart_utils { void VMServiceObject::GetContents(LazyEntryVector* out_vector) const { // List /tmp/dart.services if it exists, and push its contents as - // as the conrtents of this directory. + // the contents of this directory. std::vector files; if (!ReadDirContents(kPortDir, &files)) { FX_LOGF(ERROR, LOG_TAG, diff --git a/shell/platform/glfw/client_wrapper/BUILD.gn b/shell/platform/glfw/client_wrapper/BUILD.gn index 6f1faae1f534c..fa4209369281e 100644 --- a/shell/platform/glfw/client_wrapper/BUILD.gn +++ b/shell/platform/glfw/client_wrapper/BUILD.gn @@ -19,7 +19,7 @@ _wrapper_sources = [ # This code will be merged into .../common/cpp/client_wrapper for client use, # so uses header paths that assume the merged state. Include the header -# header directory of the core wrapper files so these includes will work. +# directory of the core wrapper files so these includes will work. config("relative_core_wrapper_headers") { include_dirs = [ "//flutter/shell/platform/common/client_wrapper/include/flutter" ] diff --git a/shell/platform/glfw/client_wrapper/include/flutter/flutter_window_controller.h b/shell/platform/glfw/client_wrapper/include/flutter/flutter_window_controller.h index 60bc4c151e9aa..22cf2d2fa3c18 100644 --- a/shell/platform/glfw/client_wrapper/include/flutter/flutter_window_controller.h +++ b/shell/platform/glfw/client_wrapper/include/flutter/flutter_window_controller.h @@ -64,7 +64,7 @@ class FlutterWindowController : public PluginRegistry { // // The |arguments| are passed to the Flutter engine. See: // https://github.com/flutter/engine/blob/main/shell/common/switches.h for - // for details. Not all arguments will apply to desktop. + // details. Not all arguments will apply to desktop. // // The |aot_library_path| is the path to the libapp.so file for the Flutter // application to be run. While this parameter is only required in AOT mode, diff --git a/shell/platform/linux/fl_engine_private.h b/shell/platform/linux/fl_engine_private.h index 879e4f54b5ed0..fad99c598137d 100644 --- a/shell/platform/linux/fl_engine_private.h +++ b/shell/platform/linux/fl_engine_private.h @@ -100,7 +100,7 @@ FlutterEngineProcTable* fl_engine_get_embedder_api(FlEngine* engine); * Registers the function called when a platform message is received. Call * fl_engine_send_platform_message_response() with the response to this message. * Ownership of #FlutterPlatformMessageResponseHandle is - * transferred to the caller, and the message must be responded to to avoid + * transferred to the caller, and the message must be responded to avoid * memory leaks. */ void fl_engine_set_platform_message_handler( diff --git a/shell/platform/linux/fl_event_channel_test.cc b/shell/platform/linux/fl_event_channel_test.cc index d40ad3276ea11..7a4529945b6e4 100644 --- a/shell/platform/linux/fl_event_channel_test.cc +++ b/shell/platform/linux/fl_event_channel_test.cc @@ -66,7 +66,7 @@ static void cancel_channel(FlBinaryMessenger* messenger, FlValue* args) { nullptr, nullptr); } -// Called when when the remote end starts listening on the channel. +// Called when the remote end starts listening on the channel. static FlMethodErrorResponse* listen_listen_cb(FlEventChannel* channel, FlValue* args, gpointer user_data) { @@ -98,7 +98,7 @@ TEST(FlEventChannelTest, Listen) { g_object_unref(channel); } -// Called when when the remote end starts listening on the channel. +// Called when the remote end starts listening on the channel. static FlMethodErrorResponse* listen_exception_listen_cb( FlEventChannel* channel, FlValue* args, @@ -161,7 +161,7 @@ TEST(FlEventChannelTest, ListenException) { g_object_unref(channel); } -// Called when when the remote end cancels their subscription. +// Called when the remote end cancels their subscription. static FlMethodErrorResponse* cancel_cancel_cb(FlEventChannel* channel, FlValue* args, gpointer user_data) { @@ -194,7 +194,7 @@ TEST(FlEventChannelTest, Cancel) { g_object_unref(channel); } -// Called when when the remote end cancels their subscription. +// Called when the remote end cancels their subscription. static FlMethodErrorResponse* cancel_exception_cancel_cb( FlEventChannel* channel, FlValue* args, @@ -267,7 +267,7 @@ TEST(FlEventChannelTest, CancelException) { g_object_unref(channel); } -// Called when when the remote end starts listening on the channel. +// Called when the remote end starts listening on the channel. static FlMethodErrorResponse* args_listen_cb(FlEventChannel* channel, FlValue* args, gpointer user_data) { @@ -277,7 +277,7 @@ static FlMethodErrorResponse* args_listen_cb(FlEventChannel* channel, return nullptr; } -// Called when when the remote end cancels their subscription. +// Called when the remote end cancels their subscription. static FlMethodErrorResponse* args_cancel_cb(FlEventChannel* channel, FlValue* args, gpointer user_data) { @@ -313,7 +313,7 @@ TEST(FlEventChannelTest, Args) { g_object_unref(channel); } -// Called when when the remote end starts listening on the channel. +// Called when the remote end starts listening on the channel. static FlMethodErrorResponse* send_events_listen_cb(FlEventChannel* channel, FlValue* args, gpointer user_data) { diff --git a/shell/platform/linux/fl_method_channel_test.cc b/shell/platform/linux/fl_method_channel_test.cc index 74b9294c60e03..bcbaead6fb59a 100644 --- a/shell/platform/linux/fl_method_channel_test.cc +++ b/shell/platform/linux/fl_method_channel_test.cc @@ -14,7 +14,7 @@ #include "flutter/shell/platform/linux/testing/fl_test.h" #include "flutter/shell/platform/linux/testing/mock_renderer.h" -// Called when when the method call response is received in the InvokeMethod +// Called when the method call response is received in the InvokeMethod // test. static void method_response_cb(GObject* object, GAsyncResult* result, @@ -53,7 +53,7 @@ TEST(FlMethodChannelTest, InvokeMethod) { g_main_loop_run(loop); } -// Called when when the method call response is received in the +// Called when the method call response is received in the // InvokeMethodNullptrArgsMessage test. static void nullptr_args_response_cb(GObject* object, GAsyncResult* result, @@ -89,7 +89,7 @@ TEST(FlMethodChannelTest, InvokeMethodNullptrArgsMessage) { g_main_loop_run(loop); } -// Called when when the method call response is received in the +// Called when the method call response is received in the // InvokeMethodError test. static void error_response_cb(GObject* object, GAsyncResult* result, @@ -137,7 +137,7 @@ TEST(FlMethodChannelTest, InvokeMethodError) { g_main_loop_run(loop); } -// Called when when the method call response is received in the +// Called when the method call response is received in the // InvokeMethodNotImplemented test. static void not_implemented_response_cb(GObject* object, GAsyncResult* result, @@ -170,7 +170,7 @@ TEST(FlMethodChannelTest, InvokeMethodNotImplemented) { g_main_loop_run(loop); } -// Called when when the method call response is received in the +// Called when the method call response is received in the // InvokeMethodFailure test. static void failure_response_cb(GObject* object, GAsyncResult* result, diff --git a/shell/platform/windows/keyboard_key_handler.h b/shell/platform/windows/keyboard_key_handler.h index 5e152f5ace8db..321fcabbe31ed 100644 --- a/shell/platform/windows/keyboard_key_handler.h +++ b/shell/platform/windows/keyboard_key_handler.h @@ -71,7 +71,7 @@ class KeyboardKeyHandler : public KeyboardHandlerBase { // Windows requires a synchronous response of whether a key event should be // handled, while the query to Flutter is always asynchronous. This is // resolved by the "redispatching" algorithm: by default, the response to a - // fresh event is always always true. The event is then sent to the framework. + // fresh event is always true. The event is then sent to the framework. // If the framework later decides not to handle the event, this class will // create an identical event and dispatch it to the system, and remember all // synthesized events. The fist time an exact event (by |ComputeEventHash|) is diff --git a/shell/platform/windows/keyboard_manager.h b/shell/platform/windows/keyboard_manager.h index 0b1025bb8bef2..07f0904965c9b 100644 --- a/shell/platform/windows/keyboard_manager.h +++ b/shell/platform/windows/keyboard_manager.h @@ -43,7 +43,7 @@ namespace flutter { class KeyboardManager { public: // Define how the keyboard manager accesses Win32 system calls (to allow - // mocking) and sends key calls and and text calls. + // mocking) and sends key calls and text calls. // // Typically implemented by |Window|. class WindowDelegate { diff --git a/third_party/accessibility/ax/platform/ax_platform_node_delegate.h b/third_party/accessibility/ax/platform/ax_platform_node_delegate.h index 4a1bdc5c3e83e..448f4de5da035 100644 --- a/third_party/accessibility/ax/platform/ax_platform_node_delegate.h +++ b/third_party/accessibility/ax/platform/ax_platform_node_delegate.h @@ -311,7 +311,7 @@ class AX_EXPORT AXPlatformNodeDelegate { // produce appropriate results. It may optionally return no value, indicating // that the delegate does not have all the information required to calculate // this value and it is the responsibility of the AXPlatformNode itself to - // to calculate it. + // calculate it. virtual std::optional FindTextBoundary( ax::mojom::TextBoundary boundary, int offset, diff --git a/third_party/accessibility/ax/platform/ax_platform_node_textrangeprovider_win_unittest.cc b/third_party/accessibility/ax/platform/ax_platform_node_textrangeprovider_win_unittest.cc index dd05ca891dcd9..02ce8a4a8d629 100644 --- a/third_party/accessibility/ax/platform/ax_platform_node_textrangeprovider_win_unittest.cc +++ b/third_party/accessibility/ax/platform/ax_platform_node_textrangeprovider_win_unittest.cc @@ -4398,7 +4398,7 @@ TEST_F(AXPlatformNodeTextRangeProviderTest, } { - // |heading_text_node| has a a spelling error for one word, and no + // |heading_text_node| has a spelling error for one word, and no // annotations for the remaining text, so the range has mixed annotations. EXPECT_UIA_TEXTATTRIBUTE_MIXED(heading_text_range_provider, UIA_AnnotationTypesAttributeId); diff --git a/third_party/accessibility/ax/platform/ax_platform_node_win.h b/third_party/accessibility/ax/platform/ax_platform_node_win.h index cf977b4c7f845..1a00db956ef2d 100644 --- a/third_party/accessibility/ax/platform/ax_platform_node_win.h +++ b/third_party/accessibility/ax/platform/ax_platform_node_win.h @@ -698,7 +698,7 @@ class AX_EXPORT __declspec(uuid("26f5641a-246d-457b-a96d-07f3fae6acf2")) }; // Determine if a text range overlaps a |marker_type|, and whether - // the overlap is a partial or or complete match. + // the overlap is a partial or complete match. MarkerTypeRangeResult GetMarkerTypeFromRange( const std::optional& start_offset, const std::optional& end_offset, diff --git a/third_party/txt/src/txt/font_collection.cc b/third_party/txt/src/txt/font_collection.cc index 96c1b1b325331..f5d5022c7fc33 100644 --- a/third_party/txt/src/txt/font_collection.cc +++ b/third_party/txt/src/txt/font_collection.cc @@ -254,7 +254,7 @@ void FontCollection::SortSkTypefaces( // of multiple widths (e.g. condensed, expanded), opt to be // conservative and select the most standard width. // - // If a specific width is desired, it should be be narrowed down via + // If a specific width is desired, it should be narrowed down via // the family name. // // The font weights are also sorted lightest to heaviest but Flutter diff --git a/third_party/txt/src/utils/TypeHelpers.h b/third_party/txt/src/utils/TypeHelpers.h index 9bd10a4ee1b96..311b1379eefec 100644 --- a/third_party/txt/src/utils/TypeHelpers.h +++ b/third_party/txt/src/utils/TypeHelpers.h @@ -66,7 +66,7 @@ struct traits { has_trivial_ctor = is_pointer || trait_trivial_ctor::value, // whether this type's destructor is a no-op has_trivial_dtor = is_pointer || trait_trivial_dtor::value, - // whether this type type can be copy-constructed with memcpy + // whether this type can be copy-constructed with memcpy has_trivial_copy = is_pointer || trait_trivial_copy::value, // whether this type can be moved with memmove has_trivial_move = is_pointer || trait_trivial_move::value diff --git a/tools/fuchsia/gn-sdk/config/config.gni b/tools/fuchsia/gn-sdk/config/config.gni index 3be92db282634..cc6fa6287bafd 100644 --- a/tools/fuchsia/gn-sdk/config/config.gni +++ b/tools/fuchsia/gn-sdk/config/config.gni @@ -14,7 +14,7 @@ declare_args() { # requires the Fuchsia _Core_ SDK (for dart libraries, in the core SDK, but # excluded from the GN SDK), the Fuchsia SDK assumption that the build files # are in the same SDK directory path as the APIs does not hold true. (And - # there are are a couple of other minor tweaks that appear to be needed, at + # there are a couple of other minor tweaks that appear to be needed, at # this time.) This use case will be discussed with the SDK team, to see if we # can come up with a cleaner solution. diff --git a/tools/gn b/tools/gn index 90e91b8bcbc42..747d6b0a84364 100755 --- a/tools/gn +++ b/tools/gn @@ -391,8 +391,7 @@ def to_gn_args(args): # Desktop embeddings can have more dependencies than the engine library, # which can be problematic in some build environments (e.g., building on # Linux will bring in pkg-config dependencies at generation time). These - # flags allow preventing those those targets from being part of the build - # tree. + # flags allow preventing those targets from being part of the build tree. gn_args['enable_desktop_embeddings'] = not args.disable_desktop_embeddings # Overrides whether Boring SSL is compiled with system as. Only meaningful