Lines Matching refs:mem
41 AshmemDirectChannel::AshmemDirectChannel(const struct sensors_direct_mem_t *mem) : mAshmemFd(0) { in AshmemDirectChannel() argument
42 mAshmemFd = mem->handle->data[0]; in AshmemDirectChannel()
49 if ((size_t)::ashmem_get_size_region(mAshmemFd) != mem->size) { in AshmemDirectChannel()
54 mSize = mem->size; in AshmemDirectChannel()
56 mBase = ::mmap(NULL, mem->size, PROT_WRITE, MAP_SHARED, mAshmemFd, 0); in AshmemDirectChannel()
269 GrallocDirectChannel::GrallocDirectChannel(const struct sensors_direct_mem_t *mem) in GrallocDirectChannel() argument
271 if (mem->handle == nullptr) { in GrallocDirectChannel()
277 mNativeHandle = ::native_handle_clone(mem->handle); in GrallocDirectChannel()
291 GRALLOC_USAGE_SW_WRITE_OFTEN, 0, 0, mem->size, 1, &mBase); in GrallocDirectChannel()
303 mSize = mem->size; in GrallocDirectChannel()
329 bool GrallocDirectChannel::memoryMatches(const struct sensors_direct_mem_t *mem) const { in memoryMatches()
330 return mem->type == SENSOR_DIRECT_MEM_TYPE_GRALLOC && in memoryMatches()
331 GrallocHalWrapper::getInstance().isSameMemory(mem->handle, mNativeHandle); in memoryMatches()