Repository navigation
Commit 497ab92
authored
iOS: Eliminate use of IOSContextNoop in platform view tests (reland) (flutter#190509)
This relands flutter#190419, which I reverted in flutter#190501 because it broke the
tree due to a (non-merge) conflict with flutter#190416.
flutter#190419 added a local `FakeIOSContext` whose `GetBackend()` override
returned `flutter::IOSRenderingBackend::kImpeller`.
flutter#190416 landed immediately before it and removed the
`IOSContext::GetBackend()` virtual and the `IOSRenderingBackend` enum,
so the two changes had no merge conflicts but `FakeIOSContext` no longer
compiled once both were in the tree.
This reland is identical other than deleting the `GetBackend()`
override. `FakeIOSContext` still inherits the null Impeller/Aiks
contexts from the base class and returns no external texture, matching
the behaviour the tests rely on.
Original change:
`FlutterPlatformViewsTest` used the internal engine class
`flutter::IOSContextNoop` in a dozen places purely as a no-op context to
hand to `submitFrame:withIosContext:`. This replaces those with a local
`FakeIOSContext` that replicates the behaviour the tests rely on so that
we can delete `IOSContextNoop` in a follow-up.
Back in ancient times, before the simulator required Metal, and when iOS
still had a Skia software renderer, we ran that on the Simulator due to
some issues with our OpenGL implementation. Later, Flutter on iOS
migrated from Skia to Impeller. Skia supports a software backend but
Impeller did not, and so when running on Impeller, we stubbed out the
software backend to no-op context/surfaces, hence IOSContextNoop and
IOSSurfaceNoop. The Simulator now *requires* Metal and Flutter has
eliminated Skia support altogether so there's no longer a software mode
at all, nor a need for a no-op path in case you're using Impeller and
ask for a software backend.
This is part of a series of changes to remove the dead no-op fallback.
No behavioural change; just a test refactoring.
Issue: flutter#190041
<!--
Thanks for filing a pull request!
Reviewers are typically assigned within a week of filing a request.
To learn more about code review, see our documentation on Tree Hygiene:
https://github.com/flutter/flutter/blob/main/docs/contributing/Tree-hygiene.md
-->
## Pre-launch Checklist
- [X] I read the [Contributor Guide] and followed the process outlined
there for submitting PRs.
- [X] I read the [AI contribution guidelines] and understand my
responsibilities, or I am not using AI tools.
- [X] I read the [Tree Hygiene] wiki page, which explains my
responsibilities.
- [X] I read and followed the [Flutter Style Guide], including [Features
we expect every widget to implement].
- [X] I signed the [CLA].
- [X] I listed at least one issue that this PR fixes in the description
above.
- [X] I updated/added relevant documentation (doc comments with `///`).
- [X] I added new tests to check the change I am making, or this PR is
[test-exempt].
- [X] I followed the [breaking change policy] and added [Data Driven
Fixes] where supported.
- [X] All existing and new tests are passing.
If you need help, consider asking for advice on the #hackers-new channel
on [Discord].
If this change needs to override an active code freeze, provide a
comment explaining why. The code freeze workflow can be overridden by
code reviewers. See pinned issues for any active code freezes with
guidance.
**Note**: The Flutter team is currently trialing the use of [Gemini Code
Assist for
GitHub](https://developers.google.com/gemini-code-assist/docs/review-github-code).
Comments from the `gemini-code-assist` bot should not be taken as
authoritative feedback from the Flutter team. If you find its comments
useful you can update your code accordingly, but if you are unsure or
disagree with the feedback, please feel free to wait for a Flutter team
member's review for guidance on which automated comments should be
addressed.
<!-- Links -->
[Contributor Guide]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Tree-hygiene.md#overview
[AI contribution guidelines]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Tree-hygiene.md#ai-contribution-guidelines
[Tree Hygiene]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Tree-hygiene.md
[test-exempt]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Tree-hygiene.md#tests
[Flutter Style Guide]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Style-guide-for-Flutter-repo.md
[Features we expect every widget to implement]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Style-guide-for-Flutter-repo.md#features-we-expect-every-widget-to-implement
[CLA]: https://cla.developers.google.com/
[flutter/tests]: https://github.com/flutter/tests
[breaking change policy]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Tree-hygiene.md#handling-breaking-changes
[Discord]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Chat.md
[Data Driven Fixes]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Data-driven-Fixes.md1 parent 89b263d commit 497ab92
1 file changed
Lines changed: 37 additions & 29 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
26 | 26 | | |
27 | 27 | | |
28 | 28 | | |
29 | | - | |
| 29 | + | |
30 | 30 | | |
31 | 31 | | |
32 | 32 | | |
33 | 33 | | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
34 | 50 | | |
35 | 51 | | |
36 | 52 | | |
| |||
4225 | 4241 | | |
4226 | 4242 | | |
4227 | 4243 | | |
4228 | | - | |
4229 | | - | |
4230 | | - | |
| 4244 | + | |
| 4245 | + | |
4231 | 4246 | | |
4232 | 4247 | | |
4233 | 4248 | | |
| |||
4242 | 4257 | | |
4243 | 4258 | | |
4244 | 4259 | | |
4245 | | - | |
4246 | | - | |
4247 | | - | |
| 4260 | + | |
| 4261 | + | |
4248 | 4262 | | |
4249 | 4263 | | |
4250 | 4264 | | |
| |||
4431 | 4445 | | |
4432 | 4446 | | |
4433 | 4447 | | |
4434 | | - | |
4435 | | - | |
4436 | | - | |
| 4448 | + | |
| 4449 | + | |
4437 | 4450 | | |
4438 | 4451 | | |
4439 | 4452 | | |
| |||
4460 | 4473 | | |
4461 | 4474 | | |
4462 | 4475 | | |
4463 | | - | |
4464 | | - | |
4465 | | - | |
| 4476 | + | |
| 4477 | + | |
4466 | 4478 | | |
4467 | 4479 | | |
4468 | 4480 | | |
| |||
4535 | 4547 | | |
4536 | 4548 | | |
4537 | 4549 | | |
4538 | | - | |
4539 | | - | |
4540 | | - | |
| 4550 | + | |
| 4551 | + | |
4541 | 4552 | | |
4542 | 4553 | | |
4543 | 4554 | | |
| |||
4564 | 4575 | | |
4565 | 4576 | | |
4566 | 4577 | | |
4567 | | - | |
4568 | | - | |
4569 | | - | |
| 4578 | + | |
| 4579 | + | |
4570 | 4580 | | |
4571 | 4581 | | |
4572 | 4582 | | |
| |||
5015 | 5025 | | |
5016 | 5026 | | |
5017 | 5027 | | |
5018 | | - | |
5019 | | - | |
5020 | | - | |
| 5028 | + | |
| 5029 | + | |
5021 | 5030 | | |
5022 | 5031 | | |
5023 | 5032 | | |
| |||
5042 | 5051 | | |
5043 | 5052 | | |
5044 | 5053 | | |
5045 | | - | |
5046 | | - | |
5047 | | - | |
| 5054 | + | |
| 5055 | + | |
5048 | 5056 | | |
5049 | 5057 | | |
5050 | 5058 | | |
| |||
5108 | 5116 | | |
5109 | 5117 | | |
5110 | 5118 | | |
5111 | | - | |
| 5119 | + | |
5112 | 5120 | | |
5113 | 5121 | | |
5114 | 5122 | | |
| |||
5174 | 5182 | | |
5175 | 5183 | | |
5176 | 5184 | | |
5177 | | - | |
| 5185 | + | |
5178 | 5186 | | |
5179 | 5187 | | |
5180 | 5188 | | |
| |||
5243 | 5251 | | |
5244 | 5252 | | |
5245 | 5253 | | |
5246 | | - | |
| 5254 | + | |
5247 | 5255 | | |
5248 | 5256 | | |
5249 | 5257 | | |
| |||
5354 | 5362 | | |
5355 | 5363 | | |
5356 | 5364 | | |
5357 | | - | |
| 5365 | + | |
5358 | 5366 | | |
5359 | 5367 | | |
5360 | 5368 | | |
| |||
0 commit comments