gralloc: Allow any process to have multiple buffer handles
authorRicardo Cerqueira <cyanogenmod@cerqueira.org>
Fri, 25 Oct 2013 22:38:52 +0000 (23:38 +0100)
committerRicardo Cerqueira <cyanogenmod@cerqueira.org>
Fri, 25 Oct 2013 22:38:52 +0000 (23:38 +0100)
Change-Id: I670ff7e03b19c07094b506a4422f99c30f06db0e

exynos4/hal/libgralloc_ump/alloc_device.cpp
exynos4/hal/libgralloc_ump/gralloc_module.cpp

index 2110f8d839ef4c93e497deef485700ec84ac5c16..05df8d12d2680376ea2f8b3ba0ec4764363428ae 100644 (file)
@@ -240,7 +240,7 @@ static int gralloc_alloc_buffer(alloc_device_t* dev, size_t size, int usage,
                             private_handle_rect *psFRect;
                             psRect = (private_handle_rect *)calloc(1, sizeof(private_handle_rect));
                             psRect->handle = (int)hnd->ump_id;
-                            psRect->stride = (int)hnd->stride_raw;
+                            psRect->stride = stride_raw;
                             psFRect = find_last_rect((int)hnd->ump_id);
                             psFRect->next = psRect;
                         }
index 27a930d7d55e1c2f1c90b82d448c5cfc0bc861af..3bbb8319cc13d1a751dee482ffb4621c663813d8 100644 (file)
@@ -223,8 +223,6 @@ static int gralloc_register_buffer(gralloc_module_t const* module, buffer_handle
         psFRect->next = psRect;
     }
 #endif
-    if (hnd->pid == getpid())
-        return 0;
 
     if (hnd->flags & private_handle_t::PRIV_FLAGS_USES_ION)
         err = gralloc_map(module, handle, &vaddr);