Lines Matching defs:buffer
57 void SetOwnerIdForHeapFlags(DmabufHeapBuffer *buffer, enum DmaHeapFlagOwnerId ownerId)
59 if (buffer) {
60 set_owner_id_for_heap_flags(&buffer->heapFlags, ownerId);
89 int DmabufHeapBufferAlloc(unsigned int heapFd, DmabufHeapBuffer *buffer)
91 if (buffer == NULL) {
92 HILOG_ERROR(LOG_CORE, "%{public}s: buffer is NULL!", __func__);
95 if (buffer->size == 0) {
96 HILOG_ERROR(LOG_CORE, "alloc buffer size is wrong.");
101 .len = buffer->size,
103 .heap_flags = buffer->heapFlags,
107 HILOG_ERROR(LOG_CORE, "alloc buffer failed, size = %zu, ret = %d.", buffer->size, ret);
110 memtrace((void *)buffer, buffer->size, "DmabufHeap", true);
111 buffer->fd = data.fd;
115 int DmabufHeapBufferFree(DmabufHeapBuffer *buffer)
117 if (buffer == NULL) {
118 HILOG_ERROR(LOG_CORE, "%{public}s: buffer is NULL!", __func__);
121 memtrace((void *)buffer, buffer->size, "DmabufHeap", false);
122 return close(buffer->fd);
128 HILOG_ERROR(LOG_CORE, "buffer start syncType is wrong, syncType = %u.", syncType);
140 HILOG_ERROR(LOG_CORE, "buffer end syncType is wrong, syncType = %u.", syncType);