Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Skip to content
Commit 2ca96f08 authored by Galia Peycheva's avatar Galia Peycheva
Browse files

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
parent 827d1acb
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment