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

Commit b5d2d0ed authored by Yi Kong's avatar Yi Kong Committed by Android (Google) Code Review
Browse files

Merge "[gui] Modernize codebase by replacing NULL with nullptr"

parents 8bf0f28f a03e044a
Loading
Loading
Loading
Loading
+4 −4
Original line number Diff line number Diff line
@@ -349,7 +349,7 @@ void BufferQueueCore::validateConsistencyLocked() const {
                BQ_LOGE("Slot %d is in mUnusedSlots but is not FREE", slot);
                usleep(PAUSE_TIME);
            }
            if (mSlots[slot].mGraphicBuffer != NULL) {
            if (mSlots[slot].mGraphicBuffer != nullptr) {
                BQ_LOGE("Slot %d is in mUnusedSluts but has an active buffer",
                        slot);
                usleep(PAUSE_TIME);
@@ -371,7 +371,7 @@ void BufferQueueCore::validateConsistencyLocked() const {
                BQ_LOGE("Slot %d is in mFreeSlots but is not FREE", slot);
                usleep(PAUSE_TIME);
            }
            if (mSlots[slot].mGraphicBuffer != NULL) {
            if (mSlots[slot].mGraphicBuffer != nullptr) {
                BQ_LOGE("Slot %d is in mFreeSlots but has a buffer",
                        slot);
                usleep(PAUSE_TIME);
@@ -394,7 +394,7 @@ void BufferQueueCore::validateConsistencyLocked() const {
                BQ_LOGE("Slot %d is in mFreeBuffers but is not FREE", slot);
                usleep(PAUSE_TIME);
            }
            if (mSlots[slot].mGraphicBuffer == NULL) {
            if (mSlots[slot].mGraphicBuffer == nullptr) {
                BQ_LOGE("Slot %d is in mFreeBuffers but has no buffer", slot);
                usleep(PAUSE_TIME);
            }
@@ -418,7 +418,7 @@ void BufferQueueCore::validateConsistencyLocked() const {
                BQ_LOGE("Slot %d is in mActiveBuffers but is FREE", slot);
                usleep(PAUSE_TIME);
            }
            if (mSlots[slot].mGraphicBuffer == NULL && !mIsAllocating) {
            if (mSlots[slot].mGraphicBuffer == nullptr && !mIsAllocating) {
                BQ_LOGE("Slot %d is in mActiveBuffers but has no buffer", slot);
                usleep(PAUSE_TIME);
            }
+1 −1
Original line number Diff line number Diff line
@@ -405,7 +405,7 @@ status_t GLConsumer::updateAndReleaseLocked(const BufferItem& item,
    }

    GLC_LOGV("updateAndRelease: (slot=%d buf=%p) -> (slot=%d buf=%p)",
            mCurrentTexture, mCurrentTextureImage != NULL ?
            mCurrentTexture, mCurrentTextureImage != nullptr ?
                    mCurrentTextureImage->graphicBufferHandle() : nullptr,
            slot, mSlots[slot].mGraphicBuffer->handle);

+2 −2
Original line number Diff line number Diff line
@@ -60,7 +60,7 @@ void ComposerService::connectLocked() {
    while (getService(name, &mComposerService) != NO_ERROR) {
        usleep(250000);
    }
    assert(mComposerService != NULL);
    assert(mComposerService != nullptr);

    // Create the death listener.
    class DeathObserver : public IBinder::DeathRecipient {
@@ -83,7 +83,7 @@ void ComposerService::connectLocked() {
    Mutex::Autolock _l(instance.mLock);
    if (instance.mComposerService == nullptr) {
        ComposerService::getInstance().connectLocked();
        assert(instance.mComposerService != NULL);
        assert(instance.mComposerService != nullptr);
        ALOGD("ComposerService reconnected");
    }
    return instance.mComposerService;
+3 −3
Original line number Diff line number Diff line
@@ -70,7 +70,7 @@ class CpuConsumer : public ConsumerBase
        uint32_t    chromaStep;

        LockedBuffer() :
            data(NULL),
            data(nullptr),
            width(0),
            height(0),
            format(PIXEL_FORMAT_NONE),
@@ -82,8 +82,8 @@ class CpuConsumer : public ConsumerBase
            dataSpace(HAL_DATASPACE_UNKNOWN),
            frameNumber(0),
            flexFormat(PIXEL_FORMAT_NONE),
            dataCb(NULL),
            dataCr(NULL),
            dataCb(nullptr),
            dataCr(nullptr),
            chromaStride(0),
            chromaStep(0)
        {}
+1 −1
Original line number Diff line number Diff line
@@ -314,7 +314,7 @@ private:

        const sp<GraphicBuffer>& graphicBuffer() { return mGraphicBuffer; }
        const native_handle* graphicBufferHandle() {
            return mGraphicBuffer == NULL ? NULL : mGraphicBuffer->handle;
            return mGraphicBuffer == nullptr ? nullptr : mGraphicBuffer->handle;
        }

    private:
Loading