Lines Matching refs:pContext
265 ArchiveFontBase::ConstructContext* pContext, in RequestData() argument
270 pContext->streamOffset += pStream->GetOffset(); in RequestData()
271 bool bSuccess = pStream->RequestData(pContext, size); in RequestData()
277 ArchiveFontBase::ConstructContext* pContext, in ConstructOpDispatch() argument
281 if (! pContext->HasMoreBlock()) in ConstructOpDispatch()
289 return RequestData(pContext, pStream, requireSize); in ConstructOpDispatch()
292 pStream->CopyTo(&pContext->header, sizeof(pContext->header)); in ConstructOpDispatch()
294 switch (pContext->header.kind) in ConstructOpDispatch()
296 case BINBLOCK_SIG_GLGR: pContext->op = ConstructContext::ANALYZE_GLGR; break; in ConstructOpDispatch()
297 case BINBLOCK_SIG_FINF: pContext->op = ConstructContext::ANALYZE_FINF; break; in ConstructOpDispatch()
298 case BINBLOCK_SIG_CMAP: pContext->op = ConstructContext::ANALYZE_CMAP; break; in ConstructOpDispatch()
299 case BINBLOCK_SIG_CWDH: pContext->op = ConstructContext::ANALYZE_CWDH; break; in ConstructOpDispatch()
300 case BINBLOCK_SIG_TGLP: pContext->op = ConstructContext::ANALYZE_TGLP; break; in ConstructOpDispatch()
303 (pContext->header.kind >> 24) & 0xFF, in ConstructOpDispatch()
304 (pContext->header.kind >> 16) & 0xFF, in ConstructOpDispatch()
305 (pContext->header.kind >> 8) & 0xFF, in ConstructOpDispatch()
306 (pContext->header.kind >> 0) & 0xFF ); in ConstructOpDispatch()
307 pContext->op = ConstructContext::FATAL_ERROR; in ConstructOpDispatch()
312 pContext->NextBlock(); in ConstructOpDispatch()
315 pContext->Align(4); in ConstructOpDispatch()
322 ArchiveFontBase::ConstructContext* pContext, in ConstructOpAnalyzeFileHeader() argument
330 return RequestData(pContext, pStream, requireSize); in ConstructOpAnalyzeFileHeader()
332 if (pContext->GetRemain() < requireSize) in ConstructOpAnalyzeFileHeader()
341 pStream->CopyTo(pContext->GetCurrentPtr<void*>(), requireSize); in ConstructOpAnalyzeFileHeader()
342 pContext->op = ConstructContext::DISPATCH; in ConstructOpAnalyzeFileHeader()
349 ArchiveFontBase::ConstructContext* pContext, in ConstructOpAnalyzeGLGR() argument
358 … const ut::BinaryFileHeader& header = *pContext->GetCurrentPtr<const ut::BinaryFileHeader*>(); in ConstructOpAnalyzeGLGR()
359 const u32 requireSize = pContext->header.size - sizeof(ut::BinaryBlockHeader); in ConstructOpAnalyzeGLGR()
370 return RequestData(pContext, pStream, requireSize); in ConstructOpAnalyzeGLGR()
373 if (pContext->GetRemain() < requireSize) in ConstructOpAnalyzeGLGR()
382 const u32 infoSize = sizeof(ut::BinaryFileHeader) + pContext->header.size; in ConstructOpAnalyzeGLGR()
384 pTempFileHead = pContext->GetCurrentPtr<u8*>(); in ConstructOpAnalyzeGLGR()
387 pTempGLGRTail = blockHeaderPos + pContext->header.size; in ConstructOpAnalyzeGLGR()
388 std::memcpy(blockHeaderPos, &pContext->header, sizeof(ut::BinaryBlockHeader)); in ConstructOpAnalyzeGLGR()
414 …math::RoundDown(reinterpret_cast<uptr>(pTempFileHead + pContext->GetRemain() - sizeAdjustTable), 2… in ConstructOpAnalyzeGLGR()
415 if (pContext->GetRemain() < (pTempGLGRTail - pTempFileHead) + sizeAdjustTable) in ConstructOpAnalyzeGLGR()
434 if ( IsNullString(pContext->GetGlyphGroups()) in ConstructOpAnalyzeGLGR()
435 || IncludeName(pContext->GetGlyphGroups(), setName) in ConstructOpAnalyzeGLGR()
470 u16* pTrueAdjustArray = pContext->GetCurrentPtr<u16*>(); in ConstructOpAnalyzeGLGR()
471 pContext->Advance(sizeAdjustTable); in ConstructOpAnalyzeGLGR()
476 pContext->SetGLGR( pTrueAdjustArray, in ConstructOpAnalyzeGLGR()
481 pContext->op = ConstructContext::DISPATCH; in ConstructOpAnalyzeGLGR()
489 ArchiveFontBase::ConstructContext* pContext, in ConstructOpAnalyzeFINF() argument
494 u32 copySize = pContext->header.size - sizeof(ut::BinaryBlockHeader); in ConstructOpAnalyzeFINF()
496 if (pContext->GetRemain() < copySize) in ConstructOpAnalyzeFINF()
504 pContext->pFINF = pContext->GetCurrentPtr<FontInformation*>(); in ConstructOpAnalyzeFINF()
505 pContext->SetupCopyTask(copySize); in ConstructOpAnalyzeFINF()
511 ArchiveFontBase::ConstructContext* pContext, in ConstructOpAnalyzeCMAP() argument
516 FontCodeMap* pDstCMAP = pContext->GetCurrentPtr<FontCodeMap*>(); in ConstructOpAnalyzeCMAP()
518 if (pContext->pPrevCMAP != NULL) in ConstructOpAnalyzeCMAP()
520 pContext->pPrevCMAP->pNext = pDstCMAP; in ConstructOpAnalyzeCMAP()
524 NN_POINTER_ASSERT( pContext->pFINF ); in ConstructOpAnalyzeCMAP()
525 pContext->pFINF->pMap = pDstCMAP; in ConstructOpAnalyzeCMAP()
527 pContext->pPrevCMAP = pDstCMAP; in ConstructOpAnalyzeCMAP()
530 u32 copySize = pContext->header.size - sizeof(ut::BinaryBlockHeader); in ConstructOpAnalyzeCMAP()
532 if (pContext->GetRemain() < copySize) in ConstructOpAnalyzeCMAP()
540 pContext->SetupCopyTask(copySize); in ConstructOpAnalyzeCMAP()
546 ArchiveFontBase::ConstructContext* pContext, in ConstructOpAnalyzeCWDH() argument
551 FontWidth* pDstCWDH = pContext->GetCurrentPtr<FontWidth*>(); in ConstructOpAnalyzeCWDH()
553 if (pContext->pPrevCWDH != NULL) in ConstructOpAnalyzeCWDH()
555 pContext->pPrevCWDH->pNext = pDstCWDH; in ConstructOpAnalyzeCWDH()
559 NN_POINTER_ASSERT(pContext->pFINF); in ConstructOpAnalyzeCWDH()
560 pContext->pFINF->pWidth = pDstCWDH; in ConstructOpAnalyzeCWDH()
562 pContext->pPrevCWDH = pDstCWDH; in ConstructOpAnalyzeCWDH()
565 u32 copySize = pContext->header.size - sizeof(ut::BinaryBlockHeader); in ConstructOpAnalyzeCWDH()
567 if (pContext->GetRemain() < copySize) in ConstructOpAnalyzeCWDH()
575 pContext->SetupCopyTask(copySize); in ConstructOpAnalyzeCWDH()
581 ArchiveFontBase::ConstructContext* pContext, in ConstructOpAnalyzeTGLP() argument
590 return RequestData(pContext, pStream, requireSize); in ConstructOpAnalyzeTGLP()
592 if (pContext->GetRemain() < copySize) in ConstructOpAnalyzeTGLP()
598 NN_POINTER_ASSERT(pContext->pFINF); in ConstructOpAnalyzeTGLP()
601 pContext->pFINF->pGlyph = pContext->GetCurrentPtr<FontTextureGlyph*>(); in ConstructOpAnalyzeTGLP()
604 pStream->CopyTo(pContext, sizeof(FontTextureGlyph)); in ConstructOpAnalyzeTGLP()
607 …const bool bSheetCompressed = ((pContext->pFINF->pGlyph->sheetFormat & FONT_SHEET_FORMAT_COMPRESSE… in ConstructOpAnalyzeTGLP()
608 pContext->pFINF->pGlyph->sheetFormat &= FONT_SHEET_FORMAT_MASK; in ConstructOpAnalyzeTGLP()
613 for (int i = 0; i < pContext->GetNumSheets(); ++i) in ConstructOpAnalyzeTGLP()
615 if (pContext->IsRequireSheet(i)) in ConstructOpAnalyzeTGLP()
620 pContext->pFINF->pGlyph->sheetNum = numLoadSheet; in ConstructOpAnalyzeTGLP()
624 u32 sheetOffset = reinterpret_cast<u32>(pContext->pFINF->pGlyph->sheetImage); in ConstructOpAnalyzeTGLP()
627 pContext->Align(GlyphDataAlignment); in ConstructOpAnalyzeTGLP()
628 pContext->pFINF->pGlyph->sheetImage = pContext->GetCurrentPtr<u8*>(); in ConstructOpAnalyzeTGLP()
636 u32 streamOffset = pContext->streamOffset + pStream->GetOffset(); in ConstructOpAnalyzeTGLP()
638 pContext->SetupSkipTask(skipSize, nextOp); in ConstructOpAnalyzeTGLP()
645 ArchiveFontBase::ConstructContext* pContext, in ConstructOpPrepairCopySheet() argument
650 if (! pContext->HasMoreSheet()) in ConstructOpPrepairCopySheet()
652 pContext->op = ConstructContext::DISPATCH; in ConstructOpPrepairCopySheet()
656 const u32 copySize = pContext->pFINF->pGlyph->sheetSize; in ConstructOpPrepairCopySheet()
659 if (pContext->IsRequireSheet()) in ConstructOpPrepairCopySheet()
662 if (pContext->GetRemain() < copySize) in ConstructOpPrepairCopySheet()
669 pContext->SetupCopyTask(copySize, ConstructContext::PREPAIR_COPY_SHEET); in ConstructOpPrepairCopySheet()
674 pContext->SetupSkipTask(copySize, ConstructContext::PREPAIR_COPY_SHEET); in ConstructOpPrepairCopySheet()
678 pContext->NextSheet(); in ConstructOpPrepairCopySheet()
685 ArchiveFontBase::ConstructContext* pContext, in ConstructOpPrepairExpandSheet() argument
690 if (! pContext->HasMoreSheet()) in ConstructOpPrepairExpandSheet()
692 pContext->op = ConstructContext::DISPATCH; in ConstructOpPrepairExpandSheet()
703 return RequestData(pContext, pStream, requireSize); in ConstructOpPrepairExpandSheet()
715 if (pContext->IsRequireSheet()) in ConstructOpPrepairExpandSheet()
719 if (pContext->GetRemain() < srcSize + sizeof(*pContext->GetUncompContext())) in ConstructOpPrepairExpandSheet()
726 nn::cx::InitUncompContextHuffman( pContext->GetUncompContext(), in ConstructOpPrepairExpandSheet()
727 pContext->GetCurrentPtr<u8*>()); in ConstructOpPrepairExpandSheet()
728 pContext->SetupExtendTask(srcSize, ConstructContext::PREPAIR_EXPAND_SHEET); in ConstructOpPrepairExpandSheet()
732 pContext->Advance(dstSize); in ConstructOpPrepairExpandSheet()
737 pContext->SetupSkipTask(srcSize, ConstructContext::PREPAIR_EXPAND_SHEET); in ConstructOpPrepairExpandSheet()
741 pContext->NextSheet(); in ConstructOpPrepairExpandSheet()
748 ArchiveFontBase::ConstructContext* pContext, in ConstructOpCopy() argument
752 const u32 requireSize = pStream->ManagedCopy(pContext); in ConstructOpCopy()
757 pContext->EndTask(); in ConstructOpCopy()
762 return RequestData(pContext, pStream, requireSize); in ConstructOpCopy()
770 ArchiveFontBase::ConstructContext* pContext, in ConstructOpSkip() argument
774 u32 skipSize = math::Min(pContext->TaskRemain(), pStream->GetRemain()); in ConstructOpSkip()
777 pContext->TaskProceed(skipSize); in ConstructOpSkip()
779 if (pContext->TaskRemain() == 0) in ConstructOpSkip()
782 pContext->EndTask(); in ConstructOpSkip()
787 return RequestData(pContext, pStream, pContext->TaskRemain()); in ConstructOpSkip()
795 ArchiveFontBase::ConstructContext* pContext, in ConstructOpExpand() argument
800 u32 extendSize = math::Min(pContext->TaskRemain(), pStream->GetRemain()); in ConstructOpExpand()
803 nn::cx::ReadUncompHuffman( pContext->GetUncompContext(), in ConstructOpExpand()
808 pContext->TaskProceed(extendSize); in ConstructOpExpand()
810 if (pContext->TaskRemain() == 0) in ConstructOpExpand()
814 pContext->EndTask(); in ConstructOpExpand()
820 return RequestData(pContext, pStream, pContext->TaskRemain()); in ConstructOpExpand()
828 ArchiveFontBase::ConstructContext* pContext, in ConstructOpFatalError() argument
833 pContext->op = ConstructContext::FATAL_ERROR; in ConstructOpFatalError()
891 ArchiveFontBase::ConstructContext* pContext, in CopyTo() argument
895 NN_ASSERT(pContext->GetRemain() >= size); in CopyTo()
897 CopyTo(pContext->GetCurrentPtr<void*>(), size); in CopyTo()
898 pContext->Advance(size); in CopyTo()
954 ArchiveFontBase::CachedStreamReader::ManagedCopy(ArchiveFontBase::ConstructContext* pContext) in ManagedCopy() argument
957 u32 copySize = math::Min(static_cast<u32>(mStreamEnd - mStreamPos), pContext->TaskRemain()); in ManagedCopy()
959 std::memcpy(pContext->GetCurrentPtr<void*>(), mStreamPos, copySize); in ManagedCopy()
961 pContext->Advance(copySize); in ManagedCopy()
962 pContext->TaskProceed(copySize); in ManagedCopy()
964 return pContext->TaskRemain(); in ManagedCopy()
978 ArchiveFontBase::ConstructContext* pContext, in RequestData() argument
996 if (pContext->GetRemain() < size * 2) in RequestData()
1002 u8* tempBuf = pContext->GetCurrentPtr<u8*>() + size; in RequestData()