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. Reviewers: Read the Tree Hygiene page and make sure this patch meets those guidelines before LGTMing. |
|
I should be able to add support for the rest of the color modes using SVG filters as well, so I'll work on that too. Regarding the rest of the shaders, image shaders should be possible with background-repeat but sweep gradients might be hard to implement (not sure how to implement those.) |
|
|
||
| /// The dedicated child container element that's separate from the | ||
| /// [rootElement] is used to compensate for the coordinate system shift | ||
| /// introduced by the [rootElement] translation. |
There was a problem hiding this comment.
Unless I'm missing something, this layer does not translate its root element, so I think you don't need a separate child container.
| _maskFilterIdCounter += 1; | ||
| return '<svg width="0" height="0" xmlns:xlink="http://www.w3.org/1999/xlink">' | ||
| '<filter id="_fmf$_maskFilterIdCounter" ' | ||
| 'filterUnits="objectBoundingBox">' |
There was a problem hiding this comment.
objectBoundingBox is the default. We don't need to specify it. Will save a bit of CPU/memory/network.
(applies here and in other filters)
There was a problem hiding this comment.
Please test in Firefox. There are some cross browser bugs around filterUnits
| @@ -0,0 +1,376 @@ | |||
| // Copyright 2013 The Flutter Authors. All rights reserved. | |||
There was a problem hiding this comment.
Needs golden test to verify it renders on both Chrome and WebKit.
|
Hi @anirudhb are you still working on this? Anyway we can help? |
5c191c0 to
1aec166
Compare
|
Just updated the PR. I'm currently writing golden tests, but not sure what the process is to generate/submit golden files (so that the test does not fail.) Edit: It seems my most recent commit somehow messed up Firefox's rendering. Looking into and fixing. Although afaik the lack of |
Once you have the test
Great! Once you have firefox problem solved and add a test we can gen goldens.
|
In order for |
|
@anirudhb do you plan to continue working on this PR? |
|
I'll take a look at it again this weekend. |
1aec166 to
9a1c5a2
Compare
9a1c5a2 to
ac3c0f8
Compare
|
I don't think I'll have time to fix up this PR, but feel free to make it usable for merge! (You can edit this branch if necessary) |
|
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. 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. |
|
@anirudhb Looks the issue was closed. Is this PR still valid? |
|
Closing this PR shadermasks have landed in a separate PR. |
Description
Adds a partial ShaderMask implementation on Flutter Web with the DOM backend.
What's implemented:
ui.Gradientshadersui.ImageShadershadersAll blend modes should work.
Related Issues
flutter/flutter#44152
Tests
I added the following tests:
Checklist
Before you create this PR confirm that it meets all requirements listed below by checking the relevant checkboxes (
[x]). This will ensure a smooth and quick review process.Breaking Change
Did any tests fail when you ran them? Please read handling breaking changes.