Merge "Remove useless GraphicBuffer() constructor" into oc-dev am: 810e018e24

am: dd1da2dcc1

Change-Id: I97c824bee05e693e488e2f63f02fe6b1a1acaf31
This commit is contained in:
Mathias Agopian
2017-04-05 00:59:34 +00:00
committed by android-build-merger
2 changed files with 2 additions and 2 deletions

View File

@@ -182,7 +182,7 @@ static status_t produceFrame(const sp<ANativeWindow>& anw,
err = native_window_dequeue_buffer_and_wait(anw.get(), &anb);
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 grallocBufHeight = buf->getHeight();
uint32_t grallocBufStride = buf->getStride();

View File

@@ -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
// 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:
// 1. No need to lock buffer now, will only lock it when the first getPlanes() is called.