Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit ee737f38 authored by Sally Qi's avatar Sally Qi
Browse files

[Lut] Remove output color space from lutShader. The output color space is not used. Remove it.

Bug: n/a
Test: builds
Flag: EXEMPT cleanup
Change-Id: Iefc8f6bbb6a691829617793f34af0b75fd90800e
parent bd52f5a3
Loading
Loading
Loading
Loading
+1 −2
Original line number Diff line number Diff line
@@ -549,8 +549,7 @@ sk_sp<SkShader> SkiaRenderEngine::createRuntimeEffectShader(

    if (graphicBuffer && parameters.layer.luts) {
        shader = mLutShader.lutShader(shader, parameters.layer.luts,
                                      parameters.layer.sourceDataspace,
                                      toSkColorSpace(parameters.outputDataSpace));
                                      parameters.layer.sourceDataspace);
    }

    if (parameters.requiresLinearEffect) {
+1 −2
Original line number Diff line number Diff line
@@ -281,8 +281,7 @@ sk_sp<SkShader> LutShader::generateLutShader(sk_sp<SkShader> input,

sk_sp<SkShader> LutShader::lutShader(sk_sp<SkShader>& input,
                                     std::shared_ptr<gui::DisplayLuts> displayLuts,
                                     ui::Dataspace srcDataspace,
                                     sk_sp<SkColorSpace> outColorSpace) {
                                     ui::Dataspace srcDataspace) {
    if (mBuilder == nullptr) {
        const static SkRuntimeEffect::Result instance = SkRuntimeEffect::MakeForShader(kShader);
        mBuilder = std::make_unique<SkRuntimeShaderBuilder>(instance.effect);
+1 −1
Original line number Diff line number Diff line
@@ -30,7 +30,7 @@ namespace skia {
class LutShader {
public:
    sk_sp<SkShader> lutShader(sk_sp<SkShader>& input, std::shared_ptr<gui::DisplayLuts> displayLuts,
                              ui::Dataspace srcDataspace, sk_sp<SkColorSpace> outColorSpace);
                              ui::Dataspace srcDataspace);

private:
    sk_sp<SkShader> generateLutShader(sk_sp<SkShader> input, const std::vector<float>& buffers,