Skip to content
This repository was archived by the owner on Feb 25, 2025. It is now read-only.

Conversation

@mdebbar
Copy link
Contributor

@mdebbar mdebbar commented Jun 22, 2023

Old API in dart:ui New API in dart:ui_web
webOnlyInitializePlatform ui_web.initializePlatform
webOnlyWarmupEngine ui_web.bootstrapEngine
debugEmulateFlutterTesterEnvironment ui_web.debugEmulateFlutterTesterEnvironment
webOnlySetPluginHandler ui_web.setPluginHandler

Part of flutter/flutter#126831

@mdebbar mdebbar requested review from ditman and yjbanov June 22, 2023 21:49
@github-actions github-actions bot added the platform-web Code specifically for the web engine label Jun 22, 2023
/// Flutter framework.
///
/// Unlike [warmupEngine], this method initializes UI and non-UI services.
Future<void> initializePlatform() async {
Copy link
Contributor

Choose a reason for hiding this comment

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

Why not call it initializeEngine?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

No reason. I just removed the webOnly prefix from the name. I think initializeEngine makes more sense, and is more consistent with warmupEngine.

}
// TODO(mdebbar): Deprecate this and remove it.
// https://github.com/flutter/flutter/issues/127395
bool get debugEmulateFlutterTesterEnvironment {
Copy link
Member

Choose a reason for hiding this comment

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

Is this something that is needed for end users, or is this only for our testing? If it's only for our engine testing, it probably should live within engine or similar, rather than be exposed to web_ui?

Copy link
Member

Choose a reason for hiding this comment

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

(Never mind, this is used all over the bootstrap and the framework!)

Copy link
Contributor

Choose a reason for hiding this comment

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

Alternatively, this could be hidden behind JS-interop, if we don't want it to show up in the public APIs.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

debugEmulateFlutterTesterEnvironment has effect on several things including the usage of Ahem font. If users want their tests to produce real text (e.g. for screenshots), they have to disable debugEmulateFlutterTesterEnvironment.

@mdebbar
Copy link
Contributor Author

mdebbar commented Jun 27, 2023

  1. Not moving webOnlyInitializePlatform to dart:ui_web anymore. We might be able to switch all call sites to use bootstrapEngine instead.
  2. Renamed warmupEngine to bootstrapEngine.
  3. Updated the docs of bootstrapEngine.

@mdebbar mdebbar requested review from ditman and yjbanov June 27, 2023 19:39
@mdebbar mdebbar added the autosubmit Merge PR when tree becomes green via auto submit App label Jun 29, 2023
@auto-submit auto-submit bot merged commit 9a3d191 into flutter:main Jun 29, 2023
engine-flutter-autoroll added a commit to engine-flutter-autoroll/flutter that referenced this pull request Jun 29, 2023
auto-submit bot pushed a commit to flutter/flutter that referenced this pull request Jun 29, 2023
flutter/engine@cd9ce66...68cc1a7

2023-06-29 skia-flutter-autoroll@skia.org Roll Skia from a4d0373cd414 to c83f8ba23a80 (3 revisions) (flutter/engine#43340)
2023-06-29 mdebbar@google.com [web] Move web-only initialization APIs to `dart:ui_web` (flutter/engine#43111)
2023-06-29 skia-flutter-autoroll@skia.org Roll Skia from 8ada2c4b2947 to a4d0373cd414 (14 revisions) (flutter/engine#43338)
2023-06-29 skia-flutter-autoroll@skia.org Roll Dart SDK from 656201921b30 to ecc2440be198 (1 revision) (flutter/engine#43333)
2023-06-29 skia-flutter-autoroll@skia.org Roll Skia from 0c320b3d5b64 to 8ada2c4b2947 (1 revision) (flutter/engine#43332)
2023-06-29 skia-flutter-autoroll@skia.org Roll Fuchsia Linux SDK from fxCNy4QivAngZXkvM... to nboAFpQUzwtrESDVo... (flutter/engine#43334)
2023-06-29 kustermann@google.com Prepare for utf8.encode() to return more precise Uint8List type (flutter/engine#43335)
2023-06-29 jason-simmons@users.noreply.github.com [Impeller] Ensure that the auto-release pool is available when the GoldenPlaygroundTestImpl is destructed (flutter/engine#43322)
2023-06-29 uysalere@gmail.com [fuchsia] Remove strict equality check for SkMatrix comparison for Fl� (flutter/engine#43309)
2023-06-29 jason-simmons@users.noreply.github.com [Impeller] Add an autorelease pool to the GoldenTests fixture (flutter/engine#43323)

Also rolling transitive DEPS:
  fuchsia/sdk/core/linux-amd64 from fxCNy4QivAng to nboAFpQUzwtr

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

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

To report a problem with the AutoRoller itself, please file a bug:
https://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
kjlubick pushed a commit to kjlubick/engine that referenced this pull request Jul 14, 2023
| Old API in `dart:ui` | New API in `dart:ui_web` |
|-|-|
| ~`webOnlyInitializePlatform`~ | ~`ui_web.initializePlatform`~ |
| `webOnlyWarmupEngine` | `ui_web.bootstrapEngine` |
| `debugEmulateFlutterTesterEnvironment` | `ui_web.debugEmulateFlutterTesterEnvironment` |
| `webOnlySetPluginHandler` | `ui_web.setPluginHandler` |

Part of flutter/flutter#126831
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

autosubmit Merge PR when tree becomes green via auto submit App platform-web Code specifically for the web engine

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants