diff options
author | 2018-07-05 17:18:21 -0700 | |
---|---|---|
committer | 2018-12-02 09:27:05 -0800 | |
commit | 1b6531ccf5dab13a6817c7519693df220d0944a1 (patch) | |
tree | 2873750c9ee97e4bf11d557997bfe27137e16040 /libs/gui/LayerState.cpp | |
parent | 49109214fec02f0734cbfee3c58f6974b0c694b2 (diff) |
Rounded corners
Test: visual
Test: /data/nativetest64/SurfaceFlinger_test/SurfaceFlinger_test
Fixes: 111514493
Change-Id: Ie8f400bbcea3e9653295ea7b75c7eef568fd76c4
Diffstat (limited to 'libs/gui/LayerState.cpp')
-rw-r--r-- | libs/gui/LayerState.cpp | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/libs/gui/LayerState.cpp b/libs/gui/LayerState.cpp index 9f30060467..407eecb6fb 100644 --- a/libs/gui/LayerState.cpp +++ b/libs/gui/LayerState.cpp @@ -82,6 +82,7 @@ status_t layer_state_t::write(Parcel& output) const memcpy(output.writeInplace(16 * sizeof(float)), colorTransform.asArray(), 16 * sizeof(float)); + output.writeFloat(cornerRadius); if (output.writeVectorSize(listenerCallbacks) == NO_ERROR) { for (const auto& [listener, callbackIds] : listenerCallbacks) { @@ -149,6 +150,7 @@ status_t layer_state_t::read(const Parcel& input) } colorTransform = mat4(static_cast<const float*>(input.readInplace(16 * sizeof(float)))); + cornerRadius = input.readFloat(); int32_t listenersSize = input.readInt32(); for (int32_t i = 0; i < listenersSize; i++) { @@ -270,6 +272,10 @@ void layer_state_t::merge(const layer_state_t& other) { what |= eCropChanged_legacy; crop_legacy = other.crop_legacy; } + if (other.what & eCornerRadiusChanged) { + what |= eCornerRadiusChanged; + cornerRadius = other.cornerRadius; + } if (other.what & eDeferTransaction_legacy) { what |= eDeferTransaction_legacy; barrierHandle_legacy = other.barrierHandle_legacy; |