Merge "jni: Adjust for libui gralloc flags change" into oc-dev
am: 3b7c1a32f1
Change-Id: Ib3c4d82de642f7db58bf1ce2729df1b1cf934e55
This commit is contained in:
@@ -234,6 +234,7 @@ LOCAL_STATIC_LIBRARIES := \
|
|||||||
libseccomp_policy \
|
libseccomp_policy \
|
||||||
libselinux \
|
libselinux \
|
||||||
libcrypto \
|
libcrypto \
|
||||||
|
libgrallocusage \
|
||||||
|
|
||||||
LOCAL_SHARED_LIBRARIES := \
|
LOCAL_SHARED_LIBRARIES := \
|
||||||
libmemtrack \
|
libmemtrack \
|
||||||
|
|||||||
@@ -34,6 +34,7 @@
|
|||||||
#include <private/gui/ComposerService.h>
|
#include <private/gui/ComposerService.h>
|
||||||
|
|
||||||
#include <hardware/gralloc1.h>
|
#include <hardware/gralloc1.h>
|
||||||
|
#include <grallocusage/GrallocUsageConversion.h>
|
||||||
|
|
||||||
#include "core_jni_helpers.h"
|
#include "core_jni_helpers.h"
|
||||||
|
|
||||||
@@ -85,7 +86,7 @@ static jlong android_hardware_HardwareBuffer_create(JNIEnv* env, jobject clazz,
|
|||||||
&producerUsage, &consumerUsage, usage, 0);
|
&producerUsage, &consumerUsage, usage, 0);
|
||||||
|
|
||||||
sp<GraphicBuffer> buffer = new GraphicBuffer(width, height, pixelFormat, layers,
|
sp<GraphicBuffer> buffer = new GraphicBuffer(width, height, pixelFormat, layers,
|
||||||
producerUsage, consumerUsage,
|
android_convertGralloc1To0Usage(producerUsage, consumerUsage),
|
||||||
std::string("HardwareBuffer pid [") + std::to_string(getpid()) +"]");
|
std::string("HardwareBuffer pid [") + std::to_string(getpid()) +"]");
|
||||||
status_t error = buffer->initCheck();
|
status_t error = buffer->initCheck();
|
||||||
if (error < 0) {
|
if (error < 0) {
|
||||||
|
|||||||
Reference in New Issue
Block a user