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

Commit 77106b3f authored by Evan Rosky's avatar Evan Rosky Committed by Automerger Merge Worker
Browse files

Merge "Inform SurfaceFlinger about displays which receive input" into...

Merge "Inform SurfaceFlinger about displays which receive input" into sc-v2-dev am: 61309faf am: 1da402eb

Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/native/+/14669171

Change-Id: I40e9aaa3ba317e5fdb406c1627801e954f2dcbf6
parents 10ae9fc9 1da402eb
Loading
Loading
Loading
Loading
+6 −1
Original line number Diff line number Diff line
@@ -100,6 +100,10 @@ message LayerStackChange {
    required uint32 layer_stack = 1;
}

message DisplayFlagsChange {
    required uint32 flags = 1;
}

message HiddenFlagChange {
    required bool hidden_flag = 1;
}
@@ -120,6 +124,7 @@ message DisplayChange {
        LayerStackChange  layer_stack = 3;
        SizeChange        size        = 4;
        ProjectionChange  projection  = 5;
        DisplayFlagsChange flags      = 6;
    }
}

+7 −0
Original line number Diff line number Diff line
@@ -315,6 +315,7 @@ status_t ComposerState::read(const Parcel& input) {
DisplayState::DisplayState()
      : what(0),
        layerStack(0),
        flags(0),
        layerStackSpaceRect(Rect::EMPTY_RECT),
        orientedDisplaySpaceRect(Rect::EMPTY_RECT),
        width(0),
@@ -325,6 +326,7 @@ status_t DisplayState::write(Parcel& output) const {
    SAFE_PARCEL(output.writeStrongBinder, IInterface::asBinder(surface));
    SAFE_PARCEL(output.writeUint32, what);
    SAFE_PARCEL(output.writeUint32, layerStack);
    SAFE_PARCEL(output.writeUint32, flags);
    SAFE_PARCEL(output.writeUint32, toRotationInt(orientation));
    SAFE_PARCEL(output.write, layerStackSpaceRect);
    SAFE_PARCEL(output.write, orientedDisplaySpaceRect);
@@ -341,6 +343,7 @@ status_t DisplayState::read(const Parcel& input) {

    SAFE_PARCEL(input.readUint32, &what);
    SAFE_PARCEL(input.readUint32, &layerStack);
    SAFE_PARCEL(input.readUint32, &flags);
    uint32_t tmpUint = 0;
    SAFE_PARCEL(input.readUint32, &tmpUint);
    orientation = ui::toRotation(tmpUint);
@@ -361,6 +364,10 @@ void DisplayState::merge(const DisplayState& other) {
        what |= eLayerStackChanged;
        layerStack = other.layerStack;
    }
    if (other.what & eFlagsChanged) {
        what |= eFlagsChanged;
        flags = other.flags;
    }
    if (other.what & eDisplayProjectionChanged) {
        what |= eDisplayProjectionChanged;
        orientation = other.orientation;
+6 −0
Original line number Diff line number Diff line
@@ -1731,6 +1731,12 @@ void SurfaceComposerClient::Transaction::setDisplayLayerStack(const sp<IBinder>&
    s.what |= DisplayState::eLayerStackChanged;
}

void SurfaceComposerClient::Transaction::setDisplayFlags(const sp<IBinder>& token, uint32_t flags) {
    DisplayState& s(getDisplayState(token));
    s.flags = flags;
    s.what |= DisplayState::eFlagsChanged;
}

void SurfaceComposerClient::Transaction::setDisplayProjection(const sp<IBinder>& token,
                                                              ui::Rotation orientation,
                                                              const Rect& layerStackRect,
+3 −1
Original line number Diff line number Diff line
@@ -247,7 +247,8 @@ struct DisplayState {
        eSurfaceChanged = 0x01,
        eLayerStackChanged = 0x02,
        eDisplayProjectionChanged = 0x04,
        eDisplaySizeChanged = 0x08
        eDisplaySizeChanged = 0x08,
        eFlagsChanged = 0x10
    };

    DisplayState();
@@ -257,6 +258,7 @@ struct DisplayState {
    sp<IBinder> token;
    sp<IGraphicBufferProducer> surface;
    uint32_t layerStack;
    uint32_t flags;

    // These states define how layers are projected onto the physical display.
    //
+2 −0
Original line number Diff line number Diff line
@@ -563,6 +563,8 @@ public:

        void setDisplayLayerStack(const sp<IBinder>& token, uint32_t layerStack);

        void setDisplayFlags(const sp<IBinder>& token, uint32_t flags);

        /* setDisplayProjection() defines the projection of layer stacks
         * to a given display.
         *
Loading