Skip to content
This repository was archived by the owner on Feb 25, 2025. It is now read-only.

Conversation

@bdero
Copy link
Member

@bdero bdero commented Jun 21, 2023

Resolves flutter/flutter#128353.

Depends on #43026.

  • Maps the texel coordinate space correctly relative to the geometry pixel coordinates.
  • Use decal sampling for subpass textures.
  • Simplify the computation by using new rect utilities such as Rect::Project.

Texture in subpass (the issue was that when copying to the parent pass, this image gets screwed up):
image

Before Impeller:
image

After Impeller:
image

@bdero bdero self-assigned this Jun 21, 2023
@bdero
Copy link
Member Author

bdero commented Jun 21, 2023

The subpass image is getting copied to the parent pass perfectly, and the remaining visible imperfections are due to having only 4 subpixel weights with MSAA.

Copy link
Contributor

@jonahwilliams jonahwilliams left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

@flutter-dashboard
Copy link

Golden file changes have been found for this pull request. Click here to view and triage (e.g. because this is an intentional change).

If you are still iterating on this change and are not ready to resolve the images on the Flutter Gold dashboard, consider marking this PR as a draft pull request above. You will still be able to view image results on the dashboard, commenting will be silenced, and the check will not try to resolve itself until marked ready for review.

Changes reported for pull request #43028 at sha a10f8cb

@flutter-dashboard
Copy link

Golden file changes are available for triage from new commit, Click here to view.

Changes reported for pull request #43028 at sha 40f9af7

@flutter-dashboard
Copy link

Golden file changes are available for triage from new commit, Click here to view.

Changes reported for pull request #43028 at sha 24c239c

@bdero bdero force-pushed the bdero/texture-fill-uvs branch from a005071 to bb9c781 Compare June 22, 2023 06:21
@bdero
Copy link
Member Author

bdero commented Jun 22, 2023

I fixed an issue where I was not mapping the source rect in terms of the texture size, and ended up writing a solution that's much nicer/easier to understand.

// pixel grid if both the source rect and destination rect are given in screen
// space.
auto texture_coords =
Rect::MakeSize(texture_->GetSize()).Project(source_rect_.Expand(0.5));
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This line is all that's needed to correctly compute the texture coordinates. :)

@bdero bdero force-pushed the bdero/texture-fill-uvs branch from aa60990 to c4f3031 Compare June 22, 2023 06:46
@bdero bdero merged commit 8cc6d6d into flutter:main Jun 22, 2023
engine-flutter-autoroll added a commit to engine-flutter-autoroll/flutter that referenced this pull request Jun 22, 2023
zanderso added a commit that referenced this pull request Jun 22, 2023
auto-submit bot pushed a commit that referenced this pull request Jun 22, 2023
Reverts #43028

An engine roll containing only this commit turned the framework tree red with a crasher on Android. I'm a bit concerned because it looked like one of the benchmarks that crashed should not have been using Impeller see flutter/flutter#129353 and https://ci.chromium.org/ui/p/flutter/builders/prod/Linux_android%20animated_blur_backdrop_filter_perf__timeline_summary/1120/overview
engine-flutter-autoroll added a commit to engine-flutter-autoroll/flutter that referenced this pull request Jun 22, 2023
engine-flutter-autoroll added a commit to engine-flutter-autoroll/flutter that referenced this pull request Jun 22, 2023
engine-flutter-autoroll added a commit to engine-flutter-autoroll/flutter that referenced this pull request Jun 22, 2023
auto-submit bot pushed a commit to flutter/flutter that referenced this pull request Jun 22, 2023
…129378)

flutter/engine@703c9a1...ed477de

