aboutsummaryrefslogtreecommitdiffstats
path: root/src/quick/scenegraph/qsgopengldistancefieldglyphcache_p.h
diff options
context:
space:
mode:
authorQt Forward Merge Bot <qt_forward_merge_bot@qt-project.org>2019-07-12 01:01:11 +0200
committerSimon Hausmann <simon.hausmann@qt.io>2019-07-12 15:56:39 +0200
commitd389fe039203f318a8c9a836dea4c348a1a892a8 (patch)
tree223f8c3c6869818c43a139040bcd3862f0393095 /src/quick/scenegraph/qsgopengldistancefieldglyphcache_p.h
parentde0d91abbbcf58a66018a08ca77bb4d63a5efda1 (diff)
parent47ad6c57d1873c3da362cfad7cc81dc0aa2720a4 (diff)
Merge remote-tracking branch 'origin/5.13' into dev
Conflicts: src/qml/qml/qqmltypeloader.cpp src/quick/scenegraph/qsgopengldistancefieldglyphcache.cpp Change-Id: I1a226d8738db2ec06e3cef240a0e040e7c144cad
Diffstat (limited to 'src/quick/scenegraph/qsgopengldistancefieldglyphcache_p.h')
-rw-r--r--src/quick/scenegraph/qsgopengldistancefieldglyphcache_p.h9
1 files changed, 5 insertions, 4 deletions
diff --git a/src/quick/scenegraph/qsgopengldistancefieldglyphcache_p.h b/src/quick/scenegraph/qsgopengldistancefieldglyphcache_p.h
index 99cfe27b9c..66d1b52f86 100644
--- a/src/quick/scenegraph/qsgopengldistancefieldglyphcache_p.h
+++ b/src/quick/scenegraph/qsgopengldistancefieldglyphcache_p.h
@@ -80,7 +80,6 @@ public:
bool useTextureResizeWorkaround() const;
bool useTextureUploadWorkaround() const;
bool createFullSizeTextures() const;
- int maxTextureSize() const;
void setMaxTextureCount(int max) { m_maxTextureCount = max; }
int maxTextureCount() const { return m_maxTextureCount; }
@@ -98,7 +97,7 @@ private:
QDistanceField image;
int padding = -1;
- TextureInfo(const QRect &preallocRect = QRect()) : texture(0), allocatedArea(preallocRect) { }
+ TextureInfo(const QRect &preallocRect = QRect(0, 0, 1, 1)) : texture(0), allocatedArea(preallocRect) { }
};
void createTexture(TextureInfo * texInfo, int width, int height, const void *pixels);
@@ -107,9 +106,10 @@ private:
TextureInfo *textureInfo(int index)
{
+ Q_ASSERT(m_maxTextureWidth > 0 && m_maxTextureHeight > 0);
for (int i = m_textures.count(); i <= index; ++i) {
if (createFullSizeTextures())
- m_textures.append(QRect(0, 0, maxTextureSize(), maxTextureSize()));
+ m_textures.append(QRect(0, 0, m_maxTextureWidth, m_maxTextureWidth));
else
m_textures.append(TextureInfo());
}
@@ -137,7 +137,8 @@ private:
m_blitProgram->link();
}
- mutable int m_maxTextureSize;
+ int m_maxTextureWidth;
+ int m_maxTextureHeight;
int m_maxTextureCount;
bool m_coreProfile;