Merge "Remove useless GraphicBuffer() constructor" into oc-dev
am: 810e018e24
Change-Id: I630b623bc188301bc65e865f0298031ed9425cec
This commit is contained in:
@@ -182,7 +182,7 @@ static status_t produceFrame(const sp<ANativeWindow>& anw,
|
|||||||
err = native_window_dequeue_buffer_and_wait(anw.get(), &anb);
|
err = native_window_dequeue_buffer_and_wait(anw.get(), &anb);
|
||||||
if (err != NO_ERROR) return err;
|
if (err != NO_ERROR) return err;
|
||||||
|
|
||||||
sp<GraphicBuffer> buf(new GraphicBuffer(anb, /*keepOwnership*/false));
|
sp<GraphicBuffer> buf(GraphicBuffer::from(anb));
|
||||||
uint32_t grallocBufWidth = buf->getWidth();
|
uint32_t grallocBufWidth = buf->getWidth();
|
||||||
uint32_t grallocBufHeight = buf->getHeight();
|
uint32_t grallocBufHeight = buf->getHeight();
|
||||||
uint32_t grallocBufStride = buf->getStride();
|
uint32_t grallocBufStride = buf->getStride();
|
||||||
|
|||||||
@@ -342,7 +342,7 @@ static void ImageWriter_dequeueImage(JNIEnv* env, jobject thiz, jlong nativeCtx,
|
|||||||
}
|
}
|
||||||
// New GraphicBuffer object doesn't own the handle, thus the native buffer
|
// New GraphicBuffer object doesn't own the handle, thus the native buffer
|
||||||
// won't be freed when this object is destroyed.
|
// won't be freed when this object is destroyed.
|
||||||
sp<GraphicBuffer> buffer(new GraphicBuffer(anb, /*keepOwnership*/false));
|
sp<GraphicBuffer> buffer(GraphicBuffer::from(anb));
|
||||||
|
|
||||||
// Note that:
|
// Note that:
|
||||||
// 1. No need to lock buffer now, will only lock it when the first getPlanes() is called.
|
// 1. No need to lock buffer now, will only lock it when the first getPlanes() is called.
|
||||||
|
|||||||
Reference in New Issue
Block a user