optimize AlphaMaskFilter when used for cache #2