summaryrefslogtreecommitdiff
path: root/libs/gui/SurfaceComposerClient.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/SurfaceComposerClient.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/SurfaceComposerClient.cpp')
-rw-r--r--libs/gui/SurfaceComposerClient.cpp8
1 files changed, 6 insertions, 2 deletions
diff --git a/libs/gui/SurfaceComposerClient.cpp b/libs/gui/SurfaceComposerClient.cpp
index 3260c53a62..807f8509b0 100644
--- a/libs/gui/SurfaceComposerClient.cpp
+++ b/libs/gui/SurfaceComposerClient.cpp
@@ -1971,9 +1971,13 @@ SurfaceComposerClient::Transaction& SurfaceComposerClient::Transaction::setLuts(
return *this;
}
- s->luts = std::make_shared<gui::DisplayLuts>(base::unique_fd(dup(lutFd.get())), offsets,
- dimensions, sizes, samplingKeys);
s->what |= layer_state_t::eLutsChanged;
+ if (lutFd.ok()) {
+ s->luts = std::make_shared<gui::DisplayLuts>(base::unique_fd(dup(lutFd.get())), offsets,
+ dimensions, sizes, samplingKeys);
+ } else {
+ s->luts = nullptr;
+ }
registerSurfaceControlForCallback(sc);
return *this;