这是indexloc提供的服务,不要输入任何密码
Skip to content
This repository was archived by the owner on Feb 25, 2025. It is now read-only.

Issue #146080 : Fix for incorrect STB based atlas glyph scaling #51882

Merged
merged 4 commits into from
Apr 23, 2024

Conversation

johnoneil
Copy link
Contributor

Fixes issue #146080

Pre-launch Checklist

  • I read the Contributor Guide and followed the process outlined there for submitting PRs.
  • I read the Tree Hygiene wiki page, which explains my responsibilities.
  • I read and followed the Flutter Style Guide and the C++, Objective-C, Java style guides.
  • I listed at least one issue that this PR fixes in the description above.
  • I added new tests to check the change I am making or feature I am adding, or the PR is test-exempt. See testing the engine for instructions on writing and running engine tests.
  • I updated/added relevant documentation (doc comments with ///).
  • I signed the CLA.
  • All existing and new tests are passing.

If you need help, consider asking for advice on the #hackers-new channel on Discord.

@flutter-dashboard
Copy link

It looks like this pull request may not have tests. Please make sure to add tests before merging. If you need an exemption to this rule, contact "@test-exemption-reviewer" in the #hackers channel in Chat (don't just cc them here, they won't see it! Use Discord!).

If you are not sure if you need tests, consider this rule of thumb: the purpose of a test is to make sure someone doesn't accidentally revert the fix. Ask yourself, is there anything in your PR that you feel it is important we not accidentally revert back to how it was before your fix?

Reviewers: Read the Tree Hygiene page and make sure this patch meets those guidelines before LGTMing.

@bdero
Copy link
Member

bdero commented Apr 8, 2024

Hey @johnoneil, it looks like you just need to apply the formatting listed under the failed builder (Linux linux_unopt): https://logs.chromium.org/logs/flutter/buildbucket/cr-buildbucket/8751644795522118369/+/u/test:_test:_Check_formatting/stdout

Then, once all the builds pass, flutter-gold should run and show us how the goldens changed!

@johnoneil johnoneil force-pushed the wb/johnoneil/stb-glyph-scaling-fix branch 2 times, most recently from 353fda8 to 597f605 Compare April 11, 2024 00:04
@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 #51882 at sha 597f605

@flutter-dashboard
Copy link

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

Changes reported for pull request #51882 at sha 31ad1bb

@bdero
Copy link
Member

bdero commented Apr 11, 2024

The golden result looks like there's a bounds mismatch happening somewhere.

Before:
image

After:
image

Perhaps the MakeTextFrameSTB utility needs to be updated to the new scale method to make the goldens look correct?

float scale = stbtt_ScaleForPixelHeight(
typeface_stb->GetFontInfo(),
metrics.point_size * TypefaceSTB::kPointsToPixels);

@johnoneil
Copy link
Contributor Author

@bdero Thanks for looking at this Brandon. I'll see if I can take time to fix this today.

@johnoneil johnoneil force-pushed the wb/johnoneil/stb-glyph-scaling-fix branch from 31ad1bb to 5f80179 Compare April 15, 2024 16:50
@flutter-dashboard
Copy link

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

Changes reported for pull request #51882 at sha 5f80179

@flutter-dashboard
Copy link

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

Changes reported for pull request #51882 at sha 3841553

@bdero
Copy link
Member

bdero commented Apr 17, 2024

Not sure what's going on with the goldens. This is looking pretty good locally.

Low DPI (before on top, after on bottom):
image

High DPI (before on top, after on bottom):
image

Skia gold seems to sometimes get confused after a force push. Could you try pushing a new empty commit to your branch? git commit --allow-empty -m "blank"

@johnoneil
Copy link
Contributor Author

Thanks for your time on this Brandon. Will try to push a blank commit shortly. We can review next week.
I'm also taking a look at the "Goldens" for the first time. That might be something the team might want to discuss as well next week as we're also planning on building something similar.

@bdero
Copy link
Member

bdero commented Apr 17, 2024

I pushed a duplicate PR to mess with Skia gold and try to figure out what's going on #52209

@bdero
Copy link
Member

bdero commented Apr 19, 2024

The golden check is passing on my test PR, and also yours! Skia gold is still showing diffs for this PR, but it seems to be outdated. So I think this is actually good to go.

Copy link
Member

@bdero bdero 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 are available for triage from new commit, Click here to view.

Changes reported for pull request #51882 at sha 8699cd0

@bdero
Copy link
Member

bdero commented Apr 22, 2024

The issue where the Engine golden tests weren't running is fixed, and the golden diffs appear to look correct, so I approved them!

image

Before:
image

After:
image

@johnoneil
Copy link
Contributor Author

@bdero I don't believe I have write access, and am unable to merge this.
Could you merge this when you think it's best?

auto-submit bot pushed a commit to flutter/flutter that referenced this pull request Apr 23, 2024
…147255)

flutter/engine@066953b...f23cc4d

2024-04-23 30870216+gaaclarke@users.noreply.github.com [Impeller] Cleanup `PipelineVK::Create` (flutter/engine#52278)
2024-04-23 johnoneil@users.noreply.github.com Issue #146080 : Fix for incorrect STB based atlas glyph scaling (flutter/engine#51882)
2024-04-23 jason-simmons@users.noreply.github.com [Impeller] Do not call std::forward on the serialized arguments in the canvas recorder (flutter/engine#52307)

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 jimgraham@google.com,rmistry@google.com,zra@google.com 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://issues.skia.org/issues/new?component=1389291&template=1850622

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
None yet
Development

Successfully merging this pull request may close these issues.

2 participants