@@ -41,6 +41,7 @@ using aidl::android::hardware::graphics::composer3::Color;
4141using aidl::android::hardware::graphics::composer3::Composition;
4242using AidlCapability = aidl::android::hardware::graphics::composer3::Capability;
4343using aidl::android::hardware::graphics::composer3::DisplayCapability;
44+ using aidl::android::hardware::graphics::composer3::DisplayLuts;
4445using aidl::android::hardware::graphics::composer3::Lut;
4546using aidl::android::hardware::graphics::composer3::OverlayProperties;
4647
@@ -608,13 +609,14 @@ Error Display::getClientTargetProperty(
608609 return static_cast <Error>(error);
609610}
610611
611- Error Display::getDisplayLuts (std::vector<Lut>* outLuts) {
612- std::vector<Lut> tmpLuts;
613- const auto error = mComposer .getDisplayLuts (mId , &tmpLuts);
614- for (Lut& lut : tmpLuts) {
615- if (lut.pfd .get () >= 0 ) {
616- outLuts->push_back (
617- {lut.layer , ndk::ScopedFileDescriptor (lut.pfd .release ()), lut.lutProperties });
612+ Error Display::getRequestedLuts (std::vector<DisplayLuts::LayerLut>* outLayerLuts) {
613+ std::vector<DisplayLuts::LayerLut> tmpLayerLuts;
614+ const auto error = mComposer .getRequestedLuts (mId , &tmpLayerLuts);
615+ for (DisplayLuts::LayerLut& layerLut : tmpLayerLuts) {
616+ if (layerLut.lut .pfd .get () >= 0 ) {
617+ outLayerLuts->push_back ({layerLut.layer ,
618+ Lut{ndk::ScopedFileDescriptor (layerLut.lut .pfd .release ()),
619+ layerLut.lut .lutProperties }});
618620 }
619621 }
620622 return static_cast <Error>(error);
@@ -1050,6 +1052,14 @@ Error Layer::setBlockingRegion(const Region& region) {
10501052 return static_cast <Error>(intError);
10511053}
10521054
1055+ Error Layer::setLuts (std::vector<Lut>& luts) {
1056+ if (CC_UNLIKELY (!mDisplay )) {
1057+ return Error::BAD_DISPLAY;
1058+ }
1059+ const auto intError = mComposer .setLayerLuts (mDisplay ->getId (), mId , luts);
1060+ return static_cast <Error>(intError);
1061+ }
1062+
10531063} // namespace impl
10541064} // namespace HWC2
10551065} // namespace android
0 commit comments