Use BlurMaskFilter in outset shadows instead of Blur RenderEffect#45986
Closed
NickGerleman wants to merge 3 commits into
Closed
Use BlurMaskFilter in outset shadows instead of Blur RenderEffect#45986NickGerleman wants to merge 3 commits into
NickGerleman wants to merge 3 commits into
Conversation
Summary: This adjusts logic to be similar to InsetBoxShadowDrawable to keep the full ink within RenderNode bounds. This avoids a tiny bit of overdraw, but also means we get correct rendering if RenderNode is promoted to a compositing layer. Changelog: [Internal] Differential Revision: D60972085
Contributor
|
This pull request was exported from Phabricator. Differential Revision: D61162637 |
Summary: This is confusing, because styles layer deals with DIPs, conversion only happens when parsing dynamic, and `POINT` (the `LengthPercentageType`) also maps to DIPs instead of physical pixels. Move conversion to physical pixels to drawing layer, so everything above `BackgroundStyleApplicator` works with `style` types which are all in DIPs. Changelog: [Android][Breaking] Do not implicitly convert parsed LengthPercentage to pixels Differential Revision: D60507151
…cebook#45986) Summary: Pull Request resolved: facebook#45986 This uses SkBlurMask under the hood, to draw geometry with blur, without going the route of full image filter/rasterization. It was not supported under hardware accelerated canvases for a while, but seems to fully work as of API 29. Requiring Android 10 instead of 12 makes box shadows a lot more palatable (80% support vs 50%), and we see drastically better performance in one case with many large shadows, where creating many large hardware layers previously drastically hurt framerates. {F1801807696} At this point, the RenderNode may be redundant, though I think it can technically save us some work on redraws still. It is kept around for now. I simplified some of the math around here as well. Changelog: [Internal] Reviewed By: joevilches Differential Revision: D61162637
Contributor
|
This pull request was exported from Phabricator. Differential Revision: D61162637 |
6886732 to
3e5e522
Compare
Contributor
|
This pull request has been merged in 6c07106. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary:
This uses SkBlurMask under the hood, to draw geometry with blur, without going the route of full image filter/rasterization. It was not supported under hardware accelerated canvases for a while, but seems to fully work as of API 29.
Requiring Android 10 instead of 12 makes box shadows a lot more palatable (80% support vs 50%), and we see drastically better performance in one case with many large shadows, where creating many large hardware layers previously drastically hurt framerates.
{F1801807696}
At this point, the RenderNode may be redundant, though I think it can technically save us some work on redraws still. It is kept around for now. I simplified some of the math around here as well.
Changelog: [Internal]
Reviewed By: joevilches
Differential Revision: D61162637