external/gbm_gralloc
Revision | 2f728292e676b48584c75cc1f46f4c5a35b5eb99 (tree) |
---|---|
Time | 2018-04-02 18:21:23 |
Author | Chih-Wei Huang <cwhuang@linu...> |
Commiter | Chih-Wei Huang |
Merge remote-tracking branch 'origin/master' into nougat-x86
Conflicts:
gralloc_drm_handle.h
@@ -27,6 +27,7 @@ | ||
27 | 27 | #include <cutils/log.h> |
28 | 28 | #include <stdlib.h> |
29 | 29 | #include <stdarg.h> |
30 | +#include <string.h> | |
30 | 31 | #include <pthread.h> |
31 | 32 | #include <errno.h> |
32 | 33 |
@@ -28,6 +28,7 @@ | ||
28 | 28 | #include <cutils/atomic.h> |
29 | 29 | #include <cutils/properties.h> |
30 | 30 | #include <stdlib.h> |
31 | +#include <string.h> | |
31 | 32 | #include <errno.h> |
32 | 33 | #include <sys/types.h> |
33 | 34 | #include <sys/stat.h> |
@@ -341,14 +342,10 @@ static struct gralloc_gbm_handle_t *create_bo_handle(int width, | ||
341 | 342 | { |
342 | 343 | struct gralloc_gbm_handle_t *handle; |
343 | 344 | |
344 | - handle = new gralloc_gbm_handle_t(); | |
345 | + handle = (gralloc_gbm_handle_t *)native_handle_create(GRALLOC_GBM_HANDLE_NUM_FDS, GRALLOC_GBM_HANDLE_NUM_INTS); | |
345 | 346 | if (!handle) |
346 | 347 | return NULL; |
347 | 348 | |
348 | - handle->base.version = sizeof(handle->base); | |
349 | - handle->base.numInts = GRALLOC_GBM_HANDLE_NUM_INTS; | |
350 | - handle->base.numFds = GRALLOC_GBM_HANDLE_NUM_FDS; | |
351 | - | |
352 | 349 | handle->magic = GRALLOC_GBM_HANDLE_MAGIC; |
353 | 350 | handle->width = width; |
354 | 351 | handle->height = height; |
@@ -374,7 +371,7 @@ struct gralloc_gbm_handle_t *gralloc_gbm_bo_create(struct gbm_device *gbm, | ||
374 | 371 | |
375 | 372 | bo = gbm_alloc(gbm, handle); |
376 | 373 | if (!bo) { |
377 | - delete handle; | |
374 | + native_handle_delete(&handle->base); | |
378 | 375 | return NULL; |
379 | 376 | } |
380 | 377 |