Skip to content

[Impeller] Filled arcs with transparent colors have incorrect colors on iOS and macOS #178839

@b-luk

Description

@b-luk

Steps to reproduce

Draw a filled arc with a transparent color on iOS or macOS with Impeller enabled.

Impeller is currently the default on iOS, but not on macOS. So to repro on macOS, explicitly enable Impeller (i.e. flutter run --enable-impeller).

Does not repro on Android.

Expected results

Image

Actual results

Image

Code sample

Code sample
import 'dart:math' as math show pi;

import 'package:flutter/material.dart';

void main() {
  runApp(MyApp());
}

class MyApp extends StatelessWidget {
  @override
  Widget build(BuildContext context) {
    return Container(
      color: Colors.white,
      child: CustomPaint(painter: TestPainter()),
    );
  }
}

class TestPainter extends CustomPainter {
  @override
  void paint(Canvas canvas, Size size) {
    canvas.drawArc(
      Rect.fromCircle(center: size.center(Offset.zero), radius: 100),
      0,
      1.5 * math.pi,
      true,
      Paint()
        ..color = Colors.blue.withAlpha(127)
        ..style = PaintingStyle.fill,
    );
  }

  @override
  bool shouldRepaint(covariant CustomPainter oldDelegate) => false;
}

Screenshots or Video

Screenshots / Video demonstration

See above

Logs

Logs
[Paste your logs here]

Flutter Doctor output

Doctor output
[Paste your output here]

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.team-engineOwned by Engine teamtriaged-engineTriaged by Engine team

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions