Fix BlurEffectLayerIsVisible test
The setBackgroundBlurRadius by design blurs the screen behind the layer requesting the blur. In the test the canvas is 256px, so when the blur layer is drawn, the blurring operation samples pixels also from outside of the canvasSize area. The color of the background behind the layer the test draws is red, so the checking detects tints of red, which are blended into our canvas, because of the blur. To address that, this CL makes two changes: - change the second color in the test to red instead of green, to match the background color - restricts the check to only traverse a portion of the canvas vertically. We stop the Y traversal at a point where there is no interference in the blue area from any sampled red colors from the background Bug: 200059958 Test: atest EffectLayerTest#BlurEffectLayerIsVisible --iterations=100 Change-Id: If38f3d85b97d70cbd2b4bba308d2870936d7a49f
Loading
Please register or sign in to comment