Loading evs/1.0/default/EvsCamera.cpp +5 −3 Original line number Diff line number Diff line Loading @@ -69,7 +69,8 @@ EvsCamera::EvsCamera(const char *id) : mHeight = (mDescription.defaultVerResolution) ? mDescription.defaultVerResolution : 480; mFormat = HAL_PIXEL_FORMAT_RGBA_8888; mUsage = GRALLOC_USAGE_HW_TEXTURE | GRALLOC_USAGE_HW_CAMERA_WRITE; mUsage = GRALLOC_USAGE_HW_TEXTURE | GRALLOC_USAGE_HW_CAMERA_WRITE | GRALLOC_USAGE_SW_READ_RARELY | GRALLOC_USAGE_SW_WRITE_RARELY; } Loading Loading @@ -440,7 +441,7 @@ void EvsCamera::generateFrames() { } void EvsCamera::fillTestFrame(BufferDesc buff) { void EvsCamera::fillTestFrame(const BufferDesc& buff) { // Lock our output buffer for writing uint32_t *pixels = nullptr; GraphicBufferMapper &mapper = GraphicBufferMapper::get(); Loading Loading @@ -474,7 +475,8 @@ void EvsCamera::fillTestFrame(BufferDesc buff) { pixels[col] = expectedPixel; } // Point to the next row pixels = pixels + (buff.stride / sizeof(*pixels)); // NOTE: stride retrieved from gralloc is in units of pixels pixels = pixels + buff.stride; } // Release our output buffer Loading evs/1.0/default/EvsCamera.h +1 −1 Original line number Diff line number Diff line Loading @@ -58,7 +58,7 @@ private: unsigned decreaseAvailableFrames_Locked(unsigned numToRemove); void generateFrames(); void fillTestFrame(BufferDesc buff); void fillTestFrame(const BufferDesc& buff); CameraDesc mDescription = {}; // The properties of this camera Loading evs/1.0/default/EvsDisplay.cpp +5 −4 Original line number Diff line number Diff line Loading @@ -169,7 +169,7 @@ Return<void> EvsDisplay::getTargetBuffer(getTargetBuffer_cb _hidl_cb) { mBuffer.memHandle = handle; mFrameBusy = false; ALOGD("Allocated new buffer %p with stride %u", mBuffer.memHandle.getNativeHandle(), mStride); mBuffer.memHandle.getNativeHandle(), mBuffer.stride); } // Do we have a frame available? Loading Loading @@ -263,7 +263,8 @@ Return<EvsResult> EvsDisplay::returnTargetBufferForDisplay(const BufferDesc& buf continue; } // Walk across this row (we'll step rows below) if (pixels[col] != expectedPixel) { uint32_t receivedPixel = pixels[col]; if (receivedPixel != expectedPixel) { ALOGE("Pixel check mismatch in frame buffer"); frameLooksGood = false; break; Loading @@ -274,8 +275,8 @@ Return<EvsResult> EvsDisplay::returnTargetBufferForDisplay(const BufferDesc& buf break; } // Point to the next row pixels = pixels + (mStride / sizeof(*pixels)); // Point to the next row (NOTE: gralloc reports stride in units of pixels) pixels = pixels + mBuffer.stride; } // Ensure we don't see the same buffer twice without it being rewritten Loading evs/1.0/default/EvsDisplay.h +0 −1 Original line number Diff line number Diff line Loading @@ -42,7 +42,6 @@ public: private: DisplayDesc mInfo = {}; BufferDesc mBuffer = {}; // A graphics buffer into which we'll store images uint32_t mStride = 0; // Bytes per line in the buffer bool mFrameBusy = false; // A flag telling us our buffer is in use DisplayState mRequestedState = DisplayState::NOT_VISIBLE; Loading Loading
evs/1.0/default/EvsCamera.cpp +5 −3 Original line number Diff line number Diff line Loading @@ -69,7 +69,8 @@ EvsCamera::EvsCamera(const char *id) : mHeight = (mDescription.defaultVerResolution) ? mDescription.defaultVerResolution : 480; mFormat = HAL_PIXEL_FORMAT_RGBA_8888; mUsage = GRALLOC_USAGE_HW_TEXTURE | GRALLOC_USAGE_HW_CAMERA_WRITE; mUsage = GRALLOC_USAGE_HW_TEXTURE | GRALLOC_USAGE_HW_CAMERA_WRITE | GRALLOC_USAGE_SW_READ_RARELY | GRALLOC_USAGE_SW_WRITE_RARELY; } Loading Loading @@ -440,7 +441,7 @@ void EvsCamera::generateFrames() { } void EvsCamera::fillTestFrame(BufferDesc buff) { void EvsCamera::fillTestFrame(const BufferDesc& buff) { // Lock our output buffer for writing uint32_t *pixels = nullptr; GraphicBufferMapper &mapper = GraphicBufferMapper::get(); Loading Loading @@ -474,7 +475,8 @@ void EvsCamera::fillTestFrame(BufferDesc buff) { pixels[col] = expectedPixel; } // Point to the next row pixels = pixels + (buff.stride / sizeof(*pixels)); // NOTE: stride retrieved from gralloc is in units of pixels pixels = pixels + buff.stride; } // Release our output buffer Loading
evs/1.0/default/EvsCamera.h +1 −1 Original line number Diff line number Diff line Loading @@ -58,7 +58,7 @@ private: unsigned decreaseAvailableFrames_Locked(unsigned numToRemove); void generateFrames(); void fillTestFrame(BufferDesc buff); void fillTestFrame(const BufferDesc& buff); CameraDesc mDescription = {}; // The properties of this camera Loading
evs/1.0/default/EvsDisplay.cpp +5 −4 Original line number Diff line number Diff line Loading @@ -169,7 +169,7 @@ Return<void> EvsDisplay::getTargetBuffer(getTargetBuffer_cb _hidl_cb) { mBuffer.memHandle = handle; mFrameBusy = false; ALOGD("Allocated new buffer %p with stride %u", mBuffer.memHandle.getNativeHandle(), mStride); mBuffer.memHandle.getNativeHandle(), mBuffer.stride); } // Do we have a frame available? Loading Loading @@ -263,7 +263,8 @@ Return<EvsResult> EvsDisplay::returnTargetBufferForDisplay(const BufferDesc& buf continue; } // Walk across this row (we'll step rows below) if (pixels[col] != expectedPixel) { uint32_t receivedPixel = pixels[col]; if (receivedPixel != expectedPixel) { ALOGE("Pixel check mismatch in frame buffer"); frameLooksGood = false; break; Loading @@ -274,8 +275,8 @@ Return<EvsResult> EvsDisplay::returnTargetBufferForDisplay(const BufferDesc& buf break; } // Point to the next row pixels = pixels + (mStride / sizeof(*pixels)); // Point to the next row (NOTE: gralloc reports stride in units of pixels) pixels = pixels + mBuffer.stride; } // Ensure we don't see the same buffer twice without it being rewritten Loading
evs/1.0/default/EvsDisplay.h +0 −1 Original line number Diff line number Diff line Loading @@ -42,7 +42,6 @@ public: private: DisplayDesc mInfo = {}; BufferDesc mBuffer = {}; // A graphics buffer into which we'll store images uint32_t mStride = 0; // Bytes per line in the buffer bool mFrameBusy = false; // A flag telling us our buffer is in use DisplayState mRequestedState = DisplayState::NOT_VISIBLE; Loading