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

Switch macOS embedding to proc table embedder API #21811

Merged
merged 10 commits into from
Nov 3, 2020

Conversation

stuartmorgan
Copy link
Contributor

@stuartmorgan stuartmorgan commented Oct 13, 2020

Description

Converts the macOS embedding to use the new proc table version of the embedding API, and adds one example unit test using it to demonstrate and validate the approach.

Related Issues

flutter/flutter#66935

Tests

I added the following tests: One example macOS engine test demonstrating mocking an embedder method.

Checklist

Before you create this PR confirm that it meets all requirements listed below by checking the relevant checkboxes ([x]). This will ensure a smooth and quick review process.

  • I read the contributor guide and followed the process outlined there for submitting PRs.
  • I signed the CLA.
  • I read and followed the C++, Objective-C, Java style guides for the engine.
  • I read the tree hygiene wiki page, which explains my responsibilities.
  • I updated/added relevant documentation.
  • All existing and new tests are passing.
  • I am willing to follow-up on review comments in a timely manner.

Reviewer Checklist

Breaking Change

Did any tests fail when you ran them? Please read handling breaking changes.

  • No, no existing tests failed, so this is not a breaking change.
  • Yes, this is a breaking change.

@stuartmorgan
Copy link
Contributor Author

Let me know if you'd like me to split the macOS changes out into a separate PR; it's easily separable, but I thought it would be useful to have and end-to-end example for initial review.

@chinmaygarde
Copy link
Member

Let me know if you'd like me to split the macOS changes out into a separate PR.

I'd prefer it if you don't mind. I'd be more comfortable evaluating the usability of the PR on its own if the changes for a specific embedder were separated out. You can even just rework this PR into two separate commits if thats easier.

@stuartmorgan
Copy link
Contributor Author

Split out into #21813; I'll make this a draft for now and then rebase it once that one lands.

@stuartmorgan stuartmorgan changed the title Add a proc table version of embedder API Switch macOS embedding to proc table embedder API Oct 13, 2020
@stuartmorgan stuartmorgan marked this pull request as draft October 13, 2020 17:18
@stuartmorgan stuartmorgan removed the request for review from chinmaygarde October 29, 2020 22:13
@stuartmorgan stuartmorgan force-pushed the darwin-jump-table-tests branch from 1622295 to e982221 Compare October 29, 2020 22:16
@stuartmorgan stuartmorgan requested a review from cbracken October 29, 2020 22:17
@stuartmorgan stuartmorgan marked this pull request as ready for review October 29, 2020 22:17
@stuartmorgan
Copy link
Contributor Author

There's some minor unit test cleanup here; while adding the example test I found that the test file naming was inconsistent within this embedding, so I standardized it to match naming in the iOS embedding.

