summaryrefslogtreecommitdiff
path: root/libs/shaders/shaders.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'libs/shaders/shaders.cpp')
-rw-r--r--libs/shaders/shaders.cpp13
1 files changed, 6 insertions, 7 deletions
diff --git a/libs/shaders/shaders.cpp b/libs/shaders/shaders.cpp
index 5935589fdf..f0d45c2123 100644
--- a/libs/shaders/shaders.cpp
+++ b/libs/shaders/shaders.cpp
@@ -464,12 +464,10 @@ std::string buildLinearEffectSkSL(const LinearEffect& linearEffect) {
}
// Generates a list of uniforms to set on the LinearEffect shader above.
-std::vector<tonemap::ShaderUniform> buildLinearEffectUniforms(const LinearEffect& linearEffect,
- const mat4& colorTransform,
- float maxDisplayLuminance,
- float currentDisplayLuminanceNits,
- float maxLuminance,
- AHardwareBuffer* buffer) {
+std::vector<tonemap::ShaderUniform> buildLinearEffectUniforms(
+ const LinearEffect& linearEffect, const mat4& colorTransform, float maxDisplayLuminance,
+ float currentDisplayLuminanceNits, float maxLuminance, AHardwareBuffer* buffer,
+ aidl::android::hardware::graphics::composer3::RenderIntent renderIntent) {
std::vector<tonemap::ShaderUniform> uniforms;
if (linearEffect.inputDataspace == linearEffect.outputDataspace) {
uniforms.push_back({.name = "in_rgbToXyz", .value = buildUniformValue<mat4>(mat4())});
@@ -495,7 +493,8 @@ std::vector<tonemap::ShaderUniform> buildLinearEffectUniforms(const LinearEffect
.currentDisplayLuminance = currentDisplayLuminanceNits > 0
? currentDisplayLuminanceNits
: maxDisplayLuminance,
- .buffer = buffer};
+ .buffer = buffer,
+ .renderIntent = renderIntent};
for (const auto uniform : tonemap::getToneMapper()->generateShaderSkSLUniforms(metadata)) {
uniforms.push_back(uniform);