-
Notifications
You must be signed in to change notification settings - Fork 5.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Impeller] Render Gaussian blurs into smaller textures and scale up with linear sampling #35491
Conversation
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 Hixie on the #hackers channel in Chat (don't just cc him here, he won't see it! He's on 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. |
return Snapshot{ | ||
.texture = out_texture, | ||
.transform = texture_rotate.Invert() * | ||
Matrix::MakeTranslation(pass_texture_rect.origin) * | ||
Matrix::MakeScale(Vector2(1 / x_scale, 1)), | ||
.sampler_descriptor = sampler_desc}; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This seems pretty testable to me. If it's currently difficult to unit test a RenderFilter I think we should land this without a test, but we should be able to write some tests against this...
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Seems reasonable... is it possible to test private interfaces with gtest? I would prefer to keep these internals out of the public API.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Added an issue to make this stuff testable flutter/flutter#109795
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If you make the test fixture a friend you can. If this isn't the right spot to test maybe there's a public method somewhere in the chain we could test?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If this isn't the right spot to test maybe there's a public method somewhere in the chain we could test?
I think it makes sense to find a way to make this specific barrier testable (albeit this API will undergo more rewrites).
From an Entities API behavior testing perspective, the clear quantifiable/stable/portable barrier between the user's inputs and colors on the screen is the set of command buffers that Contents populate when they render. Once we have a good story for mocking the render layer, that'll probably be enough to cover most contents reasonably well. But filters are more complicated and we should definitely test behavior of the internal API to detect subtle breakages that will be hard to nail down through a command buffer predicate test.
c9b09bd
to
1bfa351
Compare
Looks like the linked patch has the autosubmit label but it blocked on the infra issues flutter/flutter#109797 |
1bfa351
to
68a5cb2
Compare
…ale up with linear sampling (flutter/engine#35491)
This reduces blur cost by ~80% on the apps we're testing with virtually no difference in quality. We can still easily do a lot better than this -- I'm working on other improvements that I plan to land in follow-ups.
Screen.Recording.2022-08-18.at.2.28.37.AM.mov