diff options
author | 2025-02-24 22:57:09 +0000 | |
---|---|---|
committer | 2025-03-19 17:03:06 +0000 | |
commit | 65fb1c6daa8234ddc9f2d06972efcb40a425522e (patch) | |
tree | 8e67e9ea0b82d2393df31ef51477a1b8fe81bc75 /libs/gui/SurfaceComposerClient.cpp | |
parent | 2dc2afe2e0210dd42d80136ca425aed51ae69d4a (diff) |
Add border API to surface control
See go/sf-box-shadows-api for more details
Bug: b/367464660
Flag: com.android.window.flags.enable_border_settings
Test: atest SurfaceFlinger_test
Change-Id: I1190edb97693004d9f46058fd0165451470a65b3
Diffstat (limited to 'libs/gui/SurfaceComposerClient.cpp')
-rw-r--r-- | libs/gui/SurfaceComposerClient.cpp | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/libs/gui/SurfaceComposerClient.cpp b/libs/gui/SurfaceComposerClient.cpp index 9854274cb1..60a2bf7b88 100644 --- a/libs/gui/SurfaceComposerClient.cpp +++ b/libs/gui/SurfaceComposerClient.cpp @@ -2222,6 +2222,19 @@ SurfaceComposerClient::Transaction& SurfaceComposerClient::Transaction::setShado return *this; } +SurfaceComposerClient::Transaction& SurfaceComposerClient::Transaction::setBorderSettings( + const sp<SurfaceControl>& sc, gui::BorderSettings settings) { + layer_state_t* s = getLayerState(sc); + if (!s) { + mStatus = BAD_INDEX; + return *this; + } + + s->what |= layer_state_t::eBorderSettingsChanged; + s->borderSettings = settings; + return *this; +} + SurfaceComposerClient::Transaction& SurfaceComposerClient::Transaction::setFrameRate( const sp<SurfaceControl>& sc, float frameRate, int8_t compatibility, int8_t changeFrameRateStrategy) { |