Open xster opened 6 years ago
The Material gets much faster as we removed the saveLayer call in https://github.com/flutter/engine/pull/5420 and https://github.com/flutter/flutter/pull/18616 . It's probably still slower than DecoratedBox because Material still has shadows and round rects. But without saveLayer, Material is not too much slower, and probably will not be a bottleneck by itself.
SG. Can we quantify this?
Yes, I'm planning to use @InMatrix 's sample app and our new Clip enum to illustrate the difference in the GDD talk. I'm currently working on finalizing the Clip enum change: https://github.com/flutter/flutter/pull/20205
Looks like the PR @liyuqian mentions has merged; I'm going to assume that this is essentially fixed and close it. Feel free to reopen if I'm wrong, please, @xster and @liyuqian!
Point out that likely only one Material instance per elevation is needed to provide the splash for all of its descendent ink wells. Use DecoratedBox if using just for background colors.