Skip to content

Impeller issue drawing gradient on Android OpenGLES #162379

@LimaneGaya

Description

@LimaneGaya

Steps to reproduce

  1. Run the sample code on android

Expected results

Gradient to show properly

Actual results

Gradient doesn't show

Code sample

Code sample
import 'package:flutter/material.dart';

void main() => runApp(const MainApp());


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

  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      home: Home(),
    );
  }
}

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

  @override
  Widget build(BuildContext context) {
    return Scaffold(
      body: 
          Container(
            decoration: BoxDecoration(
              gradient: RadialGradient(
                colors: [
                  Colors.blue,
                  Colors.red,
                ],
                center: Alignment.bottomCenter,
                radius: 1.3,
                focal: Alignment.center,
              ),
            ),
      ),
    );
  }
}

Screenshots or Video

Screenshots / Video demonstration
flutter run -d mobile --no-enable-impeller flutter run -d mobile
Image Image

Without radius: 1.3

flutter run -d mobile --no-enable-impeller flutter run -d mobile
Image Image

Logs

Logs
Installing build/app/outputs/flutter-apk/app-debug.apk...           4,5s
I/flutter (10498): [IMPORTANT:flutter/shell/platform/android/android_context_gl_impeller.cc(94)] Using the Impeller rendering backend (OpenGLES).
Syncing files to device 220733SL...                                640ms

Flutter run key commands.
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).

