Repository: flutter
Issue: [Impeller] performance degradation (some times flickering) on MotoG52 y Samsung A52
Labels: P2,e: impeller,team-engine,triaged-engine,from: manual-qa,e: impeller-naughty-driver

### Steps to reproduce

Tool-chain:
- Xcode 16.0 Beta 4.
- Android Studio 2024.1.2 RC 1
- 3.24.0-1.0.pre.516 (Channel master)
- MotoG52 (Android 13) - Samsung A52 (Android 14 - OneUI 6.1)

-----------------------------------------------------------------------

1. Clone the Wonderous app [repository](https://github.com/gskinnerTeam/flutter-wonderous-app) from GitHub.
2. Navigate to the root directory of the project and launch the app in profile mode targeting a device using the command: `flutter run --profile` So you can later compare metrics.
3. Navigate through different screens of the app and record the metrics observed (in this impeller is enabled by default)
4. Disable impeller by adding `<meta-data android:name="io.flutter.embedding.android.EnableImpeller" android:value="false" />` to the manifest
5. Run the in profile mode again: `flutter run --profile`
6. Compare results.






### Expected results

Similar or better performance is expected while running the app using Impeller.

### Actual results

Noticeable drop in FPS, increase in Janks & Shader Compilation. 
Sometimes flickering was also observed while navigating.

-------

**Results**:

[Motorola G52](https://www.gsmarena.com/motorola_moto_g52-11457.php) - Android 13:

Impeller **ENABLED**

![image](https://github.com/user-attachments/assets/275203ec-f5c4-4202-a659-1bcf337596dd)

Impeller **DISABLED**

![image](https://github.com/user-attachments/assets/b9df52ef-2daf-49ab-878f-6654660686d9)

--------

Results:

[Samsung A52](https://www.gsmarena.com/samsung_galaxy_a52-10641.php) - Android 14:

Impeller **ENABLED**

![image](https://github.com/user-attachments/assets/59efc1ab-cf87-4a75-adef-564c583642ce)

Impeller **DISABLED**

![image](https://github.com/user-attachments/assets/4ce0c0b2-dac2-4334-a92b-7550eef30922)

---------

Additionally, not 100% consistently, we were noticing flickering. 

Not sure if it will be noted on video, but here is a recording on The Samsung Galaxy A52.


https://github.com/user-attachments/assets/9c557778-74cf-47f2-b3a2-1c96f7542834






### Code sample

<details open><summary>Code sample</summary>

```dart
[Paste your code here]
```

</details>


### Screenshots or Video

<details open>
<summary>Screenshots / Video demonstration</summary>

[Upload media here]

</details>


### Logs

<details open><summary>Logs</summary>

```console
[Paste your logs here]
```

</details>


### Flutter Doctor output

<details open><summary>Doctor output</summary>

```console
[✓] Flutter (Channel master, 3.24.0-1.0.pre.516, on macOS 14.5 23F79 darwin-arm64, locale en-US)
    • Flutter version 3.24.0-1.0.pre.516 on channel master at /Users/josefinadiz/flutter/flutter
    • Upstream repository https://github.com/flutter/flutter.git
    • Framework revision d67f2cdebb (25 hours ago), 2024-08-08 13:51:06 -0400
    • Engine revision 3978ddd8d7
    • Dart version 3.6.0 (build 3.6.0-128.0.dev)
    • DevTools version 2.38.0

[✓] Android toolchain - develop for Android devices (Android SDK version 35.0.0)
    • Android SDK at /Users/josefinadiz/Library/Android/sdk
    • Platform android-35, build-tools 35.0.0
    • Java binary at: /Applications/Android Studio.app/Contents/jbr/Contents/Home/bin/java
    • Java version OpenJDK Runtime Environment (build 17.0.11+0-17.0.11b1207.24-11852314)
    • All Android licenses accepted.

[✓] Xcode - develop for iOS and macOS (Xcode 16.0)
    • Xcode at /Applications/Xcode-beta.app/Contents/Developer
    • Build 16A5221g
    • CocoaPods version 1.15.2

[✓] Chrome - develop for the web
    • Chrome at /Applications/Google Chrome.app/Contents/MacOS/Google Chrome

[✓] Android Studio (version 2024.1)
    • 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 17.0.11+0-17.0.11b1207.24-11852314)

[✓] VS Code (version 1.92.1)
    • VS Code at /Applications/Visual Studio Code.app/Contents
    • Flutter extension version 3.94.0

[✓] Connected device (3 available)            
    • macOS (desktop)                 • macos                 • darwin-arm64   • macOS 14.5 23F79 darwin-arm64
    • Mac Designed for iPad (desktop) • mac-designed-for-ipad • darwin         • macOS 14.5 23F79 darwin-arm64
    • Chrome (web)                    • chrome                • web-javascript • Google Chrome 127.0.6533.100

[✓] Network resources
    • All expected network resources are available.

• No issues **found!**
```

</details>