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

Commit 441cf01d authored by Pablo Ceballos's avatar Pablo Ceballos Committed by Android (Google) Code Review
Browse files

Merge "Make sure constructors initialize all members"

parents 1b747d60 bd3577ef
Loading
Loading
Loading
Loading
+10 −11
Original line number Diff line number Diff line
@@ -339,20 +339,19 @@ public:
        void setSurfaceDamage(const Region& damage) { surfaceDamage = damage; }

    private:
        int64_t timestamp;
        int isAutoTimestamp;
        android_dataspace dataSpace;
        int64_t timestamp{0};
        int isAutoTimestamp{0};
        android_dataspace dataSpace{HAL_DATASPACE_UNKNOWN};
        Rect crop;
        int scalingMode;
        uint32_t transform;
        uint32_t stickyTransform;
        int scalingMode{0};
        uint32_t transform{0};
        uint32_t stickyTransform{0};
        sp<Fence> fence;
        Region surfaceDamage;
    };

    // QueueBufferOutput must be a POD structure
    struct __attribute__ ((__packed__)) QueueBufferOutput {
        inline QueueBufferOutput() { }
        // outWidth - filled with default width applied to the buffer
        // outHeight - filled with default height applied to the buffer
        // outTransformHint - filled with default transform applied to the buffer
@@ -379,10 +378,10 @@ public:
            nextFrameNumber = inNextFrameNumber;
        }
    private:
        uint32_t width;
        uint32_t height;
        uint32_t transformHint;
        uint32_t numPendingBuffers;
        uint32_t width{0};
        uint32_t height{0};
        uint32_t transformHint{0};
        uint32_t numPendingBuffers{0};
        uint64_t nextFrameNumber{0};
    };

+4 −4
Original line number Diff line number Diff line
@@ -74,10 +74,10 @@ struct layer_state_t {
    status_t    read(const Parcel& input);

            struct matrix22_t {
                float   dsdx;
                float   dtdx;
                float   dsdy;
                float   dtdy;
                float   dsdx{0};
                float   dtdx{0};
                float   dsdy{0};
                float   dtdy{0};
            };
            sp<IBinder>     surface;
            uint32_t        what;
+11 −11
Original line number Diff line number Diff line
@@ -26,17 +26,17 @@
namespace android {

struct DisplayInfo {
    uint32_t w;
    uint32_t h;
    float xdpi;
    float ydpi;
    float fps;
    float density;
    uint8_t orientation;
    bool secure;
    nsecs_t appVsyncOffset;
    nsecs_t presentationDeadline;
    int colorTransform;
    uint32_t w{0};
    uint32_t h{0};
    float xdpi{0};
    float ydpi{0};
    float fps{0};
    float density{0};
    uint8_t orientation{0};
    bool secure{false};
    nsecs_t appVsyncOffset{0};
    nsecs_t presentationDeadline{0};
    int colorTransform{0};
};

/* Display orientations as defined in Surface.java and ISurfaceComposer.h. */
+2 −2
Original line number Diff line number Diff line
@@ -22,8 +22,8 @@
namespace android {

struct DisplayStatInfo {
    nsecs_t vsyncTime;
    nsecs_t vsyncPeriod;
    nsecs_t vsyncTime{0};
    nsecs_t vsyncPeriod{0};
};

}; // namespace android
+9 −0
Original line number Diff line number Diff line
@@ -66,6 +66,9 @@ size_t BufferItem::getPodSize() const {
    addAligned(size, mIsDroppable);
    addAligned(size, mAcquireCalled);
    addAligned(size, mTransformToDisplayInverse);
    addAligned(size, mAutoRefresh);
    addAligned(size, mQueuedBuffer);
    addAligned(size, mIsStale);
    return size;
}

@@ -151,6 +154,9 @@ status_t BufferItem::flatten(
    writeAligned(buffer, size, mIsDroppable);
    writeAligned(buffer, size, mAcquireCalled);
    writeAligned(buffer, size, mTransformToDisplayInverse);
    writeAligned(buffer, size, mAutoRefresh);
    writeAligned(buffer, size, mQueuedBuffer);
    writeAligned(buffer, size, mIsStale);

    return NO_ERROR;
}
@@ -207,6 +213,9 @@ status_t BufferItem::unflatten(
    readAligned(buffer, size, mIsDroppable);
    readAligned(buffer, size, mAcquireCalled);
    readAligned(buffer, size, mTransformToDisplayInverse);
    readAligned(buffer, size, mAutoRefresh);
    readAligned(buffer, size, mQueuedBuffer);
    readAligned(buffer, size, mIsStale);

    return NO_ERROR;
}
Loading