Repository: flutter
Issue: [iOS] Switching focus to TextField with obscureText causes glitches on iPhone 13 Pro.
Labels: a: text input,e: device-specific,platform-ios,engine,c: performance,c: rendering,P2,team-ios,triaged-ios


## Steps to Reproduce

Use an iPhone 13 Pro to reproduce the bug.
It may be linked to ProMotion.
I tried to reproduce it on iPad Air, but I didn't observe the bug.

It's kind of hard to see on video. But it's obvious with the naked eye.

1. Execute `flutter run` on the code sample.
2. Tap on the `Email` text field.
3. Tap on the `Password` test field.

**Expected results:** <!-- what did you want to see? -->
The screen glitches.

**Actual results:** <!-- what did you see? -->
The screen doesn't glitch.

<details>
<summary>Code sample</summary>


```dart
class MyHomePage extends StatelessWidget {
  const MyHomePage({Key? key, required this.title}) : super(key: key);

  final String title;

  @override
  Widget build(BuildContext context) {
    return Scaffold(
      appBar: AppBar(
        title: Text(title),
      ),
      body: Center(
        child: Column(
          mainAxisAlignment: MainAxisAlignment.center,
          children: const <Widget>[
            TextField(decoration: InputDecoration(labelText: 'Email')),
            SizedBox(height: 16),
            TextField(
              decoration: InputDecoration(labelText: 'Password'),
              obscureText: true,
            )
          ],
        ),
      ),
    );
  }
}
```

</details>

<details>
  <summary>Logs</summary>

`flutter run --verbose` :

```bash
[        ] Application launched on the device. Waiting for observatory url.
[+2593 ms] Observatory URL on device: http://127.0.0.1:54911/
[   +5 ms] Attempting to forward device port 54911 to host port 61452
[        ] executing: user/flutter/bin/cache/artifacts/usbmuxd/iproxy
61452:54911 --udid 00008110-000A0D280E84801E --debug
[+1009 ms] Forwarded port ForwardedPort HOST:61452 to DEVICE:54911
[   +2 ms] Forwarded host port 61452 to device port 54911 for Observatory
[   +3 ms] Installing and launching... (completed in 15,0s)
[   +3 ms] Caching compiled dill
[  +96 ms] Connecting to service protocol: http://127.0.0.1:61452/
[ +133 ms] Launching a Dart Developer Service (DDS) instance at http://127.0.0.1:0, connecting to VM
service at http://127.0.0.1:61452/.
[  +88 ms] DDS is listening at http://127.0.0.1:61455/5qtnDnd6mgs=/.
[  +62 ms] Successfully connected to service protocol: http://127.0.0.1:61452/
[  +53 ms] DevFS: Creating new filesystem on the device (null)
[  +27 ms] DevFS: Created new filesystem on the device
(file:///private/var/mobile/Containers/Data/Application/37DCF4D9-38F2-40A5-8460-564CE79D26F5/tmp/text_f
ield_glitch3J91zg/text_field_glitch/)
[   +5 ms] Updating assets
[  +82 ms] Syncing files to device iPhone 13 Pro...
[   +2 ms] <- reset
[        ] Compiling dart to kernel with 0 updated files
[        ] Processing bundle.
[   +1 ms] <- recompile package:text_field_glitch/main.dart 1cb4de63-9bcb-49bf-8a9a-710d5eb2e64d
[        ] <- 1cb4de63-9bcb-49bf-8a9a-710d5eb2e64d
[   +1 ms] Bundle processing done.
[ +118 ms] Updating files.
[        ] DevFS: Sync finished
[   +1 ms] Syncing files to device iPhone 13 Pro... (completed in 124ms)
[        ] Synced 0.0MB.
[   +1 ms] <- accept
[   +4 ms] Connected to _flutterView/0x14b019820.
[   +2 ms] Flutter run key commands.
[   +1 ms] r Hot reload. 🔥🔥🔥
[        ] R Hot restart.
[        ] h List all available interactive commands.
[        ] d Detach (terminate "flutter run" but leave application running).
[        ] c Clear the screen
[        ] q Quit (terminate the application on the device).
[        ] 💪 Running with sound null safety 💪
[        ] An Observatory debugger and profiler on iPhone 13 Pro is available at:
           http://127.0.0.1:61455/5qtnDnd6mgs=/
[ +101 ms] The Flutter DevTools debugger and profiler on iPhone 13 Pro is available at:
                    http://127.0.0.1:9101?uri=http://127.0.0.1:61455/5qtnDnd6mgs=/
```

`flutter analyze`:

```bash
Analyzing text_field_glitch...                                          
No issues found! (ran in 2.3s)
```

`flutter doctor -v` :

```bash
[✓] Flutter (Channel master, 2.13.0-0.0.pre.737, on macOS 12.3 21E230 darwin-x64, locale fr-FR)
    • Flutter version 2.13.0-0.0.pre.737 at /Users/matthieup/programation/flutter
    • Upstream repository https://github.com/flutter/flutter.git
    • Framework revision bc7d3bbc65 (81 minutes ago), 2022-04-26 11:24:05 +0200
    • Engine revision cd78221a88
    • Dart version 2.18.0 (build 2.18.0-58.0.dev)
    • DevTools version 2.12.2

[!] Android toolchain - develop for Android devices (Android SDK version 30.0.3)
    • Android SDK at /user/Library/Android/sdk
    ✗ cmdline-tools component is missing
      Run `path/to/sdkmanager --install "cmdline-tools;latest"`
      See https://developer.android.com/studio/command-line for more details.
    ✗ Android license status unknown.
      Run `flutter doctor --android-licenses` to accept the SDK licenses.
      See https://flutter.dev/docs/get-started/install/macos#android-setup for more details.

[✓] Xcode - develop for iOS and macOS (Xcode 13.3)
    • Xcode at /Applications/Xcode.app/Contents/Developer
    • CocoaPods version 1.11.2

[✓] Chrome - develop for the web
    • Chrome at /Applications/Google Chrome.app/Contents/MacOS/Google Chrome

[✓] Android Studio (version 2020.3)
    • Android Studio at /Applications/Android Studio.app/Contents
    • Flutter plugin can be installed from:
      🔨 https://plugins.jetbrains.com/plugin/9212-flutter
    • Dart plugin can be installed from:
      🔨 https://plugins.jetbrains.com/plugin/6351-dart
    • Java version OpenJDK Runtime Environment (build 11.0.10+0-b96-7281165)

[✓] VS Code (version 1.66.2)
    • VS Code at /Applications/Visual Studio Code.app/Contents
    • Flutter extension version 3.38.1

[✓] VS Code (version 1.47.3)
    • VS Code at /Users/matthieup/Downloads/Visual Studio Code 2.app/Contents
    • Flutter extension version 3.38.1

[✓] Connected device (3 available)
    • iPhone 13 Pro (mobile)      • 00008110-**************** • ios            • iOS 15.4.1 19E258
    • iPad de Developers (mobile) • 00008103-**************** • ios            • iOS 15.4 19E241
    • Chrome (web)                • chrome                    • web-javascript • Google Chrome
      100.0.4896.127

[✓] HTTP Host Availability
    • All required HTTP hosts are available

! Doctor found issues in 1 category.
```

</details>



https://user-images.githubusercontent.com/28344195/165288866-8f47ed6b-e4ce-47e8-9dc4-f3e678596cd2.mov