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

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

Merge "Refactor how layer metadata for use by VR is propagated from...

Merge "Refactor how layer metadata for use by VR is propagated from WindowManager based on feedback in frameworks/base."
parents d4050d36 479c60c8
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -60,7 +60,7 @@ public:
    virtual status_t createSurface(
            const String8& name, uint32_t w, uint32_t h,
            PixelFormat format, uint32_t flags,
            const sp<IBinder>& parent,
            const sp<IBinder>& parent, uint32_t windowType, uint32_t ownerUid,
            sp<IBinder>* handle,
            sp<IGraphicBufferProducer>* gbp) = 0;

+4 −3
Original line number Diff line number Diff line
@@ -107,7 +107,9 @@ public:
            uint32_t h,         // height in pixel
            PixelFormat format, // pixel-format desired
            uint32_t flags = 0, // usage flags
            SurfaceControl* parent = nullptr // parent
            SurfaceControl* parent = nullptr, // parent
            uint32_t windowType = 0, // from WindowManager.java (STATUS_BAR, INPUT_METHOD, etc.)
            uint32_t ownerUid = 0 // UID of the task
    );

    //! Create a virtual display
@@ -145,7 +147,6 @@ public:
    status_t    setFlags(const sp<IBinder>& id, uint32_t flags, uint32_t mask);
    status_t    setTransparentRegionHint(const sp<IBinder>& id, const Region& transparent);
    status_t    setLayer(const sp<IBinder>& id, int32_t layer);
    status_t    setLayerInfo(const sp<IBinder>& id, uint32_t type, uint32_t appid);
    status_t    setAlpha(const sp<IBinder>& id, float alpha=1.0f);
    status_t    setMatrix(const sp<IBinder>& id, float dsdx, float dtdx, float dsdy, float dtdy);
    status_t    setPosition(const sp<IBinder>& id, float x, float y);
+0 −1
Original line number Diff line number Diff line
@@ -62,7 +62,6 @@ public:

    status_t    setLayerStack(uint32_t layerStack);
    status_t    setLayer(int32_t layer);
    status_t    setLayerInfo(uint32_t type, uint32_t appid);
    status_t    setPosition(float x, float y);
    status_t    setSize(uint32_t w, uint32_t h);
    status_t    hide();
+2 −5
Original line number Diff line number Diff line
@@ -56,8 +56,7 @@ struct layer_state_t {
        eFinalCropChanged           = 0x00000400,
        eOverrideScalingModeChanged = 0x00000800,
        eGeometryAppliesWithResize  = 0x00001000,
        eLayerInfoChanged           = 0x00002000,
        eReparentChildren           = 0x00004000,
        eReparentChildren           = 0x00002000,
    };

    layer_state_t()
@@ -66,7 +65,7 @@ struct layer_state_t {
            alpha(0), flags(0), mask(0),
            reserved(0), crop(Rect::INVALID_RECT),
            finalCrop(Rect::INVALID_RECT), frameNumber(0),
            overrideScalingMode(-1), type(0), appid(0)
            overrideScalingMode(-1)
    {
        matrix.dsdx = matrix.dtdy = 1.0f;
        matrix.dsdy = matrix.dtdx = 0.0f;
@@ -100,8 +99,6 @@ struct layer_state_t {
            sp<IBinder>     reparentHandle;
            uint64_t        frameNumber;
            int32_t         overrideScalingMode;
            uint32_t        type;
            uint32_t        appid;
            // non POD must be last. see write/read
            Region          transparentRegion;
};
+7 −3
Original line number Diff line number Diff line
@@ -56,8 +56,8 @@ public:

    virtual status_t createSurface(const String8& name, uint32_t width,
            uint32_t height, PixelFormat format, uint32_t flags,
            const sp<IBinder>& parent, sp<IBinder>* handle,
            sp<IGraphicBufferProducer>* gbp) {
            const sp<IBinder>& parent, uint32_t windowType, uint32_t ownerUid,
            sp<IBinder>* handle, sp<IGraphicBufferProducer>* gbp) {
        Parcel data, reply;
        data.writeInterfaceToken(ISurfaceComposerClient::getInterfaceDescriptor());
        data.writeString8(name);
@@ -65,6 +65,8 @@ public:
        data.writeUint32(height);
        data.writeInt32(static_cast<int32_t>(format));
        data.writeUint32(flags);
        data.writeUint32(windowType);
        data.writeUint32(ownerUid);
        if (parent != nullptr) {
            data.writeStrongBinder(parent);
        }
@@ -148,6 +150,8 @@ status_t BnSurfaceComposerClient::onTransact(
            uint32_t height = data.readUint32();
            PixelFormat format = static_cast<PixelFormat>(data.readInt32());
            uint32_t createFlags = data.readUint32();
            uint32_t windowType = data.readUint32();
            uint32_t ownerUid = data.readUint32();
            sp<IBinder> parent = nullptr;
            if (data.dataAvail() > 0) {
                parent = data.readStrongBinder();
@@ -155,7 +159,7 @@ status_t BnSurfaceComposerClient::onTransact(
            sp<IBinder> handle;
            sp<IGraphicBufferProducer> gbp;
            status_t result = createSurface(name, width, height, format,
                    createFlags, parent, &handle, &gbp);
                    createFlags, parent, windowType, ownerUid, &handle, &gbp);
            reply->writeStrongBinder(handle);
            reply->writeStrongBinder(IInterface::asBinder(gbp));
            reply->writeInt32(result);
Loading