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

Commit 0744edfb authored by TreeHugger Robot's avatar TreeHugger Robot Committed by Android (Google) Code Review
Browse files

Merge "SF: Remove setFinalCrop impl 2/2"

parents 8730ba81 dcce0e24
Loading
Loading
Loading
Loading
+1 −6
Original line number Diff line number Diff line
@@ -30,14 +30,13 @@ message Transaction {

message SurfaceChange {
    required int32 id = 1;

    reserved 7;
    oneof SurfaceChange {
        PositionChange              position                = 2;
        SizeChange                  size                    = 3;
        AlphaChange                 alpha                   = 4;
        LayerChange                 layer                   = 5;
        CropChange                  crop                    = 6;
        FinalCropChange             final_crop              = 7;
        MatrixChange                matrix                  = 8;
        OverrideScalingModeChange   override_scaling_mode   = 9;
        TransparentRegionHintChange transparent_region_hint = 10;
@@ -71,10 +70,6 @@ message CropChange {
    required Rectangle rectangle = 1;
}

message FinalCropChange {
    required Rectangle rectangle = 1;
}

message MatrixChange {
    required float dsdx = 1;
    required float dtdx = 2;
+0 −13
Original line number Diff line number Diff line
@@ -388,9 +388,6 @@ status_t Replayer::doSurfaceTransaction(
            case SurfaceChange::SurfaceChangeCase::kMatrix:
                setMatrix(transaction, change.id(), change.matrix());
                break;
            case SurfaceChange::SurfaceChangeCase::kFinalCrop:
                setFinalCrop(transaction, change.id(), change.final_crop());
                break;
            case SurfaceChange::SurfaceChangeCase::kOverrideScalingMode:
                setOverrideScalingMode(transaction, change.id(),
                        change.override_scaling_mode());
@@ -492,16 +489,6 @@ void Replayer::setCrop(SurfaceComposerClient::Transaction& t,
    t.setCrop_legacy(mLayers[id], r);
}

void Replayer::setFinalCrop(SurfaceComposerClient::Transaction& t,
        layer_id id, const FinalCropChange& fcc) {
    ALOGV("Layer %d: Setting Final Crop -- left=%d, top=%d, right=%d, bottom=%d", id,
            fcc.rectangle().left(), fcc.rectangle().top(), fcc.rectangle().right(),
            fcc.rectangle().bottom());
    Rect r = Rect(fcc.rectangle().left(), fcc.rectangle().top(), fcc.rectangle().right(),
            fcc.rectangle().bottom());
    t.setFinalCrop_legacy(mLayers[id], r);
}

void Replayer::setMatrix(SurfaceComposerClient::Transaction& t,
        layer_id id, const MatrixChange& mc) {
    ALOGV("Layer %d: Setting Matrix -- dsdx=%f, dtdx=%f, dsdy=%f, dtdy=%f", id, mc.dsdx(),
+0 −2
Original line number Diff line number Diff line
@@ -92,8 +92,6 @@ class Replayer {
            layer_id id, const LayerChange& lc);
    void setCrop(SurfaceComposerClient::Transaction& t,
            layer_id id, const CropChange& cc);
    void setFinalCrop(SurfaceComposerClient::Transaction& t,
            layer_id id, const FinalCropChange& fcc);
    void setMatrix(SurfaceComposerClient::Transaction& t,
            layer_id id, const MatrixChange& mc);
    void setOverrideScalingMode(SurfaceComposerClient::Transaction& t,
+1 −4
Original line number Diff line number Diff line
@@ -42,7 +42,6 @@ status_t LayerDebugInfo::writeToParcel(Parcel* parcel) const {
    RETURN_ON_ERROR(parcel->writeInt32(mWidth));
    RETURN_ON_ERROR(parcel->writeInt32(mHeight));
    RETURN_ON_ERROR(parcel->write(mCrop));
    RETURN_ON_ERROR(parcel->write(mFinalCrop));
    RETURN_ON_ERROR(parcel->writeFloat(mColor.r));
    RETURN_ON_ERROR(parcel->writeFloat(mColor.g));
    RETURN_ON_ERROR(parcel->writeFloat(mColor.b));
@@ -81,7 +80,6 @@ status_t LayerDebugInfo::readFromParcel(const Parcel* parcel) {
    RETURN_ON_ERROR(parcel->readInt32(&mWidth));
    RETURN_ON_ERROR(parcel->readInt32(&mHeight));
    RETURN_ON_ERROR(parcel->read(mCrop));
    RETURN_ON_ERROR(parcel->read(mFinalCrop));
    mColor.r = parcel->readFloat();
    RETURN_ON_ERROR(parcel->errorCheck());
    mColor.g = parcel->readFloat();
@@ -121,8 +119,7 @@ std::string to_string(const LayerDebugInfo& info) {
            info.mLayerStack, info.mZ, static_cast<double>(info.mX), static_cast<double>(info.mY),
            info.mWidth, info.mHeight);

    result.appendFormat("crop=%s, finalCrop=%s, ",
            to_string(info.mCrop).c_str(), to_string(info.mFinalCrop).c_str());
    result.appendFormat("crop=%s, ", to_string(info.mCrop).c_str());
    result.appendFormat("isOpaque=%1d, invalidate=%1d, ", info.mIsOpaque, info.mContentDirty);
    result.appendFormat("dataspace=%s, ", dataspaceDetails(info.mDataSpace).c_str());
    result.appendFormat("pixelformat=%s, ", decodePixelFormat(info.mPixelFormat).c_str());
+0 −6
Original line number Diff line number Diff line
@@ -38,7 +38,6 @@ status_t layer_state_t::write(Parcel& output) const
    *reinterpret_cast<layer_state_t::matrix22_t *>(
            output.writeInplace(sizeof(layer_state_t::matrix22_t))) = matrix;
    output.write(crop_legacy);
    output.write(finalCrop_legacy);
    output.writeStrongBinder(barrierHandle_legacy);
    output.writeStrongBinder(reparentHandle);
    output.writeUint64(frameNumber_legacy);
@@ -99,7 +98,6 @@ status_t layer_state_t::read(const Parcel& input)
        return BAD_VALUE;
    }
    input.read(crop_legacy);
    input.read(finalCrop_legacy);
    barrierHandle_legacy = input.readStrongBinder();
    reparentHandle = input.readStrongBinder();
    frameNumber_legacy = input.readUint64();
@@ -248,10 +246,6 @@ void layer_state_t::merge(const layer_state_t& other) {
        barrierGbp_legacy = other.barrierGbp_legacy;
        frameNumber_legacy = other.frameNumber_legacy;
    }
    if (other.what & eFinalCropChanged_legacy) {
        what |= eFinalCropChanged_legacy;
        finalCrop_legacy = other.finalCrop_legacy;
    }
    if (other.what & eOverrideScalingModeChanged) {
        what |= eOverrideScalingModeChanged;
        overrideScalingMode = other.overrideScalingMode;
Loading