summaryrefslogtreecommitdiff
path: root/libs/gui/LayerState.cpp
diff options
context:
space:
mode:
author Sally Qi <sallyqi@google.com> 2024-10-11 13:23:09 -0700
committer Sally Qi <sallyqi@google.com> 2024-11-09 13:19:55 -0800
commitef006586b5e3bbbf69177958a388cb1208adf0ff (patch)
tree81fe6464163efccf4228636d746c183634677d93 /libs/gui/LayerState.cpp
parent2c6de794c9c4c1a526f4c9372e640d3e0572fcdb (diff)
[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
Diffstat (limited to 'libs/gui/LayerState.cpp')
-rw-r--r--libs/gui/LayerState.cpp15
1 files changed, 15 insertions, 0 deletions
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<gui::DisplayLuts>();
+ SAFE_PARCEL(input.readParcelable, luts.get());
+ } else {
+ luts = nullptr;
+ }
+
return NO_ERROR;
}