Fix blur sampling outside bounds of layer
The image that the blur shader uses is the screenshot of the whole screen, translated to the start of the blurRect. However, nothing stops the shader from sampling outside of the right/bottom edges of the blurRect. As a result, the blurring takes samples from outside of the layer bounds. This CL restricts the blur shader to sample the blurRect edge color when it tries to sample outside the blurRect. Bug: 167166562 Test: atest SurfaceFlinger_test -- --test-arg com.android.tradefed.testtype.GTest:native-test-flag:"--gtest_filter=Layer*Tests/Layer*Test.SetBackgroundBlurRadiusSimple*" Change-Id: I5f8f7c4a87cbcd3b0cb080720e554119d8d07f69
Loading
Please register or sign in to comment