Skip to content

[Impeller] [Android] Text Shadow with CJK characters causes severe raster jank in ListView #184496

Open

Description

@dkajiwara

Steps to reproduce

  1. Create a ListView.builder with items containing Text with shadows (blurRadius: 4)
  2. Use CJK characters (e.g. Japanese) for the text content
  3. Run on an Android device with Impeller enabled in profile mode
  4. Scroll the list

Expected results

Smooth scrolling without raster jank, comparable to Skia.

Actual results

Severe raster thread jank occurs during scrolling. The issue is significantly worse with CJK characters compared to Latin characters.

Code sample

Code sample
import 'dart:ui';

import 'package:flutter/material.dart';

void main() {
  runApp(const App());
}

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

  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      title: 'Impeller Text Shadow Perf',
      theme: ThemeData(colorSchemeSeed: Colors.blue),
      home: const TextShadowListScreen(),
    );
  }
}

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

  static const _shadows = [
    Shadow(color: Color.fromRGBO(0, 0, 0, 0.35), blurRadius: 4),
    Shadow(
      color: Color.fromRGBO(0, 0, 0, 0.25),
      offset: Offset(0, 4),
      blurRadius: 4,
    ),
  ];

  @override
  Widget build(BuildContext context) {
    return Scaffold(
      appBar: AppBar(title: const Text('Text Shadow Jank')),
      body: ListView.builder(
        itemCount: 30,
        itemBuilder: (context, index) {
          return Padding(
            padding: const EdgeInsets.symmetric(horizontal: 16, vertical: 8),
            child: ClipRRect(
              borderRadius: BorderRadius.circular(12),
              child: SizedBox(
                height: 220,
                child: Stack(
                  fit: StackFit.expand,
                  children: [
                    Image.network(
                      'https://picsum.photos/seed/$index/400/300',
                      fit: BoxFit.cover,
                    ),
                    Positioned(
                      left: 0,
                      right: 0,
                      bottom: 0,
                      child: Container(
                        color: Colors.black.withValues(alpha: 0.5),
                        padding: const EdgeInsets.all(16),
                        child: Text(
                          'これはサンプルテキストです。日本語の影付きテキスト #${index + 1}',
                          style: const TextStyle(
                            color: Colors.white,
                            fontSize: 18,
                            fontWeight: FontWeight.bold,
                            shadows: _shadows,
                          ),
                        ),
                      ),
                    ),
                  ],
                ),
              ),
            ),
          );
        },
      ),
    );
  }
}

Screenshots or Video

Screenshots / Video demonstration ### Video comparison (with Performance Overlay enabled)
Impeller (Japanese text) Skia (Japanese text) Impeller (English text)
impeller_shadow_short.mp4
skia_shadow_short.mp4
impeller_en_short.mp4

Logs

Logs
[Paste your logs here]

Flutter Doctor output

Doctor output
[✓] Flutter (Channel stable, 3.41.6, on macOS 26.3.1 25D2128 darwin-arm64, locale ja-JP) [1,039ms]
    • Flutter version 3.41.6 on channel stable at /Users/dkajiii/.local/share/mise/http-tarballs/99d17a780e1f8e4bf51665d91611913d064da37d40b16f1dd219f08ba1fc379c
    • Upstream repository https://github.com/flutter/flutter.git
    • Framework revision db50e20168 (7 days ago), 2026-03-25 16:21:00 -0700
    • Engine revision 425cfb54d0
    • Dart version 3.11.4
    • DevTools version 2.54.2
    • Feature flags: enable-web, enable-linux-desktop, enable-macos-desktop, enable-windows-desktop, enable-android, enable-ios, cli-animations, enable-native-assets, omit-legacy-version-file, enable-lldb-debugging, enable-uiscene-migration

[!] Android toolchain - develop for Android devices (Android SDK version 35.0.0-rc3) [2.2s]
    • Android SDK at /Users/dkajiii/Library/Android/sdk
    • Emulator version 36.3.10.0 (build_id 14472402) (CL:N/A)
    • Platform android-36, build-tools 35.0.0-rc3
    • Java binary at: /Applications/Android Studio Narwhal.app/Contents/jbr/Contents/Home/bin/java
      This is the JDK bundled with the latest Android Studio installation on this machine.
      To manually set the JDK path, use: `flutter config --jdk-dir="path/to/jdk"`.
    • Java version OpenJDK Runtime Environment (build 21.0.10+-117844308-b1163.108)
    ! Some Android licenses not accepted. To resolve this, run: flutter doctor --android-licenses

[✓] Xcode - develop for iOS and macOS (Xcode 26.2) [1,900ms]
    • Xcode at /Applications/Xcode_26.2.app/Contents/Developer
    • Build 17C52
    • CocoaPods version 1.16.2

[✓] Chrome - develop for the web [4ms]
    • Chrome at /Applications/Google Chrome.app/Contents/MacOS/Google Chrome

[✓] Connected device (4 available) [7.6s]
    • Pixel 7a (mobile)      • 36141JEHN18318                       • android-arm64  • Android 16 (API 36)

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

! Doctor found issues in 1 category.

Activity

  1. added
    in triage
    on Apr 2, 2026
  2. saurabh-mirajkar commented on Apr 2, 2026

    @saurabh-mirajkar
    Contributor

    @dkajiwara Thanks for the report. Labelling for team-engine to investigate further.

  3. added
    platform-android
    engine
    has reproducible steps
    e: impeller
    team-engine
    and removed
    in triage
    on Apr 2, 2026
  4. added
    P2
    triaged-engine
    on Apr 6, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    P2e: impellerenginehas reproducible stepsplatform-androidteam-enginetriaged-engine

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions