Lines Matching refs:t

102 inline status_t toStatusT(Return<Status> const& t) {  in toStatusT()  argument
103 if (t.isOk()) { in toStatusT()
104 return static_cast<status_t>(static_cast<Status>(t)); in toStatusT()
105 } else if (t.isDeadObject()) { in toStatusT()
118 inline status_t toStatusT(Return<void> const& t) { in toStatusT() argument
119 return t.isOk() ? OK : (t.isDeadObject() ? DEAD_OBJECT : UNKNOWN_ERROR); in toStatusT()
129 inline void wrapAs(AnwBuffer* t, GraphicBuffer const& l) { in wrapAs() argument
130 t->attr.width = l.getWidth(); in wrapAs()
131 t->attr.height = l.getHeight(); in wrapAs()
132 t->attr.stride = l.getStride(); in wrapAs()
133 t->attr.format = static_cast<PixelFormat>(l.getPixelFormat()); in wrapAs()
134 t->attr.layerCount = l.getLayerCount(); in wrapAs()
135 t->attr.usage = uint32_t(l.getUsage()); // FIXME: need 64-bits usage version in wrapAs()
136 t->attr.id = l.getId(); in wrapAs()
137 t->attr.generationNumber = l.getGenerationNumber(); in wrapAs()
138 t->nativeHandle = hidl_handle(l.handle); in wrapAs()
151 inline bool convertTo(GraphicBuffer* l, AnwBuffer const& t) { in convertTo() argument
152 native_handle_t* handle = t.nativeHandle == nullptr ? in convertTo()
153 nullptr : native_handle_clone(t.nativeHandle); in convertTo()
163 ints[1] = static_cast<int32_t>(t.attr.width); in convertTo()
164 ints[2] = static_cast<int32_t>(t.attr.height); in convertTo()
165 ints[3] = static_cast<int32_t>(t.attr.stride); in convertTo()
166 ints[4] = static_cast<int32_t>(t.attr.format); in convertTo()
167 ints[5] = static_cast<int32_t>(t.attr.layerCount); in convertTo()
168 ints[6] = static_cast<int32_t>(t.attr.usage); in convertTo()
169 ints[7] = static_cast<int32_t>(t.attr.id >> 32); in convertTo()
170 ints[8] = static_cast<int32_t>(t.attr.id & 0xFFFFFFFF); in convertTo()
171 ints[9] = static_cast<int32_t>(t.attr.generationNumber); in convertTo()
308 inline bool wrapAs(hidl_handle* t, native_handle_t** nh, Fence const& l) { in wrapAs() argument
335 if (unflattenFence(t, nh, constBuffer, size, constFds, numFds) in wrapAs()
353 inline bool convertTo(Fence* l, hidl_handle const& t) { in convertTo() argument
354 int fd = native_handle_read_fd(t); in convertTo()
369 size_t const baseSize = getFenceFlattenedSize(t); in convertTo()
377 size_t const baseNumFds = getFenceFdCount(t); in convertTo()
416 inline status_t unflatten(HRegion* t, void const*& buffer, size_t& size) { in unflatten() argument
430 t->resize(numRects); in unflatten()
438 (*t)[r] = HRect{ in unflatten()
486 HGraphicBufferProducer::QueueBufferInput* t, native_handle_t** nh, in unflatten() argument
488 if (size < minFlattenedSize(*t)) { in unflatten()
492 FlattenableUtils::read(buffer, size, t->timestamp); in unflatten()
495 t->isAutoTimestamp = static_cast<int32_t>(lIsAutoTimestamp); in unflatten()
498 t->dataSpace = static_cast<Dataspace>(lDataSpace); in unflatten()
501 t->crop = HRect{ in unflatten()
508 t->scalingMode = static_cast<int32_t>(lScalingMode); in unflatten()
509 FlattenableUtils::read(buffer, size, t->transform); in unflatten()
510 FlattenableUtils::read(buffer, size, t->stickyTransform); in unflatten()
511 FlattenableUtils::read(buffer, size, t->getFrameTimestamps); in unflatten()
513 status_t status = unflattenFence(&(t->fence), nh, in unflatten()
518 return unflatten(&(t->surfaceDamage), buffer, size); in unflatten()
536 HGraphicBufferProducer::QueueBufferInput* t, in wrapAs() argument
566 if (unflatten(t, nh, constBuffer, size, constFds, numFds) != NO_ERROR) { in wrapAs()
583 HGraphicBufferProducer::FenceTimeSnapshot const& t) { in getFlattenedSize() argument
584 constexpr size_t min = sizeof(t.state); in getFlattenedSize()
585 switch (t.state) { in getFlattenedSize()
589 return min + getFenceFlattenedSize(t.fence); in getFlattenedSize()
605 HGraphicBufferProducer::FenceTimeSnapshot const& t) { in getFdCount() argument
606 return t.state == in getFdCount()
608 getFenceFdCount(t.fence) : 0; in getFdCount()
625 inline status_t flatten(HGraphicBufferProducer::FenceTimeSnapshot const& t, in flatten() argument
628 if (size < getFlattenedSize(t)) { in flatten()
633 switch (t.state) { in flatten()
641 *nh = t.fence.getNativeHandle() == nullptr ? in flatten()
642 nullptr : native_handle_clone(t.fence); in flatten()
647 FlattenableUtils::write(buffer, size, t.signalTimeNs); in flatten()
684 HGraphicBufferProducer::FrameEventsDelta const& t) { in getFlattenedSize() argument
685 return minFlattenedSize(t) + in getFlattenedSize()
686 getFlattenedSize(t.gpuCompositionDoneFence) + in getFlattenedSize()
687 getFlattenedSize(t.displayPresentFence) + in getFlattenedSize()
688 getFlattenedSize(t.displayRetireFence) + in getFlattenedSize()
689 getFlattenedSize(t.releaseFence); in getFlattenedSize()
700 HGraphicBufferProducer::FrameEventsDelta const& t) { in getFdCount() argument
701 return getFdCount(t.gpuCompositionDoneFence) + in getFdCount()
702 getFdCount(t.displayPresentFence) + in getFdCount()
703 getFdCount(t.displayRetireFence) + in getFdCount()
704 getFdCount(t.releaseFence); in getFdCount()
724 inline status_t flatten(HGraphicBufferProducer::FrameEventsDelta const& t, in flatten() argument
728 if (t.index >= static_cast<uint32_t>(FrameEventHistory::MAX_FRAME_HISTORY) in flatten()
729 || t.index > std::numeric_limits<uint8_t>::max()) { in flatten()
733 FlattenableUtils::write(buffer, size, t.frameNumber); in flatten()
736 FlattenableUtils::write(buffer, size, static_cast<uint8_t>(t.index)); in flatten()
738 buffer, size, static_cast<uint8_t>(t.addPostCompositeCalled)); in flatten()
740 buffer, size, static_cast<uint8_t>(t.addRetireCalled)); in flatten()
742 buffer, size, static_cast<uint8_t>(t.addReleaseCalled)); in flatten()
744 FlattenableUtils::write(buffer, size, t.postedTimeNs); in flatten()
745 FlattenableUtils::write(buffer, size, t.requestedPresentTimeNs); in flatten()
746 FlattenableUtils::write(buffer, size, t.latchTimeNs); in flatten()
747 FlattenableUtils::write(buffer, size, t.firstRefreshStartTimeNs); in flatten()
748 FlattenableUtils::write(buffer, size, t.lastRefreshStartTimeNs); in flatten()
749 FlattenableUtils::write(buffer, size, t.dequeueReadyTime); in flatten()
753 tSnapshot[0] = &t.gpuCompositionDoneFence; in flatten()
754 tSnapshot[1] = &t.displayPresentFence; in flatten()
755 tSnapshot[2] = &t.displayRetireFence; in flatten()
756 tSnapshot[3] = &t.releaseFence; in flatten()
786 HGraphicBufferProducer::FrameEventHistoryDelta const& t) { in getFlattenedSize() argument
788 sizeof(t.compositorTiming); in getFlattenedSize()
789 for (size_t i = 0; i < t.deltas.size(); ++i) { in getFlattenedSize()
790 size += getFlattenedSize(t.deltas[i]); in getFlattenedSize()
803 HGraphicBufferProducer::FrameEventHistoryDelta const& t) { in getFdCount() argument
805 for (size_t i = 0; i < t.deltas.size(); ++i) { in getFdCount()
806 numFds += getFdCount(t.deltas[i]); in getFdCount()
829 HGraphicBufferProducer::FrameEventHistoryDelta const& t, in flatten() argument
832 if (t.deltas.size() > ::android::FrameEventHistory::MAX_FRAME_HISTORY) { in flatten()
835 if (size < getFlattenedSize(t)) { in flatten()
839 FlattenableUtils::write(buffer, size, t.compositorTiming); in flatten()
841 FlattenableUtils::write(buffer, size, static_cast<uint32_t>(t.deltas.size())); in flatten()
842 nh->resize(t.deltas.size()); in flatten()
843 for (size_t deltaIndex = 0; deltaIndex < t.deltas.size(); ++deltaIndex) { in flatten()
845 t.deltas[deltaIndex], &((*nh)[deltaIndex]), in flatten()
874 HGraphicBufferProducer::FrameEventHistoryDelta const& t) { in convertTo() argument
876 size_t const baseSize = getFlattenedSize(t); in convertTo()
883 size_t const baseNumFds = getFdCount(t); in convertTo()
895 if (flatten(t, &nhAA, buffer, size, fds, numFds) != NO_ERROR) { in convertTo()
941 HGraphicBufferProducer::QueueBufferOutput const& t) { in convertTo() argument
942 if (!convertTo(&(l->frameTimestamps), t.frameTimestamps)) { in convertTo()
945 l->width = t.width; in convertTo()
946 l->height = t.height; in convertTo()
947 l->transformHint = t.transformHint; in convertTo()
948 l->numPendingBuffers = t.numPendingBuffers; in convertTo()
949 l->nextFrameNumber = t.nextFrameNumber; in convertTo()
950 l->bufferReplaced = t.bufferReplaced; in convertTo()