diff options
| author | 2019-11-25 17:55:44 -0800 | |
|---|---|---|
| committer | 2020-01-20 12:32:18 -0800 | |
| commit | 19c8f0e4fe37ffa86a7cbc879c23e4da2ff97e1c (patch) | |
| tree | 47645400d625fa71de468c6ef510780056da8bcf /libs/gui/SurfaceComposerClient.cpp | |
| parent | fbb86a6baec5b0e91a94413a629d7a49f000d28b (diff) | |
Add support for background blurs
Bug: 141640413
Fixes: 146384234
Test: adb shell setprop debug.sf.disableBlurs 1
Test: adb shell setprop debug.sf.gaussianBlur 0
Test: adb shell setprop ro.surface_flinger.supports_background_blur 1
Test: ./SurfaceFlinger_test --gtest_filter=Layer*Tests/Layer*Test.SetBackgroundBlur*
Test: ./librenderengine_test --gtest_filter=*BlurBackground*"
Test: atest SurfaceFlinger_test:SurfaceInterceptorTest#InterceptBackgroundBlurRadiusUpdateWorks
Change-Id: I5194c910fe7062f33e70943867012539e6c6626a
Diffstat (limited to 'libs/gui/SurfaceComposerClient.cpp')
| -rw-r--r-- | libs/gui/SurfaceComposerClient.cpp | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/libs/gui/SurfaceComposerClient.cpp b/libs/gui/SurfaceComposerClient.cpp index 20614f8d85..69d4269fa6 100644 --- a/libs/gui/SurfaceComposerClient.cpp +++ b/libs/gui/SurfaceComposerClient.cpp @@ -918,6 +918,18 @@ SurfaceComposerClient::Transaction& SurfaceComposerClient::Transaction::setCorne return *this; } +SurfaceComposerClient::Transaction& SurfaceComposerClient::Transaction::setBackgroundBlurRadius( + const sp<SurfaceControl>& sc, int backgroundBlurRadius) { + layer_state_t* s = getLayerState(sc); + if (!s) { + mStatus = BAD_INDEX; + return *this; + } + s->what |= layer_state_t::eBackgroundBlurRadiusChanged; + s->backgroundBlurRadius = backgroundBlurRadius; + return *this; +} + SurfaceComposerClient::Transaction& SurfaceComposerClient::Transaction::deferTransactionUntil_legacy(const sp<SurfaceControl>& sc, const sp<IBinder>& handle, |