Changes

Jump to: navigation, search

Platform/GFX/Gralloc

30 bytes added, 18:09, 16 May 2013
Genlock
* Read locks are non-exclusive, reference-counted, and recursive. This means that a single caller may issue N read locks on a single gralloc buffer handle, and then issue N unlocks to release the lock.
* Write locks are completely exclusive, both with any other write lock and also with any read lock.
* The following is somewhat speculative, not firmly established(QUESTION: so is it correct?). If a buffer is already locked (for read or write) and an attempt is made to get a write lock on it, then:
** If the new write lock attempt is using the same handle to the gralloc buffer that is already locked, this will fail. This typically gives a message like "trying to upgrade a read lock to a write lock".
** If the new write lock attempt is using a different handle than the one already locked, then this locking operation will wait until the existing lock is released.
Confirm
753
edits

Navigation menu