Merge "Use layered version of graphic buffer allocation calls."

This commit is contained in:
TreeHugger Robot
2016-11-15 05:14:56 +00:00
committed by Android (Google) Code Review
2 changed files with 2 additions and 2 deletions

View File

@@ -111,7 +111,7 @@ static jlong android_view_GraphiceBuffer_create(JNIEnv* env, jobject clazz,
}
status_t error;
sp<GraphicBuffer> buffer(alloc->createGraphicBuffer(width, height, format, usage, &error));
sp<GraphicBuffer> buffer(alloc->createGraphicBuffer(width, height, format, 1, usage, &error));
if (buffer == NULL) {
if (kDebugGraphicBuffer) {
ALOGW("createGraphicBuffer() failed in GraphicBuffer.create()");

View File

@@ -227,7 +227,7 @@ sk_sp<Bitmap> Bitmap::allocateHardwareBitmap(uirenderer::renderthread::RenderThr
PixelFormat pixelFormat = internalFormatToPixelFormat(internalFormat);
status_t error;
sp<GraphicBuffer> buffer = alloc->createGraphicBuffer(info.width(), info.height(), pixelFormat,
GraphicBuffer::USAGE_HW_TEXTURE | GraphicBuffer::USAGE_SW_WRITE_NEVER
1, GraphicBuffer::USAGE_HW_TEXTURE | GraphicBuffer::USAGE_SW_WRITE_NEVER
| GraphicBuffer::USAGE_SW_READ_NEVER , &error);
if (!buffer.get()) {