defines = [ "FLUTTER_FRAMEWORK" ]
defines = [
"FLUTTER_FRAMEWORK",
"FLUTTER_ENGINE_NO_PROTOTYPES",
Copy link
Member

@cbracken cbracken Oct 31, 2020

Choose a reason for hiding this comment

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

Looks like this breaks FlutterEngine.mm due to a few symbols defined in the #infndef FLUTTER_ENGINE_NO_PROTOTYPES block added in #21813:

  • FlutterEngineCollectAOTData
  • FlutterEngineRunsAOTCompiledDartCode
  • FlutterEngineCreateAOTData

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I apparently didn't rebuild locally after rebasing on master 😳 The code that's not compiling is new, so hadn't been updated to use the proc table.

Copy link
Member

@cbracken cbracken left a comment

Choose a reason for hiding this comment

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

lgtm for the change modulo breakage w.r.t. #21813

@stuartmorgan stuartmorgan merged commit 3d194fa into flutter:master Nov 3, 2020
@stuartmorgan stuartmorgan deleted the darwin-jump-table-tests branch November 3, 2020 05:44
engine-flutter-autoroll added a commit to engine-flutter-autoroll/flutter that referenced this pull request Nov 3, 2020
engine-flutter-autoroll added a commit to engine-flutter-autoroll/flutter that referenced this pull request Nov 3, 2020
engine-flutter-autoroll added a commit to engine-flutter-autoroll/flutter that referenced this pull request Nov 3, 2020
engine-flutter-autoroll added a commit to engine-flutter-autoroll/flutter that referenced this pull request Nov 3, 2020
engine-flutter-autoroll added a commit to engine-flutter-autoroll/flutter that referenced this pull request Nov 3, 2020
cbracken pushed a commit to flutter/flutter that referenced this pull request Nov 3, 2020
* c597333 Roll Skia from f548a028ce70 to c21902c0d3cc (46 revisions) (flutter/engine#22224)

* 37d766c Fix includes to start with shell (flutter/engine#22227)

* 1ad6765 [web] Fixes canvas pixelation and overallocation due to transforms.  (flutter/engine#22160)

* 9f9fc1f Roll Skia from c21902c0d3cc to 9615bcf71f2a (1 revision) (flutter/engine#22226)

* 0faa72e Roll Dart SDK from fed66f60a3bc to 25ef5dc559cf (1 revision) (flutter/engine#22225)

* 172a393 Report image diff status for iOS scenario golden tests (flutter/engine#22230)

* fddabca updating integration tests version. (flutter/engine#22235)

* a36bcdc Roll Fuchsia Mac SDK from mhak7e_o6... to 8SkbMXJJ9... (flutter/engine#22231)

* 6a331d3 Roll Skia from 9615bcf71f2a to d5e6368fffd0 (8 revisions) (flutter/engine#22234)

* 9b34207 Fixing semantics borders on mobile web (flutter/engine#21856)

* 4e9459e Refactored the FlutterEngine to make it easier to implement spawn functionality (flutter/engine#21890)

* fa77e68 disable AppLifecycleTests (flutter/engine#22236)

* 153775b update golden (flutter/engine#22247)

* 50dbe85 [web] fix hot restart type error (flutter/engine#22248)

* c8cf09a Roll Skia from d5e6368fffd0 to 7585a65ac709 (7 revisions) (flutter/engine#22237)

* 68e2e46 Roll Fuchsia Mac SDK from 8SkbMXJJ9... to Pz4ZHZrUp... (flutter/engine#22246)

* d3182bc Roll Dart SDK from 25ef5dc559cf to 5acb5fcf84cb (4 revisions) (flutter/engine#22243)

* 9b4bb20 makes android semanticsnode to ignore hittest if it is not focusable (flutter/engine#22205)

* 3c7a54e Roll Fuchsia Linux SDK from sNx8qabBn... to QqGvMWaYk... (flutter/engine#22244)

* eea98b2 Roll Skia from 7585a65ac709 to dffd20efe95c (14 revisions) (flutter/engine#22250)

* 46e3bba Defer Windows arrow key and delete handling (flutter/engine#22207)

* 14437d6 fix _getArrayBuffer signature (flutter/engine#22251)

* 8defec6 Fix nullability issue with Image.network (flutter/engine#22252)

* 67d55ed Roll Dart SDK from 5acb5fcf84cb to a9d583383410 (4 revisions) (flutter/engine#22255)

* 7c8f57c Report error when instantiating CanvasKit network image (flutter/engine#22159)

* 9945db3 Remove the metrics task from cirrus. (flutter/engine#22240)

* bd19181 Add braces on if statements to match linter style (flutter/engine#22130)

* e9c62e7 do not print in _computePixelDensity (flutter/engine#22257)

* 2617101 Roll Dart SDK from a9d583383410 to d2577410a501 (1 revision) (flutter/engine#22258)

* 3d194fa Switch macOS embedding to proc table embedder API (flutter/engine#21811)

* 31b6f0b Roll Fuchsia Mac SDK from Pz4ZHZrUp... to 6yEx5GNGG... (flutter/engine#22262)

* 78a0181 Roll Fuchsia Linux SDK from QqGvMWaYk... to oLF1FW-gC... (flutter/engine#22264)

* ccdb681 WeakPersistentHandle migration (flutter/engine#19843)

* ce0a30c Roll Dart SDK from 52783837369d to b43baaaa477d (723 revisions) (flutter/engine#22265)

* 59b01e0 [web] Fix repaint logic for cullrect,transform changes (flutter/engine#22273)
chaselatta pushed a commit to chaselatta/engine that referenced this pull request Nov 30, 2020
Converts the macOS embedding to use the new proc table version of the embedding API, and adds one example unit test using it to demonstrate and validate the approach.
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants