diff options
author | Ken Moore <ken@ixsystems.com> | 2018-03-13 09:39:35 -0400 |
---|---|---|
committer | Ken Moore <ken@ixsystems.com> | 2018-03-13 09:39:35 -0400 |
commit | 83ca2eae7924ba668baecd66631628507b77c60f (patch) | |
tree | 7bf2eb52224d530844a1e0af23762d3cef70700c /src-qt5/desktop-utils/lumina-pdf/mainUI.cpp | |
parent | Oops - comment out a debugging break in the print routine. (diff) | |
parent | Added multithreading support for the MuPDF backend and fixed rendering errors (diff) | |
download | lumina-83ca2eae7924ba668baecd66631628507b77c60f.tar.gz lumina-83ca2eae7924ba668baecd66631628507b77c60f.tar.bz2 lumina-83ca2eae7924ba668baecd66631628507b77c60f.zip |
Merge branch 'master' of github.com:trueos/lumina
Diffstat (limited to 'src-qt5/desktop-utils/lumina-pdf/mainUI.cpp')
-rw-r--r-- | src-qt5/desktop-utils/lumina-pdf/mainUI.cpp | 12 |
1 files changed, 1 insertions, 11 deletions
diff --git a/src-qt5/desktop-utils/lumina-pdf/mainUI.cpp b/src-qt5/desktop-utils/lumina-pdf/mainUI.cpp index 5262c875..54b281dd 100644 --- a/src-qt5/desktop-utils/lumina-pdf/mainUI.cpp +++ b/src-qt5/desktop-utils/lumina-pdf/mainUI.cpp @@ -15,7 +15,6 @@ #include <QDebug> #include <QApplication> #include <QScreen> -#include <QTimer> #include <iostream> #include <QtConcurrent> @@ -382,10 +381,6 @@ void MainUI::startLoadingPages(){ // Using Qt to scale the image (adjust page value) smooths out the image quite a bit without a lot of performance loss (but cannot scale up without pixelization) // The best approach seams to be to increase the DPI a bit, but match that with the same scaling on the page size (smoothing) - //double scalefactor = 2.5; - //fz_rect page_rect; - //fz_bound_page(CTX, fz_load_page(CTX, DOC, 0), &page_rect); - //pageSize = QSizeF((page_rect.x1 - page_rect.x0)/72.0, (page_rect.y1 - page_rect.y0)/72.0); QSize DPI(300,300); //print-quality (some printers even go to 600 DPI nowdays) /*qDebug() << "Screen Resolutions:"; @@ -393,14 +388,9 @@ void MainUI::startLoadingPages(){ for(int i=0; i<screens.length(); i++){ qDebug() << screens[i]->name() << screens[i]->logicalDotsPerInchX() << screens[i]->logicalDotsPerInchY(); }*/ - bool async = BACKEND->loadMultiThread(); for(int i=0; i<BACKEND->numPages(); i++){ //qDebug() << " - Kickoff page load:" << i; - if(async){ - QtConcurrent::run(this, &MainUI::loadPage, i, this, DPI); - }else{ - loadPage(i, this, DPI); - } + QtConcurrent::run(this, &MainUI::loadPage, i, this, DPI); } //qDebug() << "Finish page loading kickoff"; } |