• Home
  • Raw
  • Download

Lines Matching refs:paragraph

10     ParagraphCacheKey(const ParagraphImpl* paragraph)  in ParagraphCacheKey()  argument
11 : fText(paragraph->fText.c_str(), paragraph->fText.size()) in ParagraphCacheKey()
12 , fFontSwitches(paragraph->switches()) in ParagraphCacheKey()
13 , fTextStyles(paragraph->fTextStyles) in ParagraphCacheKey()
14 , fParagraphStyle(paragraph->paragraphStyle()) { } in ParagraphCacheKey()
24 ParagraphCacheValue(const ParagraphImpl* paragraph) in ParagraphCacheValue() argument
25 : fKey(ParagraphCacheKey(paragraph)) in ParagraphCacheValue()
26 , fInternalState(paragraph->state()) in ParagraphCacheValue()
27 , fRuns(paragraph->fRuns) in ParagraphCacheValue()
28 , fClusters(paragraph->fClusters) { } in ParagraphCacheValue()
138 void ParagraphCache::updateFrom(const ParagraphImpl* paragraph, Entry* entry) { in updateFrom() argument
140 entry->fValue->fInternalState = paragraph->state(); in updateFrom()
141 entry->fValue->fRunShifts = paragraph->fRunShifts; in updateFrom()
142 for (size_t i = 0; i < paragraph->fRuns.size(); ++i) { in updateFrom()
143 auto& run = paragraph->fRuns[i]; in updateFrom()
150 void ParagraphCache::updateTo(ParagraphImpl* paragraph, const Entry* entry) { in updateTo() argument
151 paragraph->fRuns.reset(); in updateTo()
152 paragraph->fRuns = entry->fValue->fRuns; in updateTo()
153 for (auto& run : paragraph->fRuns) { in updateTo()
154 run.setMaster(paragraph); in updateTo()
157 paragraph->fClusters.reset(); in updateTo()
158 paragraph->fClusters = entry->fValue->fClusters; in updateTo()
159 for (auto& cluster : paragraph->fClusters) { in updateTo()
160 cluster.setMaster(paragraph); in updateTo()
163 paragraph->fRunShifts.reset(); in updateTo()
165 paragraph->fRunShifts.push_back(runShift); in updateTo()
168 paragraph->fState = entry->fValue->fInternalState; in updateTo()
199 bool ParagraphCache::findParagraph(ParagraphImpl* paragraph) { in findParagraph() argument
207 ParagraphCacheKey key(paragraph); in findParagraph()
214 fChecker(paragraph, "missingParagraph", true); in findParagraph()
217 updateTo(paragraph, entry->get()); in findParagraph()
218 fChecker(paragraph, "foundParagraph", true); in findParagraph()
222 bool ParagraphCache::updateParagraph(ParagraphImpl* paragraph) { in updateParagraph() argument
230 ParagraphCacheKey key(paragraph); in updateParagraph()
233 ParagraphCacheValue* value = new ParagraphCacheValue(paragraph); in updateParagraph()
235 fChecker(paragraph, "addedParagraph", true); in updateParagraph()
238 updateFrom(paragraph, entry->get()); in updateParagraph()
239 fChecker(paragraph, "updatedParagraph", true); in updateParagraph()