Lines Matching refs:t

107 status_t toStatusT(Return<void> const& t) {  in toStatusT()  argument
108 return t.isOk() ? OK : (t.isDeadObject() ? DEAD_OBJECT : UNKNOWN_ERROR); in toStatusT()
140 int32_t toRawDataspace(Dataspace const& t) { in toRawDataspace() argument
141 return static_cast<int32_t>(t); in toRawDataspace()
153 hidl_vec<uint8_t> t; in inHidlBytes() local
154 t.setToExternal(static_cast<uint8_t*>(const_cast<void*>(l)), size, false); in inHidlBytes()
155 return t; in inHidlBytes()
167 hidl_vec<uint8_t> t; in toHidlBytes() local
168 t.resize(size); in toHidlBytes()
170 std::copy(src, src + size, t.data()); in toHidlBytes()
171 return t; in toHidlBytes()
181 void wrapAs(AnwBuffer* t, GraphicBuffer const& l) { in wrapAs() argument
182 t->attr.width = l.getWidth(); in wrapAs()
183 t->attr.height = l.getHeight(); in wrapAs()
184 t->attr.stride = l.getStride(); in wrapAs()
185 t->attr.format = static_cast<PixelFormat>(l.getPixelFormat()); in wrapAs()
186 t->attr.layerCount = l.getLayerCount(); in wrapAs()
187 t->attr.usage = static_cast<uint32_t>(l.getUsage()); in wrapAs()
188 t->attr.id = l.getId(); in wrapAs()
189 t->attr.generationNumber = l.getGenerationNumber(); in wrapAs()
190 t->nativeHandle = hidl_handle(l.handle); in wrapAs()
203 bool convertTo(GraphicBuffer* l, AnwBuffer const& t) { in convertTo() argument
204 native_handle_t* handle = t.nativeHandle == nullptr ? in convertTo()
205 nullptr : native_handle_clone(t.nativeHandle); in convertTo()
214 ints[1] = static_cast<int32_t>(t.attr.width); in convertTo()
215 ints[2] = static_cast<int32_t>(t.attr.height); in convertTo()
216 ints[3] = static_cast<int32_t>(t.attr.stride); in convertTo()
217 ints[4] = static_cast<int32_t>(t.attr.format); in convertTo()
218 ints[5] = static_cast<int32_t>(t.attr.layerCount); in convertTo()
219 ints[6] = static_cast<int32_t>(t.attr.usage); in convertTo()
220 ints[7] = static_cast<int32_t>(t.attr.id >> 32); in convertTo()
221 ints[8] = static_cast<int32_t>(t.attr.id & 0xFFFFFFFF); in convertTo()
222 ints[9] = static_cast<int32_t>(t.attr.generationNumber); in convertTo()
432 bool wrapAs(hidl_handle* t, native_handle_t** nh, Fence const& l) { in wrapAs() argument
459 if (unflattenFence(t, nh, constBuffer, size, constFds, numFds) in wrapAs()
477 bool convertTo(Fence* l, hidl_handle const& t) { in convertTo() argument
478 int fd = native_handle_read_fd(t); in convertTo()
493 size_t const baseSize = getFenceFlattenedSize(t); in convertTo()
501 size_t const baseNumFds = getFenceFdCount(t); in convertTo()
540 HGraphicBufferProducer::FenceTimeSnapshot const& t) { in getFlattenedSize() argument
541 constexpr size_t min = sizeof(t.state); in getFlattenedSize()
542 switch (t.state) { in getFlattenedSize()
546 return min + getFenceFlattenedSize(t.fence); in getFlattenedSize()
562 HGraphicBufferProducer::FenceTimeSnapshot const& t) { in getFdCount() argument
563 return t.state == in getFdCount()
565 getFenceFdCount(t.fence) : 0; in getFdCount()
581 status_t flatten(HGraphicBufferProducer::FenceTimeSnapshot const& t, in flatten() argument
583 if (size < getFlattenedSize(t)) { in flatten()
587 switch (t.state) { in flatten()
595 return flattenFence(t.fence, buffer, size, fds, numFds); in flatten()
599 FlattenableUtils::write(buffer, size, t.signalTimeNs); in flatten()
621 HGraphicBufferProducer::FenceTimeSnapshot* t, native_handle_t** nh, in unflatten() argument
623 if (size < sizeof(t->state)) { in unflatten()
632 t->state = HGraphicBufferProducer::FenceTimeSnapshot::State::EMPTY; in unflatten()
635 t->state = HGraphicBufferProducer::FenceTimeSnapshot::State::FENCE; in unflatten()
636 return unflattenFence(&t->fence, nh, buffer, size, fds, numFds); in unflatten()
638 t->state = HGraphicBufferProducer::FenceTimeSnapshot::State::SIGNAL_TIME; in unflatten()
639 if (size < sizeof(t->signalTimeNs)) { in unflatten()
642 FlattenableUtils::read(buffer, size, t->signalTimeNs); in unflatten()
679 HGraphicBufferProducer::FrameEventsDelta const& t) { in getFlattenedSize() argument
680 return minFlattenedSize(t) + in getFlattenedSize()
681 getFlattenedSize(t.gpuCompositionDoneFence) + in getFlattenedSize()
682 getFlattenedSize(t.displayPresentFence) + in getFlattenedSize()
683 getFlattenedSize(t.displayRetireFence) + in getFlattenedSize()
684 getFlattenedSize(t.releaseFence); in getFlattenedSize()
695 HGraphicBufferProducer::FrameEventsDelta const& t) { in getFdCount() argument
696 return getFdCount(t.gpuCompositionDoneFence) + in getFdCount()
697 getFdCount(t.displayPresentFence) + in getFdCount()
698 getFdCount(t.displayRetireFence) + in getFdCount()
699 getFdCount(t.releaseFence); in getFdCount()
717 status_t unflatten(HGraphicBufferProducer::FrameEventsDelta* t, in unflatten() argument
720 if (size < minFlattenedSize(*t)) { in unflatten()
723 FlattenableUtils::read(buffer, size, t->frameNumber); in unflatten()
732 t->index = static_cast<uint32_t>(index); in unflatten()
735 t->addPostCompositeCalled = static_cast<bool>(temp); in unflatten()
737 t->addRetireCalled = static_cast<bool>(temp); in unflatten()
739 t->addReleaseCalled = static_cast<bool>(temp); in unflatten()
741 FlattenableUtils::read(buffer, size, t->postedTimeNs); in unflatten()
742 FlattenableUtils::read(buffer, size, t->requestedPresentTimeNs); in unflatten()
743 FlattenableUtils::read(buffer, size, t->latchTimeNs); in unflatten()
744 FlattenableUtils::read(buffer, size, t->firstRefreshStartTimeNs); in unflatten()
745 FlattenableUtils::read(buffer, size, t->lastRefreshStartTimeNs); in unflatten()
746 FlattenableUtils::read(buffer, size, t->dequeueReadyTime); in unflatten()
750 tSnapshot[0] = &t->gpuCompositionDoneFence; in unflatten()
751 tSnapshot[1] = &t->displayPresentFence; in unflatten()
752 tSnapshot[2] = &t->displayRetireFence; in unflatten()
753 tSnapshot[3] = &t->releaseFence; in unflatten()
786 status_t flatten(HGraphicBufferProducer::FrameEventsDelta const& t, in flatten() argument
789 if (t.index >= static_cast<uint32_t>(FrameEventHistory::MAX_FRAME_HISTORY) in flatten()
790 || t.index > std::numeric_limits<uint8_t>::max()) { in flatten()
794 FlattenableUtils::write(buffer, size, t.frameNumber); in flatten()
797 FlattenableUtils::write(buffer, size, static_cast<uint8_t>(t.index)); in flatten()
799 buffer, size, static_cast<uint8_t>(t.addPostCompositeCalled)); in flatten()
801 buffer, size, static_cast<uint8_t>(t.addRetireCalled)); in flatten()
803 buffer, size, static_cast<uint8_t>(t.addReleaseCalled)); in flatten()
805 FlattenableUtils::write(buffer, size, t.postedTimeNs); in flatten()
806 FlattenableUtils::write(buffer, size, t.requestedPresentTimeNs); in flatten()
807 FlattenableUtils::write(buffer, size, t.latchTimeNs); in flatten()
808 FlattenableUtils::write(buffer, size, t.firstRefreshStartTimeNs); in flatten()
809 FlattenableUtils::write(buffer, size, t.lastRefreshStartTimeNs); in flatten()
810 FlattenableUtils::write(buffer, size, t.dequeueReadyTime); in flatten()
814 tSnapshot[0] = &t.gpuCompositionDoneFence; in flatten()
815 tSnapshot[1] = &t.displayPresentFence; in flatten()
816 tSnapshot[2] = &t.displayRetireFence; in flatten()
817 tSnapshot[3] = &t.releaseFence; in flatten()
838 HGraphicBufferProducer::FrameEventHistoryDelta const& t) { in getFlattenedSize() argument
840 sizeof(t.compositorTiming); in getFlattenedSize()
841 for (size_t i = 0; i < t.deltas.size(); ++i) { in getFlattenedSize()
842 size += getFlattenedSize(t.deltas[i]); in getFlattenedSize()
855 HGraphicBufferProducer::FrameEventHistoryDelta const& t) { in getFdCount() argument
857 for (size_t i = 0; i < t.deltas.size(); ++i) { in getFdCount()
858 numFds += getFdCount(t.deltas[i]); in getFdCount()
879 HGraphicBufferProducer::FrameEventHistoryDelta* t, in unflatten() argument
886 FlattenableUtils::read(buffer, size, t->compositorTiming); in unflatten()
894 t->deltas.resize(deltaCount); in unflatten()
898 &(t->deltas[deltaIndex]), &((*nh)[deltaIndex]), in unflatten()
920 HGraphicBufferProducer::FrameEventHistoryDelta const& t, in flatten() argument
922 if (t.deltas.size() > ::android::FrameEventHistory::MAX_FRAME_HISTORY) { in flatten()
925 if (size < getFlattenedSize(t)) { in flatten()
929 FlattenableUtils::write(buffer, size, t.compositorTiming); in flatten()
931 FlattenableUtils::write(buffer, size, static_cast<uint32_t>(t.deltas.size())); in flatten()
932 for (size_t deltaIndex = 0; deltaIndex < t.deltas.size(); ++deltaIndex) { in flatten()
933 status_t status = flatten(t.deltas[deltaIndex], buffer, size, fds, numFds); in flatten()
955 bool wrapAs(HGraphicBufferProducer::FrameEventHistoryDelta* t, in wrapAs() argument
985 if (unflatten(t, nh, constBuffer, size, constFds, numFds) != NO_ERROR) { in wrapAs()
1003 HGraphicBufferProducer::FrameEventHistoryDelta const& t) { in convertTo() argument
1005 size_t const baseSize = getFlattenedSize(t); in convertTo()
1012 size_t const baseNumFds = getFdCount(t); in convertTo()
1023 if (flatten(t, buffer, size, fds, numFds) != NO_ERROR) { in convertTo()
1046 size_t getFlattenedSize(Region const& t) { in getFlattenedSize() argument
1047 return sizeof(uint32_t) + t.size() * sizeof(::android::Rect); in getFlattenedSize()
1058 status_t unflatten(Region* t, void const*& buffer, size_t& size) { in unflatten() argument
1072 t->resize(numRects); in unflatten()
1080 (*t)[r] = Rect{ in unflatten()
1097 status_t flatten(Region const& t, void*& buffer, size_t& size) { in flatten() argument
1098 if (size < getFlattenedSize(t)) { in flatten()
1102 FlattenableUtils::write(buffer, size, static_cast<uint32_t>(t.size())); in flatten()
1103 for (size_t r = 0; r < t.size(); ++r) { in flatten()
1105 static_cast<int32_t>(t[r].left), in flatten()
1106 static_cast<int32_t>(t[r].top), in flatten()
1107 static_cast<int32_t>(t[r].right), in flatten()
1108 static_cast<int32_t>(t[r].bottom)); in flatten()
1125 bool convertTo(Region* t, ::android::Region const& l) { in convertTo() argument
1141 if (unflatten(t, constBuffer, size) != NO_ERROR) { in convertTo()
1155 bool convertTo(::android::Region* l, Region const& t) { in convertTo() argument
1156 size_t const baseSize = getFlattenedSize(t); in convertTo()
1165 if (flatten(t, buffer, size) != NO_ERROR) { in convertTo()
1207 size_t getFlattenedSize(HGraphicBufferProducer::QueueBufferInput const& t) { in getFlattenedSize() argument
1208 return minFlattenedSize(t) + in getFlattenedSize()
1209 getFenceFlattenedSize(t.fence) + in getFlattenedSize()
1210 getFlattenedSize(t.surfaceDamage) + in getFlattenedSize()
1222 HGraphicBufferProducer::QueueBufferInput const& t) { in getFdCount() argument
1223 return getFenceFdCount(t.fence); in getFdCount()
1238 status_t flatten(HGraphicBufferProducer::QueueBufferInput const& t, in flatten() argument
1241 if (size < getFlattenedSize(t)) { in flatten()
1245 FlattenableUtils::write(buffer, size, t.timestamp); in flatten()
1246 FlattenableUtils::write(buffer, size, static_cast<int>(t.isAutoTimestamp)); in flatten()
1248 static_cast<android_dataspace_t>(t.dataSpace)); in flatten()
1250 static_cast<int32_t>(t.crop.left), in flatten()
1251 static_cast<int32_t>(t.crop.top), in flatten()
1252 static_cast<int32_t>(t.crop.right), in flatten()
1253 static_cast<int32_t>(t.crop.bottom))); in flatten()
1254 FlattenableUtils::write(buffer, size, static_cast<int>(t.scalingMode)); in flatten()
1255 FlattenableUtils::write(buffer, size, t.transform); in flatten()
1256 FlattenableUtils::write(buffer, size, t.stickyTransform); in flatten()
1257 FlattenableUtils::write(buffer, size, t.getFrameTimestamps); in flatten()
1259 *nh = t.fence.getNativeHandle() == nullptr ? in flatten()
1260 nullptr : native_handle_clone(t.fence); in flatten()
1265 status = flatten(t.surfaceDamage, buffer, size); in flatten()
1290 HGraphicBufferProducer::QueueBufferInput* t, native_handle_t** nh, in unflatten() argument
1292 if (size < minFlattenedSize(*t)) { in unflatten()
1296 FlattenableUtils::read(buffer, size, t->timestamp); in unflatten()
1299 t->isAutoTimestamp = static_cast<int32_t>(lIsAutoTimestamp); in unflatten()
1302 t->dataSpace = static_cast<Dataspace>(lDataSpace); in unflatten()
1305 t->crop = Rect{ in unflatten()
1312 t->scalingMode = static_cast<int32_t>(lScalingMode); in unflatten()
1313 FlattenableUtils::read(buffer, size, t->transform); in unflatten()
1314 FlattenableUtils::read(buffer, size, t->stickyTransform); in unflatten()
1315 FlattenableUtils::read(buffer, size, t->getFrameTimestamps); in unflatten()
1317 status_t status = unflattenFence(&(t->fence), nh, in unflatten()
1323 return unflatten(&(t->surfaceDamage), buffer, size); in unflatten()
1338 HGraphicBufferProducer::QueueBufferInput const& t) { in convertTo() argument
1340 size_t const baseSize = getFlattenedSize(t); in convertTo()
1347 size_t const baseNumFds = getFdCount(t); in convertTo()
1359 if (flatten(t, &nh, buffer, size, fds, numFds) != NO_ERROR) { in convertTo()
1398 bool wrapAs(HGraphicBufferProducer::QueueBufferOutput* t, in wrapAs() argument
1401 if (!wrapAs(&(t->frameTimestamps), nh, l.frameTimestamps)) { in wrapAs()
1404 t->width = l.width; in wrapAs()
1405 t->height = l.height; in wrapAs()
1406 t->transformHint = l.transformHint; in wrapAs()
1407 t->numPendingBuffers = l.numPendingBuffers; in wrapAs()
1408 t->nextFrameNumber = l.nextFrameNumber; in wrapAs()
1409 t->bufferReplaced = l.bufferReplaced; in wrapAs()
1426 HGraphicBufferProducer::QueueBufferOutput const& t) { in convertTo() argument
1427 if (!convertTo(&(l->frameTimestamps), t.frameTimestamps)) { in convertTo()
1430 l->width = t.width; in convertTo()
1431 l->height = t.height; in convertTo()
1432 l->transformHint = t.transformHint; in convertTo()
1433 l->numPendingBuffers = t.numPendingBuffers; in convertTo()
1434 l->nextFrameNumber = t.nextFrameNumber; in convertTo()
1435 l->bufferReplaced = t.bufferReplaced; in convertTo()
1465 HGraphicBufferProducer::DisconnectMode t) { in toGuiDisconnectMode() argument
1466 switch (t) { in toGuiDisconnectMode()