diff options
| author | 2019-01-24 04:10:46 +0000 | |
|---|---|---|
| committer | 2019-01-24 04:10:46 +0000 | |
| commit | 7b9c88784d77477f4c407fff09f851fe5e702d7d (patch) | |
| tree | 2a87dd06b7ae75afae4cdea7f11ce7db31c80915 /libs/gui/LayerState.cpp | |
| parent | 3c252c2c31297165de0ff15f753f77bedeee441b (diff) | |
| parent | ed54efa6e3d6b1403d07e0b68e0e741ec4d26cc4 (diff) | |
Merge "Add Color Layer to ASurfaceControl"
Diffstat (limited to 'libs/gui/LayerState.cpp')
| -rw-r--r-- | libs/gui/LayerState.cpp | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/libs/gui/LayerState.cpp b/libs/gui/LayerState.cpp index 40b55fa28b..ab929731f3 100644 --- a/libs/gui/LayerState.cpp +++ b/libs/gui/LayerState.cpp @@ -97,6 +97,9 @@ status_t layer_state_t::write(Parcel& output) const output.writeStrongBinder(cachedBuffer.token); output.writeInt32(cachedBuffer.bufferId); + output.writeFloat(colorAlpha); + output.writeUint32(static_cast<uint32_t>(colorDataspace)); + return NO_ERROR; } @@ -170,6 +173,9 @@ status_t layer_state_t::read(const Parcel& input) cachedBuffer.token = input.readStrongBinder(); cachedBuffer.bufferId = input.readInt32(); + colorAlpha = input.readFloat(); + colorDataspace = static_cast<ui::Dataspace>(input.readUint32()); + return NO_ERROR; } @@ -382,6 +388,14 @@ void layer_state_t::merge(const layer_state_t& other) { what |= eCachedBufferChanged; cachedBuffer = other.cachedBuffer; } + if (other.what & eColorAlphaChanged) { + what |= eColorAlphaChanged; + colorAlpha = other.colorAlpha; + } + if (other.what & eColorDataspaceChanged) { + what |= eColorDataspaceChanged; + colorDataspace = other.colorDataspace; + } if ((other.what & what) != other.what) { ALOGE("Unmerged SurfaceComposer Transaction properties. LayerState::merge needs updating? " "other.what=0x%" PRIu64 " what=0x%" PRIu64, |