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

Commit 736388f1 authored by Android Build Coastguard Worker's avatar Android Build Coastguard Worker
Browse files

Merge cherrypicks of [17592536, 18764133] into security-aosp-sc-v2-release.

Change-Id: I9eb8a06ee8e6b16c9d7cbbb88955aec2ab1851c9
parents 5a922865 f4eedabb
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -70,6 +70,7 @@ SurfaceControl::SurfaceControl(const sp<SurfaceControl>& other) {
    mLayerId = other->mLayerId;
    mWidth = other->mWidth;
    mHeight = other->mHeight;
    mFormat = other->mFormat;
    mCreateFlags = other->mCreateFlags;
}

+7 −6
Original line number Diff line number Diff line
@@ -118,12 +118,13 @@ private:
    mutable sp<Surface>         mSurfaceData;
    mutable sp<BLASTBufferQueue> mBbq;
    mutable sp<SurfaceControl> mBbqChild;
    int32_t mLayerId;
    uint32_t mTransformHint;
    uint32_t mWidth;
    uint32_t mHeight;
    PixelFormat mFormat;
    uint32_t mCreateFlags;

    int32_t mLayerId = 0;
    uint32_t mTransformHint = 0;
    uint32_t mWidth = 0;
    uint32_t mHeight = 0;
    PixelFormat mFormat = PIXEL_FORMAT_NONE;
    uint32_t mCreateFlags = 0;
};

}; // namespace android
+5 −0
Original line number Diff line number Diff line
@@ -171,6 +171,11 @@ void EventThreadConnection::onFirstRef() {
}

status_t EventThreadConnection::stealReceiveChannel(gui::BitTube* outChannel) {
    std::scoped_lock lock(mLock);
    if (mChannel.initCheck() != NO_ERROR) {
        return NAME_NOT_FOUND;
    }

    outChannel->setReceiveFd(mChannel.moveReceiveFd());
    outChannel->setSendFd(base::unique_fd(dup(mChannel.getSendFd())));
    return NO_ERROR;
+2 −1
Original line number Diff line number Diff line
@@ -102,7 +102,8 @@ public:
private:
    virtual void onFirstRef();
    EventThread* const mEventThread;
    gui::BitTube mChannel;
    std::mutex mLock;
    gui::BitTube mChannel GUARDED_BY(mLock);

    std::vector<DisplayEventReceiver::Event> mPendingEvents;
};