Skip to content

[Impeller] Android screen rotations can leave app with outdated swapchain transform. #138780

@BBUBBA

Description

@BBUBBA

Is there an existing issue for this?

Steps to reproduce

  1. Repo. https://github.com/BBUBBA/rotatetest
  2. Run.
  3. Click - rotate1, rotate2, rotate3

Expected results

The Android screen rotates horizontally or vertically.

Actual results

The Android screen is divided in half.
When the home screen is moved and re-executed, the screen is output normally.

(Android Emulator, Galaxy S22, and Galaxy S23 are the same symptoms.)

Code sample

Code sample
[Paste your code here]

void _rotate1() {
    SystemChrome.setPreferredOrientations([
      DeviceOrientation.landscapeLeft,
      DeviceOrientation.landscapeRight,
    ]);
    setState(() {
      _rotate = 1;
    });
  }

  void _rotate2() {
    SystemChrome.setPreferredOrientations([
      DeviceOrientation.portraitUp,
      DeviceOrientation.portraitDown,
    ]);
    setState(() {
      _rotate = 2;
    });
  }

  void _rotate3() {
    SystemChrome.setPreferredOrientations([
      DeviceOrientation.portraitUp,
      DeviceOrientation.portraitDown,
      DeviceOrientation.landscapeRight,
      DeviceOrientation.landscapeLeft,
    ]);
    setState(() {
      _rotate = 3;
    });
  }

Screenshots or Video

Screenshots / Video demonstration

[Upload media here]

image

image

image

Logs

Logs
[Paste your logs here]

Flutter Doctor output

Doctor output
[Paste your output here]

[√] Flutter (Channel stable, 3.16.0, on Microsoft Windows [Version 10.0.19045.3570], locale ko-KR)
    • Flutter version 3.16.0 on channel stable at C:\flutter
    • Upstream repository https://github.com/flutter/flutter.git
    • Framework revision db7ef5bf9f (6 days ago), 2023-11-15 11:25:44 -0800
    • Engine revision 74d16627b9
    • Dart version 3.2.0
    • DevTools version 2.28.2

    • Chrome at C:\Program Files\Google\Chrome\Application\chrome.exe

[√] Visual Studio - develop Windows apps (Visual Studio Professional 2022 17.7.7)
    • Visual Studio at C:\Program Files\Microsoft Visual Studio\2022\Professional
    • Visual Studio Professional 2022 version 17.7.34302.85
    • Windows 10 SDK version 10.0.19041.0

[√] Android Studio (version 2022.3)
    • Android Studio at C:\Program Files\Android\Android Studio
    • 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.6+0-b2043.56-10027231)

[√] VS Code (version 1.84.2)
    • VS Code at C:\Users\csh34\AppData\Local\Programs\Microsoft VS Code
    • Flutter extension version 3.68.0

[√] Connected device (4 available)
    • sdk gphone64 x86 64 (mobile) • emulator-5554 • android-x64    • Android 12 (API 32) (emulator)
    • Windows (desktop)            • windows       • windows-x64    • Microsoft Windows [Version 10.0.19045.3570]
    • Chrome (web)                 • chrome        • web-javascript • Google Chrome 119.0.6045.160
    • Edge (web)                   • edge          • web-javascript • Microsoft Edge 119.0.2151.72

[√] Network resources
    • All expected network resources are available.

• No issues found!

Metadata

Metadata

Assignees

Labels

P2Important issues not at the top of the work liste: impellerImpeller rendering backend issues and features requestsengineflutter/engine related. See also e: labels.platform-androidAndroid applications specificallyr: fixedIssue is closed as already fixed in a newer versionteam-engineOwned by Engine teamtriaged-engineTriaged by Engine team

Type

No type

Projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions