MCPcopy Create free account
hub / github.com/YACReader/yacreader / deliverDecodedImage

Method deliverDecodedImage

YACReader/continuous_page_provider.cpp:234–249  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

232}
233
234void ContinuousPageProvider::deliverDecodedImage(int pageIndex, quint64 generationValue, QImage decoded)
235{
236 pending.remove(pageIndex);
237
238 if (generationValue != generation || decoded.isNull()) {
239 return;
240 }
241
242 // Ignore results that fell outside the current window while decoding.
243 if (pageIndex < std::max(0, requestedFirst - kEvictMargin) || pageIndex > requestedLast + kEvictMargin) {
244 return;
245 }
246
247 cache.insert(pageIndex, std::move(decoded));
248 emit pageReady(pageIndex);
249}
250
251void ContinuousPageProvider::invalidateAll()
252{

Callers 1

runMethod · 0.80

Calls 2

removeMethod · 0.45
insertMethod · 0.45

Tested by

no test coverage detected