diff options
author | 2018-06-07 23:46:04 +0000 | |
---|---|---|
committer | 2018-06-07 23:46:04 +0000 | |
commit | a160f5a70ffba3715c8a92f4f469922d59635356 (patch) | |
tree | 627f17cbd47a952696913884b21d100cc15c855b /libs/gui/CpuConsumer.cpp | |
parent | 978e43d7a14f75a0d2d32517d906e173de48110b (diff) | |
parent | 9c804c47fc86a45ac517e9c91d3c986cb9d315dd (diff) |
Merge "Replace NULL/0 with nullptr"
Diffstat (limited to 'libs/gui/CpuConsumer.cpp')
-rw-r--r-- | libs/gui/CpuConsumer.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/libs/gui/CpuConsumer.cpp b/libs/gui/CpuConsumer.cpp index ae7c65c441..9f09e0c0d4 100644 --- a/libs/gui/CpuConsumer.cpp +++ b/libs/gui/CpuConsumer.cpp @@ -114,7 +114,7 @@ status_t CpuConsumer::lockNextBuffer(LockedBuffer *nativeBuffer) { int slot = b.mSlot; - void *bufferPointer = NULL; + void *bufferPointer = nullptr; android_ycbcr ycbcr = android_ycbcr(); PixelFormat format = mSlots[slot].mGraphicBuffer->getPixelFormat(); @@ -145,7 +145,7 @@ status_t CpuConsumer::lockNextBuffer(LockedBuffer *nativeBuffer) { } } - if (bufferPointer == NULL) { // not flexible YUV + if (bufferPointer == nullptr) { // not flexible YUV if (b.mFence.get()) { err = mSlots[slot].mGraphicBuffer->lockAsync( GraphicBuffer::USAGE_SW_READ_OFTEN, @@ -185,7 +185,7 @@ status_t CpuConsumer::lockNextBuffer(LockedBuffer *nativeBuffer) { nativeBuffer->height = mSlots[slot].mGraphicBuffer->getHeight(); nativeBuffer->format = format; nativeBuffer->flexFormat = flexFormat; - nativeBuffer->stride = (ycbcr.y != NULL) ? + nativeBuffer->stride = (ycbcr.y != nullptr) ? static_cast<uint32_t>(ycbcr.ystride) : mSlots[slot].mGraphicBuffer->getStride(); @@ -253,7 +253,7 @@ status_t CpuConsumer::releaseAcquiredBufferLocked(size_t lockedIdx) { AcquiredBuffer &ab = mAcquiredBuffers.editItemAt(lockedIdx); ab.mSlot = BufferQueue::INVALID_BUFFER_SLOT; - ab.mBufferPointer = NULL; + ab.mBufferPointer = nullptr; ab.mGraphicBuffer.clear(); mCurrentLockedBuffers--; |