Skip to content

[Impeller] determine correct behavior of entity pass bounds fractional values. #145180

Closed

Description

@jonahwilliams

See also: #144213

We added a roundOut to the bounds of entity passes, that resulted in odd behavior for blurs. This was better on master with the new blurs, but in theory it shouldn't happen.

This is a tracking issue to figure out what the right solution is that doesn't cause flickering of blurs.

FYI @flar

Activity

  1. added
    e: impellerImpeller rendering backend issues and features requests
    P2Important issues not at the top of the work list
    on Mar 14, 2024
  2. jason-simmons commented on Mar 19, 2024

    @jason-simmons
    Contributor

    Possibly related to this:

    After flutter-team-archive/engine@622b372 I'm now seeing a one pixel line between the two halves of the square when running this app on a Pixel 6a or Pixel 7a:

    import 'package:flutter/material.dart';
    import 'dart:ui' as ui;
    
    void main() {
      runApp(CustomPaint(
          size: const Size(300, 300),
          painter: TestPainter(),
          child: Container(),
      ));
    }
    
    class TestPainter extends CustomPainter {
      void paint(Canvas canvas, Size size) {
        canvas.drawRect(Rect.fromLTRB(0, 0, 300, 300), Paint()..color = Color.fromARGB(255, 255, 0, 255));
        canvas.saveLayer(Rect.fromLTRB(0, 0, 300, 300), Paint()..blendMode = BlendMode.srcOver);
        canvas.drawRect(Rect.fromLTRB(0, 0, 150, 300), Paint()..color = Color.fromARGB(150, 0, 0, 255));
        canvas.restore();
        canvas.drawRect(Rect.fromLTRB(150, 0, 300, 300), Paint()..color = Color.fromARGB(150, 0, 0, 255));
      }
    
      bool shouldRepaint(covariant CustomPainter oldDelegate) => true;
    }
    

    The square renders with a consistent color if I add the round out of subpass_coverage back to EntityPass::GetEntityForElement.

  3. jonahwilliams commented on Jun 11, 2024

    @jonahwilliams
    ContributorAuthor

    Turns out we do need to round out. This was fixed by @bdero

  4. github-actions commented on Jun 25, 2024

    @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.

  5. locked as resolved and limited conversation to collaborators on Jun 25, 2024
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

    P2Important issues not at the top of the work liste: impellerImpeller rendering backend issues and features requeststeam-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