diff options
| author | 2021-08-12 12:03:37 -0700 | |
|---|---|---|
| committer | 2021-08-12 22:41:41 +0000 | |
| commit | 2e1a9d88a58fac889f13b18a9e6c181a8459feab (patch) | |
| tree | f9ac849149b67c3a82bb1b881f6af42f7fe7fd4f /libs/gui/LayerState.cpp | |
| parent | a8f9cdbc77fee0bd5a1527342af4e2ceb9487b50 (diff) | |
| parent | 810d19378edc7bbd87d738d96c4bb49ed45b3d0c (diff) | |
Merge ab/7633965
Bug: 169893837
Merged-In: I2a2d02a0d7e67ee9577857a210cb6157683e5598
Change-Id: Iecdf0a17afe650483461978b42161940ce002101
Diffstat (limited to 'libs/gui/LayerState.cpp')
| -rw-r--r-- | libs/gui/LayerState.cpp | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/libs/gui/LayerState.cpp b/libs/gui/LayerState.cpp index e65c721ae1..076c90dd23 100644 --- a/libs/gui/LayerState.cpp +++ b/libs/gui/LayerState.cpp @@ -64,6 +64,7 @@ layer_state_t::layer_state_t() fixedTransformHint(ui::Transform::ROT_INVALID), frameNumber(0), autoRefresh(false), + isTrustedOverlay(false), bufferCrop(Rect::INVALID_RECT), destinationFrame(Rect::INVALID_RECT), releaseBufferListener(nullptr) { @@ -170,6 +171,7 @@ status_t layer_state_t::write(Parcel& output) const SAFE_PARCEL(output.write, stretchEffect); SAFE_PARCEL(output.write, bufferCrop); SAFE_PARCEL(output.write, destinationFrame); + SAFE_PARCEL(output.writeBool, isTrustedOverlay); return NO_ERROR; } @@ -300,6 +302,7 @@ status_t layer_state_t::read(const Parcel& input) SAFE_PARCEL(input.read, stretchEffect); SAFE_PARCEL(input.read, bufferCrop); SAFE_PARCEL(input.read, destinationFrame); + SAFE_PARCEL(input.readBool, &isTrustedOverlay); return NO_ERROR; } @@ -532,6 +535,10 @@ void layer_state_t::merge(const layer_state_t& other) { what |= eAutoRefreshChanged; autoRefresh = other.autoRefresh; } + if (other.what & eTrustedOverlayChanged) { + what |= eTrustedOverlayChanged; + isTrustedOverlay = other.isTrustedOverlay; + } if (other.what & eReleaseBufferListenerChanged) { if (releaseBufferListener) { ALOGW("Overriding releaseBufferListener"); @@ -562,6 +569,10 @@ bool layer_state_t::hasBufferChanges() const { return (what & layer_state_t::eBufferChanged) || (what & layer_state_t::eCachedBufferChanged); } +bool layer_state_t::hasValidBuffer() const { + return buffer || cachedBuffer.isValid(); +} + status_t layer_state_t::matrix22_t::write(Parcel& output) const { SAFE_PARCEL(output.writeFloat, dsdx); SAFE_PARCEL(output.writeFloat, dtdx); |