@@ -693,11 +693,11 @@ status_t BufferQueueProducer::dequeueBuffer(int* outSlot, sp<android::Fence>* ou
693693 .requestorName = {mConsumerName .c_str (), mConsumerName .size ()},
694694 .extras = std::move (tempOptions),
695695 };
696- sp<GraphicBuffer> graphicBuffer = sp< GraphicBuffer>:: make (allocRequest);
696+ sp<GraphicBuffer> graphicBuffer = new GraphicBuffer (allocRequest);
697697#else
698698 sp<GraphicBuffer> graphicBuffer =
699- sp< GraphicBuffer>:: make (width, height, format, BQ_LAYER_COUNT, usage,
700- std::string {mConsumerName .c_str (), mConsumerName .size ()});
699+ new GraphicBuffer (width, height, format, BQ_LAYER_COUNT, usage,
700+ {mConsumerName .c_str (), mConsumerName .size ()});
701701#endif
702702
703703 status_t error = graphicBuffer->initCheck ();
@@ -1464,7 +1464,7 @@ status_t BufferQueueProducer::connect(const sp<IProducerListener>& listener,
14641464#ifndef NO_BINDER
14651465 if (IInterface::asBinder (listener)->remoteBinder () != nullptr ) {
14661466 status = IInterface::asBinder (listener)->linkToDeath (
1467- sp <IBinder::DeathRecipient>:: fromExisting (this ));
1467+ static_cast <IBinder::DeathRecipient*> (this ));
14681468 if (status != NO_ERROR) {
14691469 BQ_LOGE (" connect: linkToDeath failed: %s (%d)" ,
14701470 strerror (-status), status);
@@ -1553,7 +1553,8 @@ status_t BufferQueueProducer::disconnect(int api, DisconnectMode mode) {
15531553 IInterface::asBinder (mCore ->mLinkedToDeath );
15541554 // This can fail if we're here because of the death
15551555 // notification, but we just ignore it
1556- token->unlinkToDeath (sp<IBinder::DeathRecipient>::fromExisting (this ));
1556+ token->unlinkToDeath (
1557+ static_cast <IBinder::DeathRecipient*>(this ));
15571558 }
15581559#endif
15591560 mCore ->mSharedBufferSlot =
@@ -1684,11 +1685,11 @@ void BufferQueueProducer::allocateBuffers(uint32_t width, uint32_t height,
16841685#endif
16851686
16861687#if COM_ANDROID_GRAPHICS_LIBGUI_FLAGS(BQ_EXTENDEDALLOCATE)
1687- sp<GraphicBuffer> graphicBuffer = sp< GraphicBuffer>:: make (allocRequest);
1688+ sp<GraphicBuffer> graphicBuffer = new GraphicBuffer (allocRequest);
16881689#else
1689- sp<GraphicBuffer> graphicBuffer =
1690- sp<GraphicBuffer>:: make ( allocWidth, allocHeight, allocFormat, BQ_LAYER_COUNT,
1691- allocUsage, allocName);
1690+ sp<GraphicBuffer> graphicBuffer = new GraphicBuffer (
1691+ allocWidth, allocHeight, allocFormat, BQ_LAYER_COUNT,
1692+ allocUsage, allocName);
16921693#endif
16931694
16941695 status_t result = graphicBuffer->initCheck ();
0 commit comments