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

Commit 0ecfc27c authored by Valerie Hau's avatar Valerie Hau Committed by Android (Google) Code Review
Browse files

Merge "Fix callback registration during merging in same-process"

parents ebd2e595 236eba34
Loading
Loading
Loading
Loading
+15 −7
Original line number Original line Diff line number Diff line
@@ -484,14 +484,22 @@ SurfaceComposerClient::Transaction& SurfaceComposerClient::Transaction::merge(Tr
        mListenerCallbacks[listener].callbackIds.insert(std::make_move_iterator(
        mListenerCallbacks[listener].callbackIds.insert(std::make_move_iterator(
                                                                callbackIds.begin()),
                                                                callbackIds.begin()),
                                                        std::make_move_iterator(callbackIds.end()));
                                                        std::make_move_iterator(callbackIds.end()));
        // register surface controls for this listener that is merging
        for (const auto& surfaceControl : surfaceControls) {
            registerSurfaceControlForCallback(surfaceControl);
        }


        mListenerCallbacks[listener]
        mListenerCallbacks[listener].surfaceControls.insert(surfaceControls.begin(),
                .surfaceControls.insert(std::make_move_iterator(surfaceControls.begin()),
                                                            surfaceControls.end());

        auto& currentProcessCallbackInfo =
                mListenerCallbacks[TransactionCompletedListener::getIInstance()];
        currentProcessCallbackInfo.surfaceControls
                .insert(std::make_move_iterator(surfaceControls.begin()),
                        std::make_move_iterator(surfaceControls.end()));
                        std::make_move_iterator(surfaceControls.end()));

        // register all surface controls for all callbackIds for this listener that is merging
        for (const auto& surfaceControl : currentProcessCallbackInfo.surfaceControls) {
            TransactionCompletedListener::getInstance()
                    ->addSurfaceControlToCallbacks(surfaceControl,
                                                   currentProcessCallbackInfo.callbackIds);
        }
    }
    }


    mInputWindowCommands.merge(other.mInputWindowCommands);
    mInputWindowCommands.merge(other.mInputWindowCommands);
+1 −1
Original line number Original line Diff line number Diff line
{
{
        "presubmit": {
        "presubmit": {
            "filter": "*:-RefreshRateRangeTest.*:LayerCallbackTest.MergeBufferNoColor:LayerCallbackTest.MergeNoBufferColor:LayerCallbackTest.MergeOneBufferOneColor:LayerCallbackTest.Merge_SameCallback:LayerCallbackTest.Merge_DifferentClients:LayerCallbackTest.MultipleTransactions_Merge:LayerCallbackTest.MultipleTransactions_Merge_DifferentClients:LayerCallbackTest.MultipleTransactions_Merge_DifferentClients_NoStateChange:LayerCallbackTest.MultipleTransactions_Merge_DifferentClients_SameStateChange:LayerTypeAndRenderTypeTransactionTests/LayerTypeAndRenderTypeTransactionTest.SetCornerRadius/2:LayerTypeAndRenderTypeTransactionTests/LayerTypeAndRenderTypeTransactionTest.SetCornerRadius/3:LayerTypeAndRenderTypeTransactionTests/LayerTypeAndRenderTypeTransactionTest.SetCornerRadiusChildCrop/2:LayerTypeAndRenderTypeTransactionTests/LayerTypeAndRenderTypeTransactionTest.SetCornerRadiusChildCrop/3"
            "filter": "*:-RefreshRateRangeTest.*:LayerTypeAndRenderTypeTransactionTests/LayerTypeAndRenderTypeTransactionTest.SetCornerRadius/2:LayerTypeAndRenderTypeTransactionTests/LayerTypeAndRenderTypeTransactionTest.SetCornerRadius/3:LayerTypeAndRenderTypeTransactionTests/LayerTypeAndRenderTypeTransactionTest.SetCornerRadiusChildCrop/2:LayerTypeAndRenderTypeTransactionTests/LayerTypeAndRenderTypeTransactionTest.SetCornerRadiusChildCrop/3"
        }
        }
}
}