2023-06-22 [email protected] Roll ANGLE from bbcf54bcb738 to 4ed2d403a329 (7 revisions) (flutter/engine#43105)
2023-06-22 [email protected] Workaround a release blocker after libc++ change (flutter/engine#43091)
2023-06-22 [email protected] Roll Skia from 8168c802c391 to 09b36b8ce0db (1 revision) (flutter/engine#43102)
2023-06-22 [email protected] [Impeller] Reland: Correctly compute UVs in texture fill (flutter/engine#43093)
2023-06-22 [email protected] [Impeller] Add validation forbidding SamplerAddressMode::kDecal on the OpenGLES backend (flutter/engine#43094)
2023-06-22 [email protected] Use minor version, ignore patches for CodeQL (flutter/engine#43088)
2023-06-22 [email protected] Print a warning when a message channel is used on the wrong thread. (flutter/engine#42928)
2023-06-22 [email protected] Roll Skia from 3f3e1da4b7eb to 8168c802c391 (4 revisions) (flutter/engine#43096)
2023-06-22 [email protected] [Impeller] default sample count back to 1 (but configure to 4 in defaults). (flutter/engine#43089)
2023-06-22 [email protected] [web] Don't get break type from v8BreakIterator (flutter/engine#43053)
2023-06-22 [email protected] Roll dart to 3.1.0-239.0.dev (flutter/engine#43083)
2023-06-22 [email protected] Revert "[Impeller] dont use concurrent runner to decode images on Android." (flutter/engine#43061)
2023-06-22 [email protected] [Impeller] Add fence waiter trace event. (flutter/engine#43092)
2023-06-22 [email protected] [Impeller] remove Vulkan pipeline cache mutex. (flutter/engine#43085)
2023-06-22 [email protected] Revert "[Impeller] Correctly compute UVs in texture fill" (flutter/engine#43087)
2023-06-22 [email protected] Roll Fuchsia Linux SDK from 7EZeNE4aGd29VfDly... to tcVndpnH_jzGm5LsJ... (flutter/engine#43081)
2023-06-22 [email protected] Roll Skia from 117f57a53215 to 3f3e1da4b7eb (4 revisions) (flutter/engine#43080)
2023-06-22 [email protected] Roll ANGLE from 7658525166a4 to bbcf54bcb738 (1 revision) (flutter/engine#43079)
2023-06-22 [email protected] Roll Skia from 5013b651f8ec to 117f57a53215 (1 revision) (flutter/engine#43078)
2023-06-22 [email protected] Roll Fuchsia Mac SDK from QtQznuUmHMTyORqxJ... to Ylc35wOk0_j0NLzDv... (flutter/engine#43076)
2023-06-22 [email protected] Roll ANGLE from a2b3f9b64670 to 7658525166a4 (1 revision) (flutter/engine#43075)
2023-06-22 [email protected] Roll ANGLE from ac263582dda4 to a2b3f9b64670 (1 revision) (flutter/engine#43074)
2023-06-22 [email protected] Roll Skia from 71047dca9f77 to 5013b651f8ec (4 revisions) (flutter/engine#43073)
2023-06-22 [email protected] [Impeller] Correctly compute UVs in texture fill (flutter/engine#43028)

Also rolling transitive DEPS:
  fuchsia/sdk/core/linux-amd64 from 7EZeNE4aGd29 to tcVndpnH_jzG
  fuchsia/sdk/core/mac-amd64 from QtQznuUmHMTy to Ylc35wOk0_j0

If this roll has caused a breakage, revert this CL and stop the roller
using the controls here:
https://autoroll.skia.org/r/flutter-engine-flutter-autoroll
Please CC [email protected],[email protected],[email protected] on the revert to ensure that a human
is aware of the problem.

To file a bug in Flutter: https://github.com/flutter/flutter/issues/new/choose

To report a problem with the AutoRoller itself, please file a bug:
https://bugs.chromium.org/p/skia/issues/entry?template=Autoroller+Bug

Documentation for the AutoRoller is here:
https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

No open projects
Archived in project

Development

Successfully merging this pull request may close these issues.

[Impeller] Artefacts when drawing circle of non integer position with a ShaderMask

2 participants