Lines Matching refs:buf
341 int32_t* buf = static_cast<int32_t*>(buffer);
342 buf[0] = 'GBFR';
343 buf[1] = width;
344 buf[2] = height;
345 buf[3] = stride;
346 buf[4] = format;
347 buf[5] = static_cast<int32_t>(layerCount);
348 buf[6] = usage;
349 buf[7] = static_cast<int32_t>(mId >> 32);
350 buf[8] = static_cast<int32_t>(mId & 0xFFFFFFFFull);
351 buf[9] = static_cast<int32_t>(mGenerationNumber);
352 buf[10] = 0;
353 buf[11] = 0;
356 buf[10] = handle->numFds;
357 buf[11] = handle->numInts;
360 memcpy(&buf[12], handle->data + handle->numFds,
378 int const* buf = static_cast<int const*>(buffer);
379 if (buf[0] != 'GBFR') return BAD_TYPE;
381 const size_t numFds = static_cast<size_t>(buf[10]);
382 const size_t numInts = static_cast<size_t>(buf[11]);
409 width = buf[1];
410 height = buf[2];
411 stride = buf[3];
412 format = buf[4];
413 layerCount = static_cast<uintptr_t>(buf[5]);
414 usage = buf[6];
424 memcpy(h->data + numFds, &buf[12], numInts * sizeof(int));
431 mId = static_cast<uint64_t>(buf[7]) << 32;
432 mId |= static_cast<uint32_t>(buf[8]);
434 mGenerationNumber = static_cast<uint32_t>(buf[9]);