mirror of
https://github.com/tumic0/GPXSee.git
synced 2025-04-21 04:39:10 +02:00
Compare commits
No commits in common. "7e89f339f46a367ab485ab64948b42bc11b604b1" and "c114383c85de0d6c0ee040e0af5121f2dba90ba0" have entirely different histories.
7e89f339f4
...
c114383c85
21
.github/workflows/osx.yml
vendored
21
.github/workflows/osx.yml
vendored
@ -10,12 +10,14 @@ jobs:
|
||||
name: GPXSee Qt5 build
|
||||
runs-on: macos-latest
|
||||
steps:
|
||||
- name: Set environment variables
|
||||
run: echo "PATH=/usr/local/opt/qt@5/bin:$PATH" >> $GITHUB_ENV
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v3
|
||||
- name: Install Qt
|
||||
uses: jurplel/install-qt-action@v3
|
||||
with:
|
||||
version: '5.15.2'
|
||||
- name: Install dependencies
|
||||
run: |
|
||||
brew update
|
||||
brew install qt5
|
||||
- name: Create localization
|
||||
run: lrelease gpxsee.pro
|
||||
- name: Configure build
|
||||
@ -34,13 +36,14 @@ jobs:
|
||||
name: GPXSee Qt6 build
|
||||
runs-on: macos-latest
|
||||
steps:
|
||||
- name: Set environment variables
|
||||
run: echo "PATH=/usr/local/opt/qt@6/bin:$PATH" >> $GITHUB_ENV
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v3
|
||||
- name: Install Qt
|
||||
uses: jurplel/install-qt-action@v3
|
||||
with:
|
||||
version: '6.4.3'
|
||||
modules: qtpositioning qt5compat qtserialport
|
||||
- name: Install dependencies
|
||||
run: |
|
||||
brew update
|
||||
brew install qt6
|
||||
- name: Create localization
|
||||
run: lrelease gpxsee.pro
|
||||
- name: Configure build
|
||||
|
@ -2,11 +2,6 @@
|
||||
#include "image.h"
|
||||
|
||||
#define TILE_SIZE 256
|
||||
#if QT_VERSION >= QT_VERSION_CHECK(6, 5, 0)
|
||||
#define OPENGL_SIZE_LIMIT 536870912 /* 512MB */
|
||||
#else
|
||||
#define OPENGL_SIZE_LIMIT 134217728 /* 128MB */
|
||||
#endif
|
||||
|
||||
void Image::draw(QPainter *painter, const QRectF &rect, Map::Flags flags)
|
||||
{
|
||||
@ -16,7 +11,7 @@ void Image::draw(QPainter *painter, const QRectF &rect, Map::Flags flags)
|
||||
/* When OpenGL is used, big images are rendered incredibly slow or not at
|
||||
all using the QPainter::drawImage() function with a source rect set. So
|
||||
we have to tile the image ourself before it can be drawn. */
|
||||
if (flags & Map::OpenGL && _img.sizeInBytes() > OPENGL_SIZE_LIMIT) {
|
||||
if (flags & Map::OpenGL) {
|
||||
for (int i = sr.left()/TILE_SIZE; i <= sr.right()/TILE_SIZE; i++) {
|
||||
for (int j = sr.top()/TILE_SIZE; j <= sr.bottom()/TILE_SIZE; j++) {
|
||||
QPoint tl(i * TILE_SIZE, j * TILE_SIZE);
|
||||
|
Loading…
x
Reference in New Issue
Block a user