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

Commit 4aa92815 authored by Arthur Hung's avatar Arthur Hung Committed by Android (Google) Code Review
Browse files

Merge "Update transform hint from relayout window (2/2)" into sc-dev

parents 769add28 b6aa9a04
Loading
Loading
Loading
Loading
+5 −0
Original line number Original line Diff line number Diff line
@@ -205,6 +205,11 @@ void BLASTBufferQueue::update(const sp<SurfaceControl>& surface, uint32_t width,
        applyTransaction = true;
        applyTransaction = true;
    }
    }


    if (mSurfaceControl != nullptr) {
        mTransformHint = mSurfaceControl->getTransformHint();
        mBufferItemConsumer->setTransformHint(mTransformHint);
    }

    ui::Size newSize(width, height);
    ui::Size newSize(width, height);
    if (mRequestedSize != newSize) {
    if (mRequestedSize != newSize) {
        mRequestedSize.set(newSize);
        mRequestedSize.set(newSize);
+5 −1
Original line number Original line Diff line number Diff line
@@ -2857,8 +2857,10 @@ void SurfaceFlinger::processDisplayChanged(const wp<IBinder>& displayToken,
            (currentState.orientedDisplaySpaceRect != drawingState.orientedDisplaySpaceRect)) {
            (currentState.orientedDisplaySpaceRect != drawingState.orientedDisplaySpaceRect)) {
            display->setProjection(currentState.orientation, currentState.layerStackSpaceRect,
            display->setProjection(currentState.orientation, currentState.layerStackSpaceRect,
                                   currentState.orientedDisplaySpaceRect);
                                   currentState.orientedDisplaySpaceRect);
            if (display->isPrimary()) {
                mDefaultDisplayTransformHint = display->getTransformHint();
                mDefaultDisplayTransformHint = display->getTransformHint();
            }
            }
        }
        if (currentState.width != drawingState.width ||
        if (currentState.width != drawingState.width ||
            currentState.height != drawingState.height) {
            currentState.height != drawingState.height) {
            display->setDisplaySize(currentState.width, currentState.height);
            display->setDisplaySize(currentState.width, currentState.height);
@@ -6912,6 +6914,8 @@ sp<Layer> SurfaceFlinger::handleLayerCreatedLocked(const sp<IBinder>& handle, bo
        parent->addChild(layer);
        parent->addChild(layer);
    }
    }


    layer->updateTransformHint(mDefaultDisplayTransformHint);

    if (state->initialProducer != nullptr) {
    if (state->initialProducer != nullptr) {
        mGraphicBufferProducerList.insert(state->initialProducer);
        mGraphicBufferProducerList.insert(state->initialProducer);
        LOG_ALWAYS_FATAL_IF(mGraphicBufferProducerList.size() > mMaxGraphicBufferProducerListSize,
        LOG_ALWAYS_FATAL_IF(mGraphicBufferProducerList.size() > mMaxGraphicBufferProducerListSize,