Skip to content

[engine] Not specifying populate_existing_damage should result in full repaint #119601

@swift-kim

Description

@swift-kim

I'm using my own custom embedder (which is based on the engine's Embedder API) and I have a rendering issue after upgrading the engine from 3.3 to 3.7 (stable). According to my experiment, it seems the newly added API populate_existing_damage is not functioning as it is described in the documentation. It says not specifying the callback will result in full repaint but in reality, the repaint does not occur.

  /// ...
  /// ID. Not specifying populate_existing_damage will result in full
  /// repaint (i.e. rendering all the pixels on the screen at every frame).
  FlutterFrameBufferWithDamageCallback populate_existing_damage;

I think the problem is with either the return value of gl_populate_existing_damage in embedder.cc or the supports_partial_repaint flag in embedder_surface_gl.cc:

https://github.com/flutter/engine/blob/9448f2966c1127854d155b8f780d5580b6903554/shell/platform/embedder/embedder.cc#L332-L333

https://github.com/flutter/engine/blob/aa00da3c161296e7a31df1839f816b4a8ec9ea3f/shell/platform/embedder/embedder_surface_gl.cc#L91-L92

  • Shouldn't existing_damage be set to std::nullopt instead of SkIRect::MakeEmpty()?
  • The partial_repaint_enabled value is not used anywhere.
  • Isn't supports_partial_repaint always true?

One way to work around the issue is to implement the populate_existing_damage callback in my embedder, but I think that's not a real solution. Could anybody confirm that this is a regression in the engine?

cc @betrevisan @iskakaushik

Logs
$ flutter doctor -v
[!] Flutter (Channel unknown, 3.7.0, on Ubuntu 20.04.5 LTS 5.15.0-56-generic, locale en_US.UTF-8)
    ! Flutter version 3.7.0 on channel unknown at /home/swift/Git/flutter-tizen/flutter
      Currently on an unknown channel. Run `flutter channel` to switch to an official channel.
      If that doesn't fix the issue, reinstall Flutter by following instructions at https://flutter.dev/docs/get-started/install.
    ! Unknown upstream repository.
      Reinstall Flutter by following instructions at https://flutter.dev/docs/get-started/install.
    • Framework revision b06b8b2710 (7 days ago), 2023-01-23 16:55:55 -0800
    • Engine revision b24591ed32
    • Dart version 2.19.0
    • DevTools version 2.20.1
    • If those were intentional, you can disregard the above warnings; however it is recommended to use "git" directly to perform update checks and upgrades.

Metadata

Metadata

Assignees

No one assigned

    Labels

    P2Important issues not at the top of the work liste: embedderUsers of the Embedder APIengineflutter/engine related. See also e: labels.r: fixedIssue is closed as already fixed in a newer versionteam-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