Lines Matching refs:buffer
143 static bool CheckBufferHandle(AllocTestPrms &info, BufferHandle &buffer) in CheckBufferHandle() argument
145 if (buffer.stride != (ALIGN_UP(info.expectStride, WIDTH_ALIGN))) { in CheckBufferHandle()
146 …DISPLAY_TEST_LOGE("stride check failed stride %d, expect stride %d ", buffer.stride, info.expectSt… in CheckBufferHandle()
152 if (buffer.size != info.expectSize) { in CheckBufferHandle()
153 … DISPLAY_TEST_LOGE("size check failed size %d, expect size %d ", buffer.size, info.expectSize); in CheckBufferHandle()
180 BufferHandle *buffer = nullptr; in AllocMemTest() local
183 ret = mGrallocFuncs->AllocMem(&info.allocInfo, &buffer); in AllocMemTest()
187 void *vAddr = mGrallocFuncs->Mmap(buffer); in AllocMemTest()
193 ret = mGrallocFuncs->InvalidateCache(buffer); in AllocMemTest()
198 if (memset_s(vAddr, buffer->size, 0, buffer->size) != EOK) { in AllocMemTest()
201 DISPLAY_TEST_CHK_RETURN(!CheckBufferHandle(info, *buffer), DISPLAY_FAILURE, in AllocMemTest()
204 ret = mGrallocFuncs->FlushCache(buffer); in AllocMemTest()
209 mGrallocFuncs->Unmap((buffer)); in AllocMemTest()
210 mGrallocFuncs->FreeMem(buffer); in AllocMemTest()