summaryrefslogtreecommitdiff
path: root/gralloc960/gralloc_module.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'gralloc960/gralloc_module.cpp')
-rw-r--r--gralloc960/gralloc_module.cpp18
1 files changed, 3 insertions, 15 deletions
diff --git a/gralloc960/gralloc_module.cpp b/gralloc960/gralloc_module.cpp
index 232ecc12..df2d82e3 100644
--- a/gralloc960/gralloc_module.cpp
+++ b/gralloc960/gralloc_module.cpp
@@ -66,22 +66,14 @@ static int gralloc_register_buffer(gralloc_module_t const* module, buffer_handle
// if this handle was created in this process, then we keep it as is.
private_handle_t* hnd = (private_handle_t*)handle;
- if (hnd->pid == getpid())
- {
- // If the handle is created and registered in the same process this is valid,
- // but it could also be that application is registering twice which is illegal.
- AWAR("Registering handle %p coming from the same process: %d.", hnd, hnd->pid);
- }
-
int retval = -EINVAL;
pthread_mutex_lock(&s_map_lock);
- hnd->pid = getpid();
-
if (hnd->flags & private_handle_t::PRIV_FLAGS_FRAMEBUFFER)
{
- AERR( "Can't register buffer %p as it is a framebuffer", handle );
+ AINF("Register framebuffer 0x%p is no-op", handle);
+ retval = 0;
}
else if (hnd->flags & private_handle_t::PRIV_FLAGS_USES_ION)
{
@@ -114,7 +106,7 @@ static int gralloc_unregister_buffer(gralloc_module_t const* module, buffer_hand
{
AERR( "Can't unregister buffer %p as it is a framebuffer", handle );
}
- else if (hnd->pid == getpid()) // never unmap buffers that were not created in this process
+ else
{
pthread_mutex_lock(&s_map_lock);
@@ -142,10 +134,6 @@ static int gralloc_unregister_buffer(gralloc_module_t const* module, buffer_hand
pthread_mutex_unlock(&s_map_lock);
}
- else
- {
- AERR( "Trying to unregister buffer %p from process %d that was not created in current process: %d", hnd, hnd->pid, getpid());
- }
return 0;
}