Lines Matching refs:descriptor
37 static BufferInfo GetBufferInfo(const BufferDescriptor &descriptor) { in GetBufferInfo() argument
38 return BufferInfo(descriptor.GetWidth(), descriptor.GetHeight(), descriptor.GetFormat(), in GetBufferInfo()
39 descriptor.GetProducerUsage(), descriptor.GetConsumerUsage()); in GetBufferInfo()
61 auto descriptor = std::make_shared<BufferDescriptor>(); in CreateBufferDescriptor() local
62 descriptors_map_.emplace(descriptor->GetId(), descriptor); in CreateBufferDescriptor()
63 *descriptor_id = descriptor->GetId(); in CreateBufferDescriptor()
70 const auto descriptor = descriptors_map_.find(descriptor_id); in DestroyBufferDescriptor() local
71 if (descriptor == descriptors_map_.end()) { in DestroyBufferDescriptor()
74 descriptors_map_.erase(descriptor); in DestroyBufferDescriptor()
107 for (auto &descriptor : descriptors) { in AllocateBuffers() local
108 descriptor->SetColorFormat(allocator_->GetImplDefinedFormat(descriptor->GetProducerUsage(), in AllocateBuffers()
109 descriptor->GetConsumerUsage(), in AllocateBuffers()
110 descriptor->GetFormat())); in AllocateBuffers()
157 void BufferManager::CreateSharedHandle(buffer_handle_t inbuffer, const BufferDescriptor &descriptor, in CreateSharedHandle() argument
164 BufferInfo info = GetBufferInfo(descriptor); in CreateSharedHandle()
169 int flags = GetHandleFlags(descriptor.GetFormat(), descriptor.GetProducerUsage(), in CreateSharedHandle()
170 descriptor.GetConsumerUsage()); in CreateSharedHandle()
171 int buffer_type = GetBufferType(descriptor.GetFormat()); in CreateSharedHandle()
180 descriptor.GetWidth(), in CreateSharedHandle()
181 descriptor.GetHeight(), in CreateSharedHandle()
182 descriptor.GetFormat(), in CreateSharedHandle()
185 descriptor.GetProducerUsage(), in CreateSharedHandle()
186 descriptor.GetConsumerUsage()); in CreateSharedHandle()
462 int BufferManager::AllocateBuffer(const BufferDescriptor &descriptor, buffer_handle_t *handle, in AllocateBuffer() argument
467 int format = descriptor.GetFormat(); in AllocateBuffer()
468 gralloc1_producer_usage_t prod_usage = descriptor.GetProducerUsage(); in AllocateBuffer()
469 gralloc1_consumer_usage_t cons_usage = descriptor.GetConsumerUsage(); in AllocateBuffer()
470 uint32_t layer_count = descriptor.GetLayerCount(); in AllocateBuffer()
478 BufferInfo info = GetBufferInfo(descriptor); in AllocateBuffer()
521 descriptor.GetWidth(), in AllocateBuffer()
522 descriptor.GetHeight(), in AllocateBuffer()
804 BufferDescriptor descriptor(width, height, format, producer_usage, consumer_usage); in Perform() local
807 GetBufferSizeAndDimensions(GetBufferInfo(descriptor), &size, &alignedw, &alignedh); in Perform()
808 AllocateBuffer(descriptor, hnd, size); in Perform()