| 389 | } |
| 390 | |
| 391 | QSharedPointer<QImage> Page::getCachedImage(double xres, double yres, QRect render_box /* = QRect() */, PDFPageCache::TileStatus * status /* = nullptr */) |
| 392 | { |
| 393 | QReadLocker docLocker(_docLock.data()); |
| 394 | QReadLocker pageLocker(&_pageLock); |
| 395 | if (!_parent) { |
| 396 | if (status) |
| 397 | *status = PDFPageCache::UNKNOWN; |
| 398 | return QSharedPointer<QImage>(); |
| 399 | } |
| 400 | const PDFPageTile tile(xres, yres, render_box, _parent, _n); |
| 401 | if (status) |
| 402 | *status = _parent->pageCache().getStatus(tile); |
| 403 | return _parent->pageCache().getImage(tile); |
| 404 | } |
| 405 | |
| 406 | void Page::asyncRenderToImage(QObject *listener, double xres, double yres, QRect render_box, bool cache) |
| 407 | { |