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

Commit 83f55554 authored by android-build-team Robot's avatar android-build-team Robot
Browse files

Snap for 4784261 from eae8fe3d to pi-release

Change-Id: Ia26c75fef8d05a1c1737601621bc7056a1943284
parents bf71bf65 eae8fe3d
Loading
Loading
Loading
Loading
+4 −1
Original line number Diff line number Diff line
@@ -186,7 +186,10 @@ static const TracingCategory k_categories[] = {
        { REQ,      "events/cpufreq_interactive/enable" },
    } },
    { "sync",       "Synchronization",  0, {
        { REQ,      "events/sync/enable" },
        // before linux kernel 4.9
        { OPT,      "events/sync/enable" },
        // starting in linux kernel 4.9
        { OPT,      "events/fence/enable" },
    } },
    { "workq",      "Kernel Workqueues", 0, {
        { REQ,      "events/workqueue/enable" },
+9 −0
Original line number Diff line number Diff line
@@ -51,6 +51,10 @@ void Description::setProjectionMatrix(const mat4& mtx) {
    mProjectionMatrix = mtx;
}

void Description::setSaturationMatrix(const mat4& mtx) {
    mSaturationMatrix = mtx;
}

void Description::setColorMatrix(const mat4& mtx) {
    mColorMatrix = mtx;
}
@@ -78,6 +82,11 @@ bool Description::hasColorMatrix() const {
    return mColorMatrix != identity;
}

bool Description::hasSaturationMatrix() const {
    const mat4 identity;
    return mSaturationMatrix != identity;
}

const mat4& Description::getColorMatrix() const {
    return mColorMatrix;
}
+3 −0
Original line number Diff line number Diff line
@@ -42,12 +42,14 @@ public:
    void disableTexture();
    void setColor(const half4& color);
    void setProjectionMatrix(const mat4& mtx);
    void setSaturationMatrix(const mat4& mtx);
    void setColorMatrix(const mat4& mtx);
    void setInputTransformMatrix(const mat3& matrix);
    void setOutputTransformMatrix(const mat4& matrix);
    bool hasInputTransformMatrix() const;
    bool hasOutputTransformMatrix() const;
    bool hasColorMatrix() const;
    bool hasSaturationMatrix() const;
    const mat4& getColorMatrix() const;

    void setY410BT2020(bool enable);
@@ -90,6 +92,7 @@ private:
    // projection matrix
    mat4 mProjectionMatrix;
    mat4 mColorMatrix;
    mat4 mSaturationMatrix;
    mat3 mInputTransformMatrix;
    mat4 mOutputTransformMatrix;
};
+7 −2
Original line number Diff line number Diff line
@@ -263,6 +263,10 @@ void GLES20RenderEngine::setupColorTransform(const mat4& colorTransform) {
    mState.setColorMatrix(colorTransform);
}

void GLES20RenderEngine::setSaturationMatrix(const mat4& saturationMatrix) {
    mState.setSaturationMatrix(saturationMatrix);
}

void GLES20RenderEngine::disableTexturing() {
    mState.disableTexture();
}
@@ -372,10 +376,11 @@ void GLES20RenderEngine::drawMesh(const Mesh& mesh) {

        // we need to convert the RGB value to linear space and convert it back when:
        // - there is a color matrix that is not an identity matrix, or
        // - there is a saturation matrix that is not an identity matrix, or
        // - there is an output transform matrix that is not an identity matrix, or
        // - the input transfer function doesn't match the output transfer function.
        if (wideColorState.hasColorMatrix() || wideColorState.hasOutputTransformMatrix() ||
            inputTransfer != outputTransfer) {
        if (wideColorState.hasColorMatrix() || wideColorState.hasSaturationMatrix() ||
            wideColorState.hasOutputTransformMatrix() || inputTransfer != outputTransfer) {
            switch (inputTransfer) {
                case Dataspace::TRANSFER_ST2084:
                    wideColorState.setInputTransferFunction(Description::TransferFunction::ST2084);
+1 −0
Original line number Diff line number Diff line
@@ -81,6 +81,7 @@ protected:
    virtual void setupLayerBlackedOut();
    virtual void setupFillWithColor(float r, float g, float b, float a);
    virtual void setupColorTransform(const mat4& colorTransform);
    virtual void setSaturationMatrix(const mat4& saturationMatrix);
    virtual void disableTexturing();
    virtual void disableBlending();

Loading