diff options
author | 2025-03-24 11:12:01 -0700 | |
---|---|---|
committer | 2025-03-24 11:12:01 -0700 | |
commit | 631b37078a3d09e2ee5f574fc27543e86991d079 (patch) | |
tree | 96a44c8b90d71db13ea0e753ba713d260949759c /libs/gui/LayerState.cpp | |
parent | e511fd4008548784561ef38304885293b50a8141 (diff) | |
parent | 65fb1c6daa8234ddc9f2d06972efcb40a425522e (diff) |
Merge "Add border API to surface control" into main
Diffstat (limited to 'libs/gui/LayerState.cpp')
-rw-r--r-- | libs/gui/LayerState.cpp | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/libs/gui/LayerState.cpp b/libs/gui/LayerState.cpp index ad95d1a85a..86bc97e9d3 100644 --- a/libs/gui/LayerState.cpp +++ b/libs/gui/LayerState.cpp @@ -180,6 +180,7 @@ status_t layer_state_t::write(Parcel& output) const SAFE_PARCEL(output.writeParcelableVector, listener.callbackIds); } SAFE_PARCEL(output.writeFloat, shadowRadius); + SAFE_PARCEL(output.writeParcelable, borderSettings); SAFE_PARCEL(output.writeInt32, frameRateSelectionPriority); SAFE_PARCEL(output.writeFloat, frameRate); SAFE_PARCEL(output.writeByte, frameRateCompatibility); @@ -328,6 +329,8 @@ status_t layer_state_t::read(const Parcel& input) listeners.emplace_back(listener, callbackIds); } SAFE_PARCEL(input.readFloat, &shadowRadius); + SAFE_PARCEL(input.readParcelable, &borderSettings); + SAFE_PARCEL(input.readInt32, &frameRateSelectionPriority); SAFE_PARCEL(input.readFloat, &frameRate); SAFE_PARCEL(input.readByte, &frameRateCompatibility); @@ -727,6 +730,10 @@ void layer_state_t::merge(const layer_state_t& other) { what |= eShadowRadiusChanged; shadowRadius = other.shadowRadius; } + if (other.what & eBorderSettingsChanged) { + what |= eBorderSettingsChanged; + borderSettings = other.borderSettings; + } if (other.what & eLutsChanged) { what |= eLutsChanged; luts = other.luts; @@ -881,6 +888,7 @@ uint64_t layer_state_t::diff(const layer_state_t& other) const { CHECK_DIFF2(diff, eBackgroundColorChanged, other, bgColor, bgColorDataspace); if (other.what & eMetadataChanged) diff |= eMetadataChanged; CHECK_DIFF(diff, eShadowRadiusChanged, other, shadowRadius); + CHECK_DIFF(diff, eBorderSettingsChanged, other, borderSettings); CHECK_DIFF(diff, eDefaultFrameRateCompatibilityChanged, other, defaultFrameRateCompatibility); CHECK_DIFF(diff, eFrameRateSelectionPriority, other, frameRateSelectionPriority); CHECK_DIFF3(diff, eFrameRateChanged, other, frameRate, frameRateCompatibility, |