From ef006586b5e3bbbf69177958a388cb1208adf0ff Mon Sep 17 00:00:00 2001 From: Sally Qi Date: Fri, 11 Oct 2024 13:23:09 -0700 Subject: [Lut HAL backend] implementation 3rd patch. - interpret the lut and pass them into shader. Bug: 329472856 Test: builds Flag: EXEMPT no flag needed Change-Id: I005600593f4a369130bf8bcaea69300758b5ae03 --- libs/gui/LayerState.cpp | 15 +++++++++++++++ 1 file changed, 15 insertions(+) (limited to 'libs/gui/LayerState.cpp') diff --git a/libs/gui/LayerState.cpp b/libs/gui/LayerState.cpp index 4b531345b0..139764ac0c 100644 --- a/libs/gui/LayerState.cpp +++ b/libs/gui/LayerState.cpp @@ -203,6 +203,12 @@ status_t layer_state_t::write(Parcel& output) const SAFE_PARCEL(output.writeParcelable, *bufferReleaseChannel); } + const bool hasLuts = (luts != nullptr); + SAFE_PARCEL(output.writeBool, hasLuts); + if (hasLuts) { + SAFE_PARCEL(output.writeParcelable, *luts); + } + return NO_ERROR; } @@ -358,6 +364,15 @@ status_t layer_state_t::read(const Parcel& input) SAFE_PARCEL(input.readParcelable, bufferReleaseChannel.get()); } + bool hasLuts; + SAFE_PARCEL(input.readBool, &hasLuts); + if (hasLuts) { + luts = std::make_shared(); + SAFE_PARCEL(input.readParcelable, luts.get()); + } else { + luts = nullptr; + } + return NO_ERROR; } -- cgit v1.2.3-59-g8ed1b