You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
ShaderMask needs to play nicely with compositing #1155
Something like the following code used to work, and now no longer works.
This code should put a fading edge at the top of the block so the children fade away to the background color as they go under the mask. Now the entire block goes away. In my use case I see a chunk of area that is fully faded away that isn't faded away when just the shader mask is removed.
Futuremain() async=>runApp(newContainer(
decoration:newBoxDecoration(backgroundColor:newColor(0xFF808080)),
child:newShaderMask(
shaderCallback: _createShader,
child:newBlock([
_createColoredBox(0xFFFF0000),
_createColoredBox(0xFF0FF000),
_createColoredBox(0xFF0000FF),
_createColoredBox(0xFFFFFF00)
]))));
Widget_createColoredBox(int hexColor) =>newContainer(
height:300.0,
decoration:newBoxDecoration(backgroundColor:newColor(hexColor)));
// Fading edge colors need to be pure white with some value of alpha to properly fade the children.
ui.Shader_createShader(Rect bounds) =>newLinearGradient(
begin:Point.origin,
end:newPoint(0.0, 100.0),
colors: [constColor(0x00FFFFFF), constColor(0xFFFFFFFF)],
stops: [0.0, 1.0]).createShader();
This thread has been automatically locked since there has not been any recent activity after it was closed. If you are still experiencing a similar issue, please open a new bug, including the output of flutter doctor -v and a minimal reproduction of the issue.
Activity
HansMuller commentedon Jan 9, 2016
This problem can also be demonstrated with the "Swipe Away" (card_collection.dart) widget example. Select "Let the sun shine" from the drawer:
abarth commentedon Jan 9, 2016
We've started using compositing more. I don't think we can afford to have paint operations that the compositor doesn't understand anymore.
[-]ShaderMask is broken.[/-][+]ShaderMask needs to play nicely with compositing[/+]abarth commentedon Jan 11, 2016
Step 1: flutter-team-archive/engine#2248
Updating the example to match the new API (flutter#1155)
github-actions commentedon Sep 6, 2021
This thread has been automatically locked since there has not been any recent activity after it was closed. If you are still experiencing a similar issue, please open a new bug, including the output of
flutter doctor -vand a minimal reproduction of the issue.