Changed Bralloc, added thread locks