A Dart VM Service on 220733SL is available at: http://127.0.0.1:34475/F8AyT8Q_Q28=/
I/BufferQueueProducer(10498): [SurfaceView[com.gaya.gaya_screens/com.gaya.gaya_screens.MainActivity]#1(BLAST Consumer)1](id:290200000001,api:1,p:10498,c:10498) disconnect: api 1
I/BufferQueueProducer(10498): [SurfaceView[com.gaya.gaya_screens/com.gaya.gaya_screens.MainActivity]#1(BLAST Consumer)1](id:290200000001,api:1,p:10498,c:10498) connect: api=1 producerControlledByApp=true
I/Choreographer(10498): Skipped 263 frames!  The application may be doing too much work on its main thread.
E/OpenGLRenderer(10498): fbcNotifyFrameComplete error: undefined symbol: fbcNotifyFrameComplete
E/OpenGLRenderer(10498): fbcNotifyNoRender error: undefined symbol: fbcNotifyNoRender
I/OpenGLRenderer(10498): Davey! duration=4459ms; Flags=1, FrameTimelineVsyncId=2339109, IntendedVsync=35666712223464, Vsync=35671095556885, InputEventId=0, HandleInputStart=35671103095128, AnimationStart=35671103155667, PerformTraversalsStart=35671103163975, DrawStart=35671106173898, FrameDeadline=35666737723464, FrameInterval=35671102800974, FrameStartTime=16666667, SyncQueued=35671112186206, SyncStart=35671120312053, IssueDrawCommandsStart=35671121972669, SwapBuffers=35671175197905, FrameCompleted=35671180157213, DequeueBufferDuration=0, QueueBufferDuration=2782462, GpuCompleted=35671179384598, SwapBuffersCompleted=35671180157213, DisplayPresentTime=0, 
The Flutter DevTools debugger and profiler on 220733SL is available at: http://127.0.0.1:9100?uri=http://127.0.0.1:34475/F8AyT8Q_Q28=/
D/ProfileInstaller(10498): Installing profile for com.gaya.gaya_screens
E/OpenGLRenderer(10498): EglManager::makeCurrent mED = 0x1, surface = 0x0, mEC = 0xafa2df40, error = EGL_SUCCESS
I/GED     (10498): ged_boost_gpu_freq, level 100, eOrigin 2, final_idx 2, oppidx_max 2, oppidx_min 0
I/BufferQueueProducer(10498): [SurfaceView[com.gaya.gaya_screens/com.gaya.gaya_screens.MainActivity]#1(BLAST Consumer)1](id:290200000001,api:1,p:10498,c:10498) disconnect: api 1
I/BufferQueueProducer(10498): [SurfaceView[com.gaya.gaya_screens/com.gaya.gaya_screens.MainActivity]#1(BLAST Consumer)1](id:290200000001,api:0,p:-1,c:10498) disconnect: api -1
I/BufferQueueProducer(10498): [ViewRootImpl[MainActivity]#0(BLAST Consumer)0](id:290200000000,api:1,p:10498,c:10498) disconnect: api 1
I/BLASTBufferQueue(10498): [ViewRootImpl[MainActivity]#0] destructor()
I/BufferQueueConsumer(10498): [ViewRootImpl[MainActivity]#0(BLAST Consumer)0](id:290200000000,api:0,p:-1,c:10498) disconnect
I/GED     (10498): ged_boost_gpu_freq, level 100, eOrigin 2, final_idx 2, oppidx_max 2, oppidx_min 0
I/BLASTBufferQueue(10498): releaseBufferCallbackThunk bufferId:45088566673410 framenumber:1 blastBufferQueue is dead
I/BufferQueueConsumer(10498): [](id:290200000002,api:0,p:-1,c:10498) connect: controlledByApp=false
I/BLASTBufferQueue(10498): [ViewRootImpl[MainActivity]#2] constructor()
I/BufferQueueProducer(10498): [ViewRootImpl[MainActivity]#2(BLAST Consumer)2](id:290200000002,api:1,p:10498,c:10498) connect: api=1 producerControlledByApp=true
I/BufferQueueConsumer(10498): [](id:290200000003,api:0,p:-1,c:10498) connect: controlledByApp=false
I/BLASTBufferQueue(10498): [SurfaceView[com.gaya.gaya_screens/com.gaya.gaya_screens.MainActivity]#3] constructor()
I/BLASTBufferQueue(10498): [SurfaceView[com.gaya.gaya_screens/com.gaya.gaya_screens.MainActivity]#1] destructor()
I/BufferQueueConsumer(10498): [SurfaceView[com.gaya.gaya_screens/com.gaya.gaya_screens.MainActivity]#1(BLAST Consumer)1](id:290200000001,api:0,p:-1,c:10498) disconnect
I/BufferQueueProducer(10498): [SurfaceView[com.gaya.gaya_screens/com.gaya.gaya_screens.MainActivity]#3(BLAST Consumer)3](id:290200000003,api:1,p:10498,c:10498) connect: api=1 producerControlledByApp=true
I/BLASTBufferQueue(10498): releaseBufferCallbackThunk bufferId:45088566673411 framenumber:2 blastBufferQueue is dead
I/BufferQueueProducer(10498): [SurfaceView[com.gaya.gaya_screens/com.gaya.gaya_screens.MainActivity]#3(BLAST Consumer)3](id:290200000003,api:1,p:10498,c:10498) disconnect: api 1
I/BufferQueueProducer(10498): [SurfaceView[com.gaya.gaya_screens/com.gaya.gaya_screens.MainActivity]#3(BLAST Consumer)3](id:290200000003,api:1,p:10498,c:10498) connect: api=1 producerControlledByApp=true
I/OpenGLRenderer(10498): Davey! duration=282140ms; Flags=1, FrameTimelineVsyncId=2339109, IntendedVsync=35666712223464, Vsync=35671095556885, InputEventId=0, HandleInputStart=35671103095128, AnimationStart=35671103155667, PerformTraversalsStart=35671103163975, DrawStart=35671106173898, FrameDeadline=35666754390131, FrameInterval=35671102800974, FrameStartTime=16666667, SyncQueued=35671112186206, SyncStart=35671120312053, IssueDrawCommandsStart=35671121972669, SwapBuffers=35671175197905, FrameCompleted=35948860977690, DequeueBufferDuration=0, QueueBufferDuration=2782462, GpuCompleted=35948860977690, SwapBuffersCompleted=35671180157213, DisplayPresentTime=0, 

Application finished.

Flutter Doctor output

Doctor output
[!] Flutter (Channel master, 3.29.0-1.0.pre.144, on KDE neon 6.2 6.8.0-52-generic, locale fr_FR.UTF-8) [5,1s]
    • Flutter version 3.29.0-1.0.pre.144 on channel master at /home/gaya/software/flutter_dev
    ! Warning: `flutter` on your path resolves to /home/gaya/.asdf/shims/flutter, which is not inside your current Flutter SDK checkout at
      /home/gaya/software/flutter_dev. Consider adding /home/gaya/software/flutter_dev/bin to the front of your path.
    ! Warning: `dart` on your path resolves to /home/gaya/.asdf/shims/dart, which is not inside your current Flutter SDK checkout at /home/gaya/software/flutter_dev.
      Consider adding /home/gaya/software/flutter_dev/bin to the front of your path.
    • Upstream repository https://github.com/flutter/flutter.git
    • Framework revision 46f96a44e4 (il y a 9 heures), 2025-01-29 11:02:53 +0530
    • Engine revision 46f96a44e4
    • Dart version 3.8.0 (build 3.8.0-24.0.dev)
    • DevTools version 2.42.0
    • If those were intentional, you can disregard the above warnings; however it is recommended to use "git" directly to perform update checks and upgrades.

[✓] Android toolchain - develop for Android devices (Android SDK version 34.0.0) [24,3s]
    • Android SDK at /home/gaya/software/androidsdk/
    • Platform android-35, build-tools 34.0.0
    • ANDROID_HOME = /home/gaya/software/androidsdk/
    • Java binary at: /usr/bin/java
      This JDK was found in the system PATH.
      To manually set the JDK path, use: `flutter config --jdk-dir="path/to/jdk"`.
    • Java version OpenJDK Runtime Environment (build 17.0.13+11-Ubuntu-2ubuntu124.04)
    • All Android licenses accepted.

[✓] Chrome - develop for the web [103ms]
    • CHROME_EXECUTABLE = /var/lib/flatpak/exports/bin/com.brave.Browser

[✓] Linux toolchain - develop for Linux desktop [1 885ms]
    • Ubuntu clang version 18.1.3 (1ubuntu1)
    • cmake version 3.30.5
    • ninja version 1.11.1
    • pkg-config version 1.8.1

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

[✓] VS Code (version 1.96.4) [86ms]
    • VS Code at /snap/code/current/usr/share/code
    • Flutter extension version 3.103.20241202

[✓] Connected device (3 available) [4,6s]
    • 220733SL (mobile) • 192.168.100.55:36277 • android-arm    • Android 12 (API 31)
    • Linux (desktop)   • linux                • linux-x64      • KDE neon 6.2 6.8.0-52-generic
    • Chrome (web)      • chrome               • web-javascript • Brave Browser 132.1.74.50 unknown

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

! Doctor found issues in 2 categories.

Metadata

Metadata

Assignees

No one assigned

    Labels

    e: impellerImpeller rendering backend issues and features requeststeam-engineOwned by Engine team

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions