diff options
author | 2025-03-14 19:36:39 -0700 | |
---|---|---|
committer | 2025-03-14 19:36:39 -0700 | |
commit | a5a581d7f6c46109e10c36a7c5a99b86a42d4b04 (patch) | |
tree | ea3b32c70218ade4b06c38394552da3931c09aa8 /libs | |
parent | 208f88a761fdcdd3d404f064f499ab901230e425 (diff) | |
parent | f22d78364b7307054d748f05413729919ee426a7 (diff) |
Merge "[Lut] fix over-saturated issue on GPU composition" into main
Diffstat (limited to 'libs')
-rw-r--r-- | libs/renderengine/skia/filters/LutShader.cpp | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/libs/renderengine/skia/filters/LutShader.cpp b/libs/renderengine/skia/filters/LutShader.cpp index f262158f2c..6a577ff41f 100644 --- a/libs/renderengine/skia/filters/LutShader.cpp +++ b/libs/renderengine/skia/filters/LutShader.cpp @@ -24,7 +24,6 @@ #include <ui/ColorSpace.h> #include "include/core/SkColorSpace.h" -#include "src/core/SkColorFilterPriv.h" using aidl::android::hardware::graphics::composer3::LutProperties; @@ -116,7 +115,7 @@ static const SkString kShader = SkString(R"( linear = mix(c0, c1, linear.b); } } - return float4(linear, rgba.a); + return float4(fromLinearSrgb(linear), rgba.a); })"); // same as shader::toColorSpace function @@ -289,9 +288,7 @@ sk_sp<SkShader> LutShader::lutShader(sk_sp<SkShader>& input, lutProperties[i].samplingKey, srcDataspace); } - auto colorXformLutToDst = - SkColorFilterPriv::MakeColorSpaceXform(lutMathColorSpace, outColorSpace); - input = input->makeWithColorFilter(colorXformLutToDst); + input = input->makeWithWorkingColorSpace(outColorSpace); } return input; } |