Lines Matching refs:pContext

267     ArchiveFontBase::ConstructContext*      pContext,  in RequestData()  argument
272 pContext->streamOffset += pStream->GetOffset(); in RequestData()
273 bool bSuccess = pStream->RequestData(pContext, size); in RequestData()
279 ArchiveFontBase::ConstructContext* pContext, in ConstructOpDispatch() argument
283 if (! pContext->HasMoreBlock()) in ConstructOpDispatch()
291 return RequestData(pContext, pStream, requireSize); in ConstructOpDispatch()
294 pStream->CopyTo(&pContext->header, sizeof(pContext->header)); in ConstructOpDispatch()
296 switch (pContext->header.kind) in ConstructOpDispatch()
298 case BINBLOCK_SIG_GLGR: pContext->op = ConstructContext::ANALYZE_GLGR; break; in ConstructOpDispatch()
299 case BINBLOCK_SIG_FINF: pContext->op = ConstructContext::ANALYZE_FINF; break; in ConstructOpDispatch()
300 case BINBLOCK_SIG_CMAP: pContext->op = ConstructContext::ANALYZE_CMAP; break; in ConstructOpDispatch()
301 case BINBLOCK_SIG_CWDH: pContext->op = ConstructContext::ANALYZE_CWDH; break; in ConstructOpDispatch()
302 case BINBLOCK_SIG_TGLP: pContext->op = ConstructContext::ANALYZE_TGLP; break; in ConstructOpDispatch()
305 (pContext->header.kind >> 24) & 0xFF, in ConstructOpDispatch()
306 (pContext->header.kind >> 16) & 0xFF, in ConstructOpDispatch()
307 (pContext->header.kind >> 8) & 0xFF, in ConstructOpDispatch()
308 (pContext->header.kind >> 0) & 0xFF ); in ConstructOpDispatch()
309 pContext->op = ConstructContext::FATAL_ERROR; in ConstructOpDispatch()
314 pContext->NextBlock(); in ConstructOpDispatch()
317 pContext->Align(4); in ConstructOpDispatch()
324 ArchiveFontBase::ConstructContext* pContext, in ConstructOpAnalyzeFileHeader() argument
332 return RequestData(pContext, pStream, requireSize); in ConstructOpAnalyzeFileHeader()
334 if (pContext->GetRemain() < requireSize) in ConstructOpAnalyzeFileHeader()
343 pStream->CopyTo(pContext->GetCurrentPtr<void*>(), requireSize); in ConstructOpAnalyzeFileHeader()
344 pContext->op = ConstructContext::DISPATCH; in ConstructOpAnalyzeFileHeader()
351 ArchiveFontBase::ConstructContext* pContext, in ConstructOpAnalyzeGLGR() argument
360 … const ut::BinaryFileHeader& header = *pContext->GetCurrentPtr<const ut::BinaryFileHeader*>(); in ConstructOpAnalyzeGLGR()
361 const u32 requireSize = pContext->header.size - sizeof(ut::BinaryBlockHeader); in ConstructOpAnalyzeGLGR()
372 return RequestData(pContext, pStream, requireSize); in ConstructOpAnalyzeGLGR()
375 if (pContext->GetRemain() < requireSize) in ConstructOpAnalyzeGLGR()
384 const u32 infoSize = sizeof(ut::BinaryFileHeader) + pContext->header.size; in ConstructOpAnalyzeGLGR()
386 pTempFileHead = pContext->GetCurrentPtr<u8*>(); in ConstructOpAnalyzeGLGR()
389 pTempGLGRTail = blockHeaderPos + pContext->header.size; in ConstructOpAnalyzeGLGR()
390 std::memcpy(blockHeaderPos, &pContext->header, sizeof(ut::BinaryBlockHeader)); in ConstructOpAnalyzeGLGR()
416 …math::RoundDown(reinterpret_cast<uptr>(pTempFileHead + pContext->GetRemain() - sizeAdjustTable), 2… in ConstructOpAnalyzeGLGR()
417 if (pContext->GetRemain() < (pTempGLGRTail - pTempFileHead) + sizeAdjustTable) in ConstructOpAnalyzeGLGR()
436 if ( IsNullString(pContext->GetGlyphGroups()) in ConstructOpAnalyzeGLGR()
437 || IncludeName(pContext->GetGlyphGroups(), setName) in ConstructOpAnalyzeGLGR()
472 u16* pTrueAdjustArray = pContext->GetCurrentPtr<u16*>(); in ConstructOpAnalyzeGLGR()
473 pContext->Advance(sizeAdjustTable); in ConstructOpAnalyzeGLGR()
478 pContext->SetGLGR( pTrueAdjustArray, in ConstructOpAnalyzeGLGR()
483 pContext->op = ConstructContext::DISPATCH; in ConstructOpAnalyzeGLGR()
491 ArchiveFontBase::ConstructContext* pContext, in ConstructOpAnalyzeFINF() argument
496 u32 copySize = pContext->header.size - sizeof(ut::BinaryBlockHeader); in ConstructOpAnalyzeFINF()
498 if (pContext->GetRemain() < copySize) in ConstructOpAnalyzeFINF()
506 pContext->pFINF = pContext->GetCurrentPtr<FontInformation*>(); in ConstructOpAnalyzeFINF()
507 pContext->SetupCopyTask(copySize); in ConstructOpAnalyzeFINF()
513 ArchiveFontBase::ConstructContext* pContext, in ConstructOpAnalyzeCMAP() argument
518 FontCodeMap* pDstCMAP = pContext->GetCurrentPtr<FontCodeMap*>(); in ConstructOpAnalyzeCMAP()
520 if (pContext->pPrevCMAP != NULL) in ConstructOpAnalyzeCMAP()
522 pContext->pPrevCMAP->pNext = pDstCMAP; in ConstructOpAnalyzeCMAP()
526 NN_POINTER_ASSERT( pContext->pFINF ); in ConstructOpAnalyzeCMAP()
527 pContext->pFINF->pMap = pDstCMAP; in ConstructOpAnalyzeCMAP()
529 pContext->pPrevCMAP = pDstCMAP; in ConstructOpAnalyzeCMAP()
532 u32 copySize = pContext->header.size - sizeof(ut::BinaryBlockHeader); in ConstructOpAnalyzeCMAP()
534 if (pContext->GetRemain() < copySize) in ConstructOpAnalyzeCMAP()
542 pContext->SetupCopyTask(copySize); in ConstructOpAnalyzeCMAP()
548 ArchiveFontBase::ConstructContext* pContext, in ConstructOpAnalyzeCWDH() argument
553 FontWidth* pDstCWDH = pContext->GetCurrentPtr<FontWidth*>(); in ConstructOpAnalyzeCWDH()
555 if (pContext->pPrevCWDH != NULL) in ConstructOpAnalyzeCWDH()
557 pContext->pPrevCWDH->pNext = pDstCWDH; in ConstructOpAnalyzeCWDH()
561 NN_POINTER_ASSERT(pContext->pFINF); in ConstructOpAnalyzeCWDH()
562 pContext->pFINF->pWidth = pDstCWDH; in ConstructOpAnalyzeCWDH()
564 pContext->pPrevCWDH = pDstCWDH; in ConstructOpAnalyzeCWDH()
567 u32 copySize = pContext->header.size - sizeof(ut::BinaryBlockHeader); in ConstructOpAnalyzeCWDH()
569 if (pContext->GetRemain() < copySize) in ConstructOpAnalyzeCWDH()
577 pContext->SetupCopyTask(copySize); in ConstructOpAnalyzeCWDH()
583 ArchiveFontBase::ConstructContext* pContext, in ConstructOpAnalyzeTGLP() argument
592 return RequestData(pContext, pStream, requireSize); in ConstructOpAnalyzeTGLP()
594 if (pContext->GetRemain() < copySize) in ConstructOpAnalyzeTGLP()
600 NN_POINTER_ASSERT(pContext->pFINF); in ConstructOpAnalyzeTGLP()
603 pContext->pFINF->pGlyph = pContext->GetCurrentPtr<FontTextureGlyph*>(); in ConstructOpAnalyzeTGLP()
606 pStream->CopyTo(pContext, sizeof(FontTextureGlyph)); in ConstructOpAnalyzeTGLP()
609 …const bool bSheetCompressed = ((pContext->pFINF->pGlyph->sheetFormat & FONT_SHEET_FORMAT_COMPRESSE… in ConstructOpAnalyzeTGLP()
610 pContext->pFINF->pGlyph->sheetFormat &= FONT_SHEET_FORMAT_MASK; in ConstructOpAnalyzeTGLP()
615 for (int i = 0; i < pContext->GetNumSheets(); ++i) in ConstructOpAnalyzeTGLP()
617 if (pContext->IsRequireSheet(i)) in ConstructOpAnalyzeTGLP()
622 pContext->pFINF->pGlyph->sheetNum = numLoadSheet; in ConstructOpAnalyzeTGLP()
626 u32 sheetOffset = reinterpret_cast<u32>(pContext->pFINF->pGlyph->sheetImage); in ConstructOpAnalyzeTGLP()
629 pContext->Align(GlyphDataAlignment); in ConstructOpAnalyzeTGLP()
630 pContext->pFINF->pGlyph->sheetImage = pContext->GetCurrentPtr<u8*>(); in ConstructOpAnalyzeTGLP()
638 u32 streamOffset = pContext->streamOffset + pStream->GetOffset(); in ConstructOpAnalyzeTGLP()
640 pContext->SetupSkipTask(skipSize, nextOp); in ConstructOpAnalyzeTGLP()
647 ArchiveFontBase::ConstructContext* pContext, in ConstructOpPrepairCopySheet() argument
652 if (! pContext->HasMoreSheet()) in ConstructOpPrepairCopySheet()
654 pContext->op = ConstructContext::DISPATCH; in ConstructOpPrepairCopySheet()
658 const u32 copySize = pContext->pFINF->pGlyph->sheetSize; in ConstructOpPrepairCopySheet()
661 if (pContext->IsRequireSheet()) in ConstructOpPrepairCopySheet()
664 if (pContext->GetRemain() < copySize) in ConstructOpPrepairCopySheet()
671 pContext->SetupCopyTask(copySize, ConstructContext::PREPAIR_COPY_SHEET); in ConstructOpPrepairCopySheet()
676 pContext->SetupSkipTask(copySize, ConstructContext::PREPAIR_COPY_SHEET); in ConstructOpPrepairCopySheet()
680 pContext->NextSheet(); in ConstructOpPrepairCopySheet()
687 ArchiveFontBase::ConstructContext* pContext, in ConstructOpPrepairExpandSheet() argument
692 if (! pContext->HasMoreSheet()) in ConstructOpPrepairExpandSheet()
694 pContext->op = ConstructContext::DISPATCH; in ConstructOpPrepairExpandSheet()
705 return RequestData(pContext, pStream, requireSize); in ConstructOpPrepairExpandSheet()
717 if (pContext->IsRequireSheet()) in ConstructOpPrepairExpandSheet()
721 if (pContext->GetRemain() < srcSize + sizeof(*pContext->GetUncompContext())) in ConstructOpPrepairExpandSheet()
728 nn::cx::InitUncompContextHuffman( pContext->GetUncompContext(), in ConstructOpPrepairExpandSheet()
729 pContext->GetCurrentPtr<u8*>()); in ConstructOpPrepairExpandSheet()
730 pContext->SetupExtendTask(srcSize, ConstructContext::PREPAIR_EXPAND_SHEET); in ConstructOpPrepairExpandSheet()
734 pContext->Advance(dstSize); in ConstructOpPrepairExpandSheet()
739 pContext->SetupSkipTask(srcSize, ConstructContext::PREPAIR_EXPAND_SHEET); in ConstructOpPrepairExpandSheet()
743 pContext->NextSheet(); in ConstructOpPrepairExpandSheet()
750 ArchiveFontBase::ConstructContext* pContext, in ConstructOpCopy() argument
754 const u32 requireSize = pStream->ManagedCopy(pContext); in ConstructOpCopy()
759 pContext->EndTask(); in ConstructOpCopy()
764 return RequestData(pContext, pStream, requireSize); in ConstructOpCopy()
772 ArchiveFontBase::ConstructContext* pContext, in ConstructOpSkip() argument
776 u32 skipSize = math::Min(pContext->TaskRemain(), pStream->GetRemain()); in ConstructOpSkip()
779 pContext->TaskProceed(skipSize); in ConstructOpSkip()
781 if (pContext->TaskRemain() == 0) in ConstructOpSkip()
784 pContext->EndTask(); in ConstructOpSkip()
789 return RequestData(pContext, pStream, pContext->TaskRemain()); in ConstructOpSkip()
797 ArchiveFontBase::ConstructContext* pContext, in ConstructOpExpand() argument
802 u32 extendSize = math::Min(pContext->TaskRemain(), pStream->GetRemain()); in ConstructOpExpand()
805 nn::cx::ReadUncompHuffman( pContext->GetUncompContext(), in ConstructOpExpand()
810 pContext->TaskProceed(extendSize); in ConstructOpExpand()
812 if (pContext->TaskRemain() == 0) in ConstructOpExpand()
816 pContext->EndTask(); in ConstructOpExpand()
822 return RequestData(pContext, pStream, pContext->TaskRemain()); in ConstructOpExpand()
830 ArchiveFontBase::ConstructContext* pContext, in ConstructOpFatalError() argument
835 pContext->op = ConstructContext::FATAL_ERROR; in ConstructOpFatalError()
893 ArchiveFontBase::ConstructContext* pContext, in CopyTo() argument
897 NN_ASSERT(pContext->GetRemain() >= size); in CopyTo()
899 CopyTo(pContext->GetCurrentPtr<void*>(), size); in CopyTo()
900 pContext->Advance(size); in CopyTo()
956 ArchiveFontBase::CachedStreamReader::ManagedCopy(ArchiveFontBase::ConstructContext* pContext) in ManagedCopy() argument
959 u32 copySize = math::Min(static_cast<u32>(mStreamEnd - mStreamPos), pContext->TaskRemain()); in ManagedCopy()
961 std::memcpy(pContext->GetCurrentPtr<void*>(), mStreamPos, copySize); in ManagedCopy()
963 pContext->Advance(copySize); in ManagedCopy()
964 pContext->TaskProceed(copySize); in ManagedCopy()
966 return pContext->TaskRemain(); in ManagedCopy()
980 ArchiveFontBase::ConstructContext* pContext, in RequestData() argument
998 if (pContext->GetRemain() < size * 2) in RequestData()
1004 u8* tempBuf = pContext->GetCurrentPtr<u8*>() + size; in RequestData()