summaryrefslogtreecommitdiff
path: root/gralloc/alloc_device.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'gralloc/alloc_device.cpp')
-rw-r--r--gralloc/alloc_device.cpp6
1 files changed, 6 insertions, 0 deletions
diff --git a/gralloc/alloc_device.cpp b/gralloc/alloc_device.cpp
index 67734050..cef58511 100644
--- a/gralloc/alloc_device.cpp
+++ b/gralloc/alloc_device.cpp
@@ -333,6 +333,12 @@ static int gralloc_alloc_framebuffer_locked(alloc_device_t *dev, size_t size, in
#endif
}
+
+ // correct numFds/numInts when there is no dmabuf fd
+ if (hnd->share_fd < 0) {
+ hnd->numFds--;
+ hnd->numInts++;
+ }
#endif
*pHandle = hnd;