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

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

Snap for 4793185 from 4863737d to pi-release

Change-Id: I68622f22d2c2b33e98e688e15629498d4779e3bf
parents 51a91e2c 4863737d
Loading
Loading
Loading
Loading
+2 −6
Original line number Diff line number Diff line
@@ -1337,10 +1337,6 @@ bool Layer::setDataSpace(ui::Dataspace dataSpace) {
    return true;
}

ui::Dataspace Layer::getDataSpace() const {
    return mCurrentState.dataSpace;
}

uint32_t Layer::getLayerStack() const {
    auto p = mDrawingParent.promote();
    if (p == nullptr) {
@@ -1433,7 +1429,7 @@ LayerDebugInfo Layer::getLayerDebugInfo() const {
    info.mColor = ds.color;
    info.mFlags = ds.flags;
    info.mPixelFormat = getPixelFormat();
    info.mDataSpace = static_cast<android_dataspace>(getDataSpace());
    info.mDataSpace = static_cast<android_dataspace>(ds.dataSpace);
    info.mMatrix[0][0] = ds.active.transform[0][0];
    info.mMatrix[0][1] = ds.active.transform[0][1];
    info.mMatrix[1][0] = ds.active.transform[1][0];
@@ -1960,7 +1956,7 @@ void Layer::writeToProto(LayerProto* layerInfo, LayerVector::StateSet stateSet)

    layerInfo->set_is_opaque(isOpaque(state));
    layerInfo->set_invalidate(contentDirty);
    layerInfo->set_dataspace(dataspaceDetails(static_cast<android_dataspace>(getDataSpace())));
    layerInfo->set_dataspace(dataspaceDetails(static_cast<android_dataspace>(state.dataSpace)));
    layerInfo->set_pixel_format(decodePixelFormat(getPixelFormat()));
    LayerProtoHelper::writeToProto(getColor(), layerInfo->mutable_color());
    LayerProtoHelper::writeToProto(state.color, layerInfo->mutable_requested_color());
+0 −1
Original line number Diff line number Diff line
@@ -288,7 +288,6 @@ public:
    bool setFlags(uint8_t flags, uint8_t mask);
    bool setLayerStack(uint32_t layerStack);
    bool setDataSpace(ui::Dataspace dataSpace);
    ui::Dataspace getDataSpace() const;
    uint32_t getLayerStack() const;
    void deferTransactionUntil(const sp<IBinder>& barrierHandle, uint64_t frameNumber);
    void deferTransactionUntil(const sp<Layer>& barrierLayer, uint64_t frameNumber);
+6 −2
Original line number Diff line number Diff line
@@ -147,6 +147,7 @@ GLES20RenderEngine::GLES20RenderEngine(uint32_t featureFlags)
        mSrgbToXyz = srgb.getRGBtoXYZ();
        mDisplayP3ToXyz = displayP3.getRGBtoXYZ();
        mBt2020ToXyz = bt2020.getRGBtoXYZ();
        mXyzToSrgb = mat4(srgb.getXYZtoRGB());
        mXyzToDisplayP3 = mat4(displayP3.getXYZtoRGB());
        mXyzToBt2020 = mat4(bt2020.getXYZtoRGB());
    }
@@ -347,14 +348,17 @@ void GLES20RenderEngine::drawMesh(const Mesh& mesh) {
                    break;
            }

            // The supported output color spaces are Display P3 and BT2020.
            // The supported output color spaces are BT2020, Display P3 and standard RGB.
            switch (outputStandard) {
                case Dataspace::STANDARD_BT2020:
                    wideColorState.setOutputTransformMatrix(mXyzToBt2020);
                    break;
                default:
                case Dataspace::STANDARD_DCI_P3:
                    wideColorState.setOutputTransformMatrix(mXyzToDisplayP3);
                    break;
                default:
                    wideColorState.setOutputTransformMatrix(mXyzToSrgb);
                    break;
            }
        } else if (inputStandard != outputStandard) {
            // At this point, the input data space and output data space could be both
+1 −0
Original line number Diff line number Diff line
@@ -103,6 +103,7 @@ protected:
    mat3 mSrgbToXyz;
    mat3 mBt2020ToXyz;
    mat3 mDisplayP3ToXyz;
    mat4 mXyzToSrgb;
    mat4 mXyzToDisplayP3;
    mat4 mXyzToBt2020;

+6 −6
Original line number Diff line number Diff line
@@ -422,13 +422,13 @@ void ProgramCache::generateOETF(Formatter& fs, const Key& needs) {
        case Key::OUTPUT_TF_ST2084:
            fs << R"__SHADER__(
                vec3 OETF(const vec3 linear) {
                    const float m1 = (2610.0 / 4096.0) / 4.0;
                    const float m2 = (2523.0 / 4096.0) * 128.0;
                    const float c1 = (3424.0 / 4096.0);
                    const float c2 = (2413.0 / 4096.0) * 32.0;
                    const float c3 = (2392.0 / 4096.0) * 32.0;
                    const highp float m1 = (2610.0 / 4096.0) / 4.0;
                    const highp float m2 = (2523.0 / 4096.0) * 128.0;
                    const highp float c1 = (3424.0 / 4096.0);
                    const highp float c2 = (2413.0 / 4096.0) * 32.0;
                    const highp float c3 = (2392.0 / 4096.0) * 32.0;

                    vec3 tmp = pow(linear, vec3(m1));
                    highp vec3 tmp = pow(linear, vec3(m1));
                    tmp = (c1 + c2 * tmp) / (1.0 + c3 * tmp);
                    return pow(tmp, vec3(m2));
                }
Loading