msm8996: gralloc1: Align buffer size for each layer

Align the per layer buffer size instead of the total size.

Bug: 62299647
Test: Ran multiview test on Pixel XL, verified no visual artifacts
Change-Id: I114fe6b9e0b40ce6cf92fcb32559ed01b94527e4
This commit is contained in:
Naseer Ahmed 2017-06-13 17:45:12 -04:00 committed by Craig Donner
parent ef38dc2312
commit 8480196c50
1 changed files with 2 additions and 2 deletions

View File

@ -483,14 +483,14 @@ int BufferManager::AllocateBuffer(const BufferDescriptor &descriptor, buffer_han
int buffer_type = GetBufferType(gralloc_format);
allocator_->GetBufferSizeAndDimensions(descriptor, &size, &alignedw, &alignedh);
size = (bufferSize >= size) ? bufferSize : size;
size = size * layer_count;
int err = 0;
int flags = 0;
auto page_size = UINT(getpagesize());
AllocData data;
data.align = GetDataAlignment(format, prod_usage, cons_usage);
data.size = ALIGN(size, data.align);
size = ALIGN(size, data.align) * layer_count;
data.size = size;
data.handle = (uintptr_t) handle;
data.uncached = allocator_->UseUncached(prod_usage, cons_usage);