aboutsummaryrefslogtreecommitdiff
path: root/system/gralloc/gralloc.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'system/gralloc/gralloc.cpp')
-rw-r--r--system/gralloc/gralloc.cpp7
1 files changed, 6 insertions, 1 deletions
diff --git a/system/gralloc/gralloc.cpp b/system/gralloc/gralloc.cpp
index 0b6785e7..ae0a3243 100644
--- a/system/gralloc/gralloc.cpp
+++ b/system/gralloc/gralloc.cpp
@@ -27,6 +27,7 @@
#include "HostConnection.h"
#include "ProcessPipe.h"
#include "glUtils.h"
+#include <utils/CallStack.h>
#include <cutils/log.h>
#include <cutils/properties.h>
@@ -604,7 +605,11 @@ static int gralloc_alloc(alloc_device_t* dev,
}
}
- if (sw_read || sw_write || hw_cam_write || hw_vid_enc_read) {
+ // API26 always expect at least one file descriptor is associated with
+ // one color buffer
+ // BUG: 37719038
+ if (PLATFORM_SDK_VERSION >= 26 ||
+ sw_read || sw_write || hw_cam_write || hw_vid_enc_read) {
// keep space for image on guest memory if SW access is needed
// or if the camera is doing writing
if (yuv_format) {