Skip to content

BackdropFilter blur ignores ClipOval when a UiKitView is in the tree (Impeller, iOS, regression persists in 3.44.4) #188971

Closed

Description

@foux

On iOS with Impeller, a BackdropFilter wrapped in a ClipOval samples and
paints its blur over the widget's rectangular bounds — a square halo — as
soon as a UiKitView is present in the same scene. Without the platform
view the clip is honored. #175048 describes this family and was closed as
fixed via #115926's fix (available since 3.41), but this reproduces on
stable 3.44.4.

Repro

Stack(children: [
  const SizedBox.expand(
    child: UiKitView(viewType: 'any-registered-view-type'),
  ),
  Center(
    child: SizedBox(
      width: 60, height: 60,
      child: ClipOval(
        child: BackdropFilter(
          filter: ImageFilter.blur(sigmaX: 10, sigmaY: 10),
          child: const ColoredBox(color: Color(0x66000000)),
        ),
      ),
    ),
  ),
])
  • Square blur halo around the circle when the UiKitView renders bright
    content beneath.
  • Replace the UiKitView with a bright ColoredBox → perfect circle.
  • BackdropFilter.grouped inside a BackdropGroup shows the same bleed.

Environment

  • Flutter 3.44.4 (stable), Impeller default renderer
  • iPhone 13 Pro Max, iOS 27.0
  • Hybrid composition platform view (AVFoundation video layer in our app)

Happy to provide captures of each variant (with/without platform view,
grouped/ungrouped).

