-
Notifications
You must be signed in to change notification settings - Fork 6k
[Impeller] implements incorporating the gaussian blur snapshot transform #48426
[Impeller] implements incorporating the gaussian blur snapshot transform #48426
Conversation
|
||
std::shared_ptr<Texture> texture = MakeTexture(desc); | ||
auto texture_contents = std::make_shared<TextureContents>(); | ||
texture_contents->SetSourceRect(Rect::MakeSize(texture->GetSize())); |
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.
@bdero is this something I have to worry about? I don't think your tester has a way of modifying 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.
Having a smaller source rect will result in the snapshot performing a subpass instead of just passing through the texture, but the snapshot will look otherwise very similar as far as the blur is concerned.
EXPECT_TRUE(RectNear(result_coverage.value(), | ||
Rect::MakeLTRB(49.f, 39.f, 151.f, 141.f))); | ||
EXPECT_TRUE(RectNear(contents_coverage.value(), | ||
Rect::MakeLTRB(98.f, 78.f, 302.f, 282.f))); |
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.
I'm not sure why this is correct, this matches our existing behavior. I'm guessing because one is relative to the subpass @bdero ?
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 turned out to be an ordering issue in the test)
Woot! Taking a look. |
I can confirm that the text shadow backgrounds are showing up correctly now! I don't know that these next issues are specific to this PR so feel free to land and move on: I am noticing two specific artifacts: when resizing the blur the shakes are back. This can be seen in wonderous on the timeline view. I pulled up the downsampled texture and it looks pretty chunk in a way that might explain the banding, I could be wrong but with linear sampling I'd expect smoother edges. maybe this is due to missing mip maps? Second issue is that the blur doesn't go all the way to the edge in flutter/flutter#132735 (comment) . Maybe the halo stuff is incorrect, or the returned snapshot transform needs to align top left to the start of the blur and not the halo? (I'm not sure what the halo is). SkiaImpeller |
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.
LGTM
Or maybe the issue isn't mip levels, its just that we need to clamp the blur to be less agressive at downscaling (sigma 4 minimum like Skia) |
I think that may just be our aggressive downsampling. We might want to ease up on that. I'll start playing around with wonderous now that it seems like we got the easy stuff done. |
I think you're right. It looks like we scale down our blur radius so its about 4. something. Skia will scale down the sigma to 4 something, but that corresponds to a radius of roughly ~6ish I think |
another possibility is that we need to use linear everywhere |
…139163) flutter/engine@d375d5b...fd3a33f 2023-11-28 skia-flutter-autoroll@skia.org Roll Skia from 8752700a2565 to f07025afd712 (1 revision) (flutter/engine#48462) 2023-11-28 30870216+gaaclarke@users.noreply.github.com [Impeller] implements incorporating the gaussian blur snapshot transform (flutter/engine#48426) 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 matanl@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
…lutter#139163) flutter/engine@d375d5b...fd3a33f 2023-11-28 skia-flutter-autoroll@skia.org Roll Skia from 8752700a2565 to f07025afd712 (1 revision) (flutter/engine#48462) 2023-11-28 30870216+gaaclarke@users.noreply.github.com [Impeller] implements incorporating the gaussian blur snapshot transform (flutter/engine#48426) 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 matanl@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
fixes flutter/flutter#139085
Pre-launch Checklist
///
).If you need help, consider asking for advice on the #hackers-new channel on Discord.