summaryrefslogtreecommitdiff
path: root/libs/gui/LayerState.cpp
diff options
context:
space:
mode:
author Sally Qi <sallyqi@google.com> 2024-11-11 18:06:48 +0000
committer Android (Google) Code Review <android-gerrit@google.com> 2024-11-11 18:06:48 +0000
commit44d6fff462d9291ddbf1a97de8c45ee596101818 (patch)
treea72ffd8981b676906b844a7aad5253c02d40ee19 /libs/gui/LayerState.cpp
parent3f8b9574ce93f8f6b32ef32ee0014c92762318d7 (diff)
parentef006586b5e3bbbf69177958a388cb1208adf0ff (diff)
Merge "[Lut HAL backend] implementation 3rd patch." into main
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;
}