Skip to content

Commit

Permalink
Merge cherrypicks of [7496339, 7495273, 7495624, 7496340, 7496341, 74…
Browse files Browse the repository at this point in the history
…96342, 7496343, 7495658, 7494789, 7494790, 7494791, 7496344, 7496345, 7496346, 7496347, 7496574, 7496348, 7496575, 7496576, 7496260, 7496349, 7496350, 7496440, 7496577, 7496578, 7496261, 7495625, 7496442, 7496351] into pi-qpr3-release

Change-Id: Ia3d4aea6adaa26bc1ec1f266a2c9607a6544974c
  • Loading branch information
android-build-team Robot committed May 14, 2019
2 parents f6b0c9c + 7262280 commit 127949a
Showing 1 changed file with 12 additions and 12 deletions.
Expand Up @@ -68,7 +68,7 @@ struct TWGraphicBufferProducer : public BASE {
Return<void> requestBuffer(int32_t slot, HGraphicBufferProducer::requestBuffer_cb _hidl_cb) override {
sp<GraphicBuffer> buf;
status_t status = mBase->requestBuffer(slot, &buf);
AnwBuffer anwBuffer;
AnwBuffer anwBuffer{};
if (buf != nullptr) {
::android::conversion::wrapAs(&anwBuffer, *buf);
}
Expand All @@ -89,15 +89,15 @@ struct TWGraphicBufferProducer : public BASE {
uint32_t width, uint32_t height,
::android::hardware::graphics::common::V1_0::PixelFormat format, uint32_t usage,
bool getFrameTimestamps, HGraphicBufferProducer::dequeueBuffer_cb _hidl_cb) override {
int slot;
int slot{};
sp<Fence> fence;
::android::FrameEventHistoryDelta outTimestamps;
status_t status = mBase->dequeueBuffer(
&slot, &fence, width, height,
static_cast<::android::PixelFormat>(format), usage, nullptr,
getFrameTimestamps ? &outTimestamps : nullptr);
hidl_handle tFence;
HGraphicBufferProducer::FrameEventHistoryDelta tOutTimestamps;
hidl_handle tFence{};
HGraphicBufferProducer::FrameEventHistoryDelta tOutTimestamps{};

native_handle_t* nh = nullptr;
if ((fence == nullptr) || !::android::conversion::wrapAs(&tFence, &nh, *fence)) {
Expand Down Expand Up @@ -144,8 +144,8 @@ struct TWGraphicBufferProducer : public BASE {
sp<GraphicBuffer> outBuffer;
sp<Fence> outFence;
status_t status = mBase->detachNextBuffer(&outBuffer, &outFence);
AnwBuffer tBuffer;
hidl_handle tFence;
AnwBuffer tBuffer{};
hidl_handle tFence{};

if (outBuffer == nullptr) {
LOG(ERROR) << "TWGraphicBufferProducer::detachNextBuffer - "
Expand Down Expand Up @@ -185,7 +185,7 @@ struct TWGraphicBufferProducer : public BASE {
Return<void> queueBuffer(
int32_t slot, const HGraphicBufferProducer::QueueBufferInput& input,
HGraphicBufferProducer::queueBuffer_cb _hidl_cb) override {
HGraphicBufferProducer::QueueBufferOutput tOutput;
HGraphicBufferProducer::QueueBufferOutput tOutput{};
BGraphicBufferProducer::QueueBufferInput lInput(
0, false, HAL_DATASPACE_UNKNOWN,
::android::Rect(0, 0, 1, 1),
Expand Down Expand Up @@ -246,7 +246,7 @@ struct TWGraphicBufferProducer : public BASE {
producerControlledByApp,
&lOutput);

HGraphicBufferProducer::QueueBufferOutput tOutput;
HGraphicBufferProducer::QueueBufferOutput tOutput{};
std::vector<std::vector<native_handle_t*> > nhAA;
if (!::android::conversion::wrapAs(&tOutput, &nhAA, lOutput)) {
LOG(ERROR) << "TWGraphicBufferProducer::connect - "
Expand Down Expand Up @@ -320,11 +320,11 @@ struct TWGraphicBufferProducer : public BASE {
status_t status = mBase->getLastQueuedBuffer(
&lOutBuffer, &lOutFence, lOutTransformMatrix);

AnwBuffer tOutBuffer;
AnwBuffer tOutBuffer{};
if (lOutBuffer != nullptr) {
::android::conversion::wrapAs(&tOutBuffer, *lOutBuffer);
}
hidl_handle tOutFence;
hidl_handle tOutFence{};
native_handle_t* nh = nullptr;
if ((lOutFence == nullptr) || !::android::conversion::wrapAs(&tOutFence, &nh, *lOutFence)) {
LOG(ERROR) << "TWGraphicBufferProducer::getLastQueuedBuffer - "
Expand All @@ -346,7 +346,7 @@ struct TWGraphicBufferProducer : public BASE {
::android::FrameEventHistoryDelta lDelta;
mBase->getFrameTimestamps(&lDelta);

HGraphicBufferProducer::FrameEventHistoryDelta tDelta;
HGraphicBufferProducer::FrameEventHistoryDelta tDelta{};
std::vector<std::vector<native_handle_t*> > nhAA;
if (!::android::conversion::wrapAs(&tDelta, &nhAA, lDelta)) {
LOG(ERROR) << "TWGraphicBufferProducer::getFrameTimestamps - "
Expand All @@ -365,7 +365,7 @@ struct TWGraphicBufferProducer : public BASE {
}

Return<void> getUniqueId(HGraphicBufferProducer::getUniqueId_cb _hidl_cb) override {
uint64_t outId;
uint64_t outId{};
status_t status = mBase->getUniqueId(&outId);
_hidl_cb(static_cast<int32_t>(status), outId);
return Void();
Expand Down

0 comments on commit 127949a

Please sign in to comment.