Skip to content

[Linux] Not clearing backbuffer before drawing. #143408

@gspencergoog

Description

@gspencergoog

On the main branch, I created this very simple Flutter app:

import 'package:flutter/material.dart';

/// Flutter code sample for [MenuAnchor].

void main() {
  debugFocusChanges = false;
  runApp(const MenuApp());
}

class MenuApp extends StatelessWidget {
  const MenuApp({super.key});

  @override
  Widget build(BuildContext context) {
    final ThemeData theme = ThemeData.from(colorScheme: const ColorScheme.light());

    return MaterialApp(
        theme: theme,
        home: Center(
          child: Column(
            children: <Widget>[
              FilledButton.tonal(
                onPressed: () { },
                child: const Text('Tonal'),
              ),
              FilledButton.tonalIcon(
                onPressed: () { },
                icon: const Icon(Icons.add),
                label: const Text('TonalIcon'),
              ),
            ],
          ),
        ),
      );
  }
}

And ran it on my Linux machine, I got a window that didn't clear the backbuffer when switching buffers, leaving an interesting artifact filled image.

output.mp4
flutter doctor -v
[✓] Flutter (Channel main, 3.20.0-7.0.pre.31, on Debian GNU/Linux rodete 6.5.13-1rodete2-amd64, locale en_US.UTF-8)
    • Flutter version 3.20.0-7.0.pre.31 on channel main at /usr/local/google/home/gspencer/code/flutter
    • Upstream repository [email protected]:flutter/flutter.git
    • Framework revision 5025681129 (57 minutes ago), 2024-02-13 21:48:41 +0000
    • Engine revision 0091a4914d
    • Dart version 3.4.0 (build 3.4.0-138.0.dev)
    • DevTools version 2.33.0-dev.6

[✓] Android toolchain - develop for Android devices (Android SDK version 32.1.0-rc1)
    • Android SDK at /usr/local/google/home/gspencer/Android/Sdk
    • Platform android-33, build-tools 32.1.0-rc1
    • ANDROID_HOME = /usr/local/google/home/gspencer/Android/Sdk
    • Java binary at: /usr/bin/java
    • Java version OpenJDK Runtime Environment (build 17.0.10+7-Debian-1)
    • All Android licenses accepted.

[✓] Chrome - develop for the web
    • Chrome at google-chrome

[✓] Linux toolchain - develop for Linux desktop
    • Debian clang version 16.0.6 (16)
    • cmake version 3.27.7
    • ninja version 1.11.1
    • pkg-config version 1.8.1

[!] Android Studio (not installed)
    • Android Studio not found; download from https://developer.android.com/studio/index.html
      (or visit https://flutter.dev/docs/get-started/install/linux#android-setup for detailed instructions).

[✓] Connected device (2 available)
    • Linux (desktop) • linux  • linux-x64      • Debian GNU/Linux rodete 6.5.13-1rodete2-amd64
    • Chrome (web)    • chrome • web-javascript • Google Chrome 121.0.6167.160

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

! Doctor found issues in 1 category.

Metadata

Metadata

Assignees

No one assigned

    Labels

    P2Important issues not at the top of the work listc: renderingUI glitches reported at the engine/skia or impeller rendering levelengineflutter/engine related. See also e: labels.platform-linuxBuilding on or for Linux specificallyteam-linuxOwned by the Linux platform teamwaiting for customer responseThe Flutter team cannot make further progress on this issue until the original reporter responds

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions