D6268: HiDPI Support for Okular

David Edmundson noreply at phabricator.kde.org
Wed Aug 16 08:50:35 UTC 2017


davidedmundson added inline comments.

INLINE COMMENTS

> pagepainter.cpp:70
>      QRect scaledCrop = crop.geometry( scaledWidth, scaledHeight );
> +    const QRect dScaledCrop(QRectF(scaledCrop.x() * dpr, scaledCrop.y() * dpr, scaledCrop.width() * dpr, scaledCrop.height() * dpr).toAlignedRect());
> +

can you add some comments on your "d" prefix.

> pagepainter.cpp:110
> +        if ( p != NULL ) {
> +            pixmap = p->copy();
> +            pixmap.setDevicePixelRatio( qApp->devicePixelRatio() );

we don't want to be doing this - copy does a deep copy which is expensive

QPixmap pixmap = *p would probably work as well, and that shares the underlying image data.

or we could just use p for this section, it doesn't seem like pixmap is used outside here.

> presentationwidget.cpp:842
>              // then blend the overlay (a piece of) over the background
> +            m_lastRenderedOverlay.save("/tmp/overlay.png");
>              QRect ovr = m_overlayGeometry.intersected( r );

...

REPOSITORY
  R223 Okular

REVISION DETAIL
  https://phabricator.kde.org/D6268

To: hetzenecker, davidedmundson, aacid
Cc: sander, anthonyfieroni, #okular, aacid
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/okular-devel/attachments/20170816/1236b204/attachment-0001.html>


More information about the Okular-devel mailing list