[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
diff --git a/libs/gui/LayerState.cpp b/libs/gui/LayerState.cpp
index 4b53134..139764a 100644
--- a/libs/gui/LayerState.cpp
+++ b/libs/gui/LayerState.cpp
@@ -203,6 +203,12 @@
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 @@
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;
}