summaryrefslogtreecommitdiffstats
path: root/src/datavisualization/utils/texturehelper.cpp
diff options
context:
space:
mode:
authorMika Salmela <mika.salmela@theqtcompany.com>2014-10-28 12:28:02 +0200
committerTomi Korpipää <tomi.korpipaa@digia.com>2014-10-28 12:52:56 +0200
commit56d9ec81afc59b1cf6aaae7675ff460a6bc664a8 (patch)
tree9d434d5924659d29a262ddd68461fbb36129eccb /src/datavisualization/utils/texturehelper.cpp
parent440479cc4703c44b9fd59dcf679e426fcdd750d6 (diff)
Squeeze labels on ES2
If the label text with slightly smaller font would fit into smaller texture, force to use the smaller one. Task-number: QTRD-3395 Change-Id: Ib70f6722ea8403e4aa25ed190b21c059d9d0e062 Reviewed-by: Miikka Heikkinen <miikka.heikkinen@theqtcompany.com> Reviewed-by: Tomi Korpipää <tomi.korpipaa@digia.com>
Diffstat (limited to 'src/datavisualization/utils/texturehelper.cpp')
-rw-r--r--src/datavisualization/utils/texturehelper.cpp5
1 files changed, 2 insertions, 3 deletions
diff --git a/src/datavisualization/utils/texturehelper.cpp b/src/datavisualization/utils/texturehelper.cpp
index 2c40eb6a..939ce901 100644
--- a/src/datavisualization/utils/texturehelper.cpp
+++ b/src/datavisualization/utils/texturehelper.cpp
@@ -59,9 +59,8 @@ GLuint TextureHelper::create2DTexture(const QImage &image, bool useTrilinearFilt
QImage texImage = image;
#if defined(QT_OPENGL_ES_2)
- GLuint temp;
- GLuint imageWidth = Utils::getNearestPowerOfTwo(image.width(), temp);
- GLuint imageHeight = Utils::getNearestPowerOfTwo(image.height(), temp);
+ GLuint imageWidth = Utils::getNearestPowerOfTwo(image.width());
+ GLuint imageHeight = Utils::getNearestPowerOfTwo(image.height());
if (smoothScale) {
texImage = image.scaled(imageWidth, imageHeight, Qt::IgnoreAspectRatio,
Qt::SmoothTransformation);