diff options
Diffstat (limited to 'libs/gui/LayerState.cpp')
-rw-r--r-- | libs/gui/LayerState.cpp | 39 |
1 files changed, 9 insertions, 30 deletions
diff --git a/libs/gui/LayerState.cpp b/libs/gui/LayerState.cpp index 1e0aacddab..3745805aa3 100644 --- a/libs/gui/LayerState.cpp +++ b/libs/gui/LayerState.cpp @@ -89,8 +89,7 @@ layer_state_t::layer_state_t() frameRateSelectionStrategy(ANATIVEWINDOW_FRAME_RATE_SELECTION_STRATEGY_PROPAGATE), fixedTransformHint(ui::Transform::ROT_INVALID), autoRefresh(false), - isTrustedOverlay(false), - borderEnabled(false), + trustedOverlay(gui::TrustedOverlay::UNSET), bufferCrop(Rect::INVALID_RECT), destinationFrame(Rect::INVALID_RECT), dropInputMode(gui::DropInputMode::NONE) { @@ -122,12 +121,6 @@ status_t layer_state_t::write(Parcel& output) const SAFE_PARCEL(output.write, transparentRegion); SAFE_PARCEL(output.writeUint32, bufferTransform); SAFE_PARCEL(output.writeBool, transformToDisplayInverse); - SAFE_PARCEL(output.writeBool, borderEnabled); - SAFE_PARCEL(output.writeFloat, borderWidth); - SAFE_PARCEL(output.writeFloat, borderColor.r); - SAFE_PARCEL(output.writeFloat, borderColor.g); - SAFE_PARCEL(output.writeFloat, borderColor.b); - SAFE_PARCEL(output.writeFloat, borderColor.a); SAFE_PARCEL(output.writeUint32, static_cast<uint32_t>(dataspace)); SAFE_PARCEL(output.write, hdrMetadata); SAFE_PARCEL(output.write, surfaceDamageRegion); @@ -186,7 +179,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); + SAFE_PARCEL(output.writeInt32, static_cast<uint32_t>(trustedOverlay)); SAFE_PARCEL(output.writeUint32, static_cast<uint32_t>(dropInputMode)); @@ -238,17 +231,6 @@ status_t layer_state_t::read(const Parcel& input) SAFE_PARCEL(input.read, transparentRegion); SAFE_PARCEL(input.readUint32, &bufferTransform); SAFE_PARCEL(input.readBool, &transformToDisplayInverse); - SAFE_PARCEL(input.readBool, &borderEnabled); - SAFE_PARCEL(input.readFloat, &tmpFloat); - borderWidth = tmpFloat; - SAFE_PARCEL(input.readFloat, &tmpFloat); - borderColor.r = tmpFloat; - SAFE_PARCEL(input.readFloat, &tmpFloat); - borderColor.g = tmpFloat; - SAFE_PARCEL(input.readFloat, &tmpFloat); - borderColor.b = tmpFloat; - SAFE_PARCEL(input.readFloat, &tmpFloat); - borderColor.a = tmpFloat; uint32_t tmpUint32 = 0; SAFE_PARCEL(input.readUint32, &tmpUint32); @@ -326,7 +308,9 @@ 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); + uint32_t trustedOverlayInt; + SAFE_PARCEL(input.readUint32, &trustedOverlayInt); + trustedOverlay = static_cast<gui::TrustedOverlay>(trustedOverlayInt); uint32_t mode; SAFE_PARCEL(input.readUint32, &mode); @@ -659,12 +643,6 @@ void layer_state_t::merge(const layer_state_t& other) { what |= eShadowRadiusChanged; shadowRadius = other.shadowRadius; } - if (other.what & eRenderBorderChanged) { - what |= eRenderBorderChanged; - borderEnabled = other.borderEnabled; - borderWidth = other.borderWidth; - borderColor = other.borderColor; - } if (other.what & eDefaultFrameRateCompatibilityChanged) { what |= eDefaultFrameRateCompatibilityChanged; defaultFrameRateCompatibility = other.defaultFrameRateCompatibility; @@ -698,7 +676,7 @@ void layer_state_t::merge(const layer_state_t& other) { } if (other.what & eTrustedOverlayChanged) { what |= eTrustedOverlayChanged; - isTrustedOverlay = other.isTrustedOverlay; + trustedOverlay = other.trustedOverlay; } if (other.what & eStretchChanged) { what |= eStretchChanged; @@ -794,7 +772,6 @@ 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_DIFF3(diff, eRenderBorderChanged, other, borderEnabled, borderWidth, borderColor); CHECK_DIFF(diff, eDefaultFrameRateCompatibilityChanged, other, defaultFrameRateCompatibility); CHECK_DIFF(diff, eFrameRateSelectionPriority, other, frameRateSelectionPriority); CHECK_DIFF3(diff, eFrameRateChanged, other, frameRate, frameRateCompatibility, @@ -804,7 +781,7 @@ uint64_t layer_state_t::diff(const layer_state_t& other) const { CHECK_DIFF(diff, eFrameRateSelectionStrategyChanged, other, frameRateSelectionStrategy); CHECK_DIFF(diff, eFixedTransformHintChanged, other, fixedTransformHint); CHECK_DIFF(diff, eAutoRefreshChanged, other, autoRefresh); - CHECK_DIFF(diff, eTrustedOverlayChanged, other, isTrustedOverlay); + CHECK_DIFF(diff, eTrustedOverlayChanged, other, trustedOverlay); CHECK_DIFF(diff, eStretchChanged, other, stretchEffect); CHECK_DIFF(diff, eBufferCropChanged, other, bufferCrop); CHECK_DIFF(diff, eDestinationFrameChanged, other, destinationFrame); @@ -1008,6 +985,7 @@ status_t BufferData::writeToParcel(Parcel* output) const { SAFE_PARCEL(output->writeBool, hasBarrier); SAFE_PARCEL(output->writeUint64, barrierFrameNumber); SAFE_PARCEL(output->writeUint32, producerId); + SAFE_PARCEL(output->writeInt64, dequeueTime); return NO_ERROR; } @@ -1047,6 +1025,7 @@ status_t BufferData::readFromParcel(const Parcel* input) { SAFE_PARCEL(input->readBool, &hasBarrier); SAFE_PARCEL(input->readUint64, &barrierFrameNumber); SAFE_PARCEL(input->readUint32, &producerId); + SAFE_PARCEL(input->readInt64, &dequeueTime); return NO_ERROR; } |