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

Commit dc011a99 authored by Ady Abraham's avatar Ady Abraham
Browse files

SF: DisplayCommand.colorTransform is just a matrix

Remove the hint from DisplayCommand.colorTransform as currently
we only use ColorTransform::IDENTITY and ColorTransform::ARBITRARY_MATRIX,
which both can be expressed using a matrix.

Bug: 208879711
Test: VTS
Change-Id: I1c335647aabb7f89c2c89e54abfc839d10a659fb
parent 43065bde
Loading
Loading
Loading
Loading
+2 −3
Original line number Diff line number Diff line
@@ -537,9 +537,8 @@ Error AidlComposer::setColorMode(Display display, ColorMode mode, RenderIntent r
    return Error::NONE;
}

Error AidlComposer::setColorTransform(Display display, const float* matrix, ColorTransform hint) {
    mWriter.setColorTransform(translate<int64_t>(display), matrix,
                              translate<AidlColorTransform>(hint));
Error AidlComposer::setColorTransform(Display display, const float* matrix) {
    mWriter.setColorTransform(translate<int64_t>(display), matrix);
    return Error::NONE;
}

+1 −1
Original line number Diff line number Diff line
@@ -116,7 +116,7 @@ public:
                          int acquireFence, Dataspace dataspace,
                          const std::vector<IComposerClient::Rect>& damage) override;
    Error setColorMode(Display display, ColorMode mode, RenderIntent renderIntent) override;
    Error setColorTransform(Display display, const float* matrix, ColorTransform hint) override;
    Error setColorTransform(Display display, const float* matrix) override;
    Error setOutputBuffer(Display display, const native_handle_t* buffer,
                          int releaseFence) override;
    Error setPowerMode(Display display, IComposerClient::PowerMode mode) override;
+1 −1
Original line number Diff line number Diff line
@@ -139,7 +139,7 @@ public:
                                  int acquireFence, Dataspace dataspace,
                                  const std::vector<IComposerClient::Rect>& damage) = 0;
    virtual Error setColorMode(Display display, ColorMode mode, RenderIntent renderIntent) = 0;
    virtual Error setColorTransform(Display display, const float* matrix, ColorTransform hint) = 0;
    virtual Error setColorTransform(Display display, const float* matrix) = 0;
    virtual Error setOutputBuffer(Display display, const native_handle_t* buffer,
                                  int releaseFence) = 0;
    virtual Error setPowerMode(Display display, IComposerClient::PowerMode mode) = 0;
+2 −2
Original line number Diff line number Diff line
@@ -436,8 +436,8 @@ Error Display::setColorMode(ColorMode mode, RenderIntent renderIntent)
    return static_cast<Error>(intError);
}

Error Display::setColorTransform(const android::mat4& matrix, ColorTransform hint) {
    auto intError = mComposer.setColorTransform(mId, matrix.asArray(), hint);
Error Display::setColorTransform(const android::mat4& matrix) {
    auto intError = mComposer.setColorTransform(mId, matrix.asArray());
    return static_cast<Error>(intError);
}

+2 −2
Original line number Diff line number Diff line
@@ -128,7 +128,7 @@ public:
    [[clang::warn_unused_result]] virtual hal::Error setColorMode(
            hal::ColorMode mode, hal::RenderIntent renderIntent) = 0;
    [[clang::warn_unused_result]] virtual hal::Error setColorTransform(
            const android::mat4& matrix, hal::ColorTransform hint) = 0;
            const android::mat4& matrix) = 0;
    [[clang::warn_unused_result]] virtual hal::Error setOutputBuffer(
            const android::sp<android::GraphicBuffer>& buffer,
            const android::sp<android::Fence>& releaseFence) = 0;
@@ -198,7 +198,7 @@ public:
                               const android::sp<android::Fence>& acquireFence,
                               hal::Dataspace dataspace) override;
    hal::Error setColorMode(hal::ColorMode, hal::RenderIntent) override;
    hal::Error setColorTransform(const android::mat4& matrix, hal::ColorTransform hint) override;
    hal::Error setColorTransform(const android::mat4& matrix) override;
    hal::Error setOutputBuffer(const android::sp<android::GraphicBuffer>&,
                               const android::sp<android::Fence>& releaseFence) override;
    hal::Error setPowerMode(hal::PowerMode) override;
Loading