Activity

  1. saurabh-mirajkar commented on Jul 6, 2026

    @saurabh-mirajkar
    Contributor

    @foux Thanks for the report. Can you verify if the issue persists in the latest master? If it does, can you provide a minimal reproducible example (MRE) or a self-contained main.dart to replicate the behavior as the provided sample in not enough?

  2. added
    waiting for responseThe Flutter team cannot make further progress on this issue until the original reporter responds
    needs repro infoAutomated crash report whose cause isn't yet known
    and removed
    in triagePresently being triaged by the triage team
    on Jul 6, 2026
  3. foux commented on Jul 6, 2026

    @foux
    Author

    @saurabh-mirajkar Thanks for looking at this. Verified on latest master — still reproduces, identical to stable.

    • master: Flutter 3.46.0-1.0.pre-423, revision a3222d4a24 (2026-07-06) → square blur halo
    • stable 3.44.4 → square blur halo (as reported)

    Self-contained main.dart below. The only dependency is webview_flutter (flutter pub add webview_flutter), used purely as a convenient first-party platform view — any UiKitView triggers the bug (in our app it is an AVFoundation video layer). The FAB swaps the platform view for an identical Flutter-drawn stripe pattern; with the platform view gone the blur is correctly clipped to the circle, with it present the blur paints over the widget's full rectangular bounds.

    main.dart
    // Minimal reproduction for https://github.com/flutter/flutter/issues/188971
    //
    // A BackdropFilter wrapped in a ClipOval paints its blur over the widget's
    // rectangular bounds (square halo) as soon as a UiKitView is present in the
    // same scene. webview_flutter is used only as a convenient first-party
    // platform view rendering bright content underneath the filter.
    //
    // Tap the FAB to swap the platform view for an identical Flutter-drawn
    // stripe pattern: the blur is then correctly clipped to a circle.
    
    import 'dart:ui';
    
    import 'package:flutter/material.dart';
    import 'package:webview_flutter/webview_flutter.dart';
    
    void main() => runApp(const ReproApp());
    
    class ReproApp extends StatefulWidget {
      const ReproApp({super.key});
    
      @override
      State<ReproApp> createState() => _ReproAppState();
    }
    
    class _ReproAppState extends State<ReproApp> {
      late final WebViewController _controller;
      bool _usePlatformView = true;
    
      @override
      void initState() {
        super.initState();
        _controller = WebViewController()
          ..loadHtmlString(
            '<body style="margin:0;height:100vh;background:'
            'repeating-linear-gradient(45deg,#000 0 20px,#fff 20px 40px)"></body>',
          );
      }
    
      // Same stripes as the HTML page, rendered by Flutter itself.
      static const _stripes = DecoratedBox(
        decoration: BoxDecoration(
          gradient: LinearGradient(
            begin: Alignment.topLeft,
            end: Alignment(-0.98, -0.96),
            colors: [Colors.black, Colors.black, Colors.white, Colors.white],
            stops: [0, 0.5, 0.5, 1],
            tileMode: TileMode.repeated,
          ),
        ),
      );
    
      @override
      Widget build(BuildContext context) {
        return MaterialApp(
          home: Scaffold(
            body: Stack(
              children: [
                // Bright background: platform view (bug) or plain widget (OK).
                SizedBox.expand(
                  child: _usePlatformView
                      ? WebViewWidget(controller: _controller)
                      : _stripes,
                ),
                Center(
                  child: SizedBox(
                    width: 120,
                    height: 120,
                    child: ClipOval(
                      child: BackdropFilter(
                        filter: ImageFilter.blur(sigmaX: 10, sigmaY: 10),
                        child: const ColoredBox(color: Color(0x66000000)),
                      ),
                    ),
                  ),
                ),
              ],
            ),
            floatingActionButton: FloatingActionButton.extended(
              onPressed: () =>
                  setState(() => _usePlatformView = !_usePlatformView),
              label: Text(_usePlatformView
                  ? 'platform view (bug)'
                  : 'plain widget (OK)'),
            ),
          ),
        );
      }
    }
    platform view in tree plain widget (control)
    stable 3.44.4 Image Image
    master a3222d4a24 Image Image

    Device: iPhone 13 Pro Max, iOS 27.0, Impeller (default renderer), hybrid composition.

  4. foux commented on Jul 6, 2026

    @foux
    Author

    To rule out the iOS 27 beta as a factor: re-ran the same main.dart on a second device running iOS 26.5.2 (stable) — iPad Pro 12.9" 3rd gen (iPad8,7), same master build (a3222d4a24). Identical result: square blur halo with the platform view in the tree, correct circular clip without it.

    So the bug reproduces on both iOS 26 (stable) and iOS 27 (beta), and is not tied to the OS version.

  5. removed
    waiting for responseThe Flutter team cannot make further progress on this issue until the original reporter responds
    on Jul 6, 2026
  6. saurabh-mirajkar commented on Jul 6, 2026

    @saurabh-mirajkar
    Contributor

    @foux Thanks for the updated repro and verification on both stable and current master. Labeling and routing for further investigation.

  7. added
    platform-iosiOS applications specifically
    a: platform-viewsEmbedding Android/iOS views in Flutter apps
    packageflutter/packages repository. See also p: labels.
    fyi-ecosystemFor the attention of Ecosystem team
    and removed
    needs repro infoAutomated crash report whose cause isn't yet known
    on Jul 6, 2026
  8. 4 remaining items

  9. jmagman commented on Jul 7, 2026

    @jmagman
    Member

    @Hari-07 you may be interested in this one 🙂

  10. Hari-07 commented on Jul 7, 2026

    @Hari-07
    Member

    Ty for the mention.

    This isn't a regression - with the reproducible main.dart shared by OP even though the bug is present, the linked issue was about ClipRRect which is indeed fixed

    @foux as a workaround you can do ClipRRect (if a circle is fine) for the moment. Will get this working soon :)

  11. Hari-07 commented on Jul 7, 2026

    @Hari-07
    Member

    Looks like the current internal implementation of ClipOval on a backdrop propogates as a ClipPath . We do already have an issue that for ClipPath this currently no ops. Which means this issue with get fixed automatically when #179127 is fixed.

    Not sure if that counts as duplicate

  12. jmagman commented on Jul 7, 2026

    @jmagman
    Member

    Makes sense as a duplicate, thanks @Hari-07!

  13. Hari-07 commented on Jul 8, 2026

    @Hari-07
    Member

    A better fix for this is to actually add the optimization that'd make a ClipOval a ClipRRect under the hood since thats more efficient anyway. ApplyClip already has these optimizations so it makes sense that PushClipToEmbeddedNativeViewMutatorStack mirrors them.

    Reopening this issue since that'd seperate the 2 issues

  14. reopened this on Jul 8, 2026
  15. added
    P2Important issues not at the top of the work list
    triaged-iosTriaged by iOS platform team
    on Jul 9, 2026
  16. github-actions commented on Aug 25, 2026

    @github-actions

    This thread has been automatically locked since there has not been any recent activity after it was closed. If you are still experiencing a similar issue, please open a new bug, including the output of flutter doctor -v and a minimal reproduction of the issue.

  17. locked as resolved and limited conversation to collaborators on Aug 25, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

P2Important issues not at the top of the work lista: platform-viewsEmbedding Android/iOS views in Flutter appshas reproducible stepsThe issue has been confirmed reproducible and is ready to work onp: webviewThe WebView pluginpackageflutter/packages repository. See also p: labels.platform-iosiOS applications specificallyteam-iosOwned by iOS platform teamtriaged-iosTriaged by iOS platform team

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions