davidedmundson added a comment.
qApp->DPR can change within the lifespan of the app; for example plugging in a new monitor can change things. This does mean it's very important to keep the metadata of the pixmap's dpr with the pixmap. It ends up simpler and safer overall. Doesn't mean we need to break ABI though. --- @hetzenecker There are two breaks RequestPixmap::RequestPixmap and Page::_o_nearest --- For requestPixmap we're sure to not process any screen events in the meantime, so you can use qApp->devicePixelRatio() in the two places in document and in the line in generator. For use of Page::_o_nearest you can't. However, there is an easy way to keep ABI for this sort of thing. If you have someMethod(int a) and want to change it to someMethod(int a, qreal dpr) keep both, but make the first method simply call the second with a default parameter. ----- INLINE COMMENTS > generator.cpp:106 > + QPixmap *p = new QPixmap( QPixmap::fromImage( img ) ); > + p->setDevicePixelRatio( p->devicePixelRatioF() ); > + request->page()->setPixmap( request->observer(), p, > request->normalizedRect() ); sure about this one? REPOSITORY R223 Okular REVISION DETAIL https://phabricator.kde.org/D6268 To: hetzenecker, davidedmundson, aacid Cc: sander, anthonyfieroni, #okular, aacid