aboutsummaryrefslogtreecommitdiffstats
path: root/src/quick/scenegraph/compressedtexture
diff options
context:
space:
mode:
authorQt Forward Merge Bot <qt_forward_merge_bot@qt-project.org>2020-03-03 01:00:05 +0100
committerUlf Hermann <ulf.hermann@qt.io>2020-03-03 12:23:20 +0100
commit04e3918f0fd0c19ed830d406e1c549a037089cc4 (patch)
tree8e07ee9c550124b277983542e2ad0f7a791b5276 /src/quick/scenegraph/compressedtexture
parentb760d972459fd3b0c41e4c85076fa933ba5c0d1d (diff)
parent254a56252874b63430701351dcd8c9bef8507353 (diff)
Merge remote-tracking branch 'origin/5.14' into 5.15
Conflicts: src/qmlmodels/qqmltableinstancemodel.cpp src/qmlmodels/qqmltableinstancemodel_p.h Change-Id: I89339b1cb41ba27fe30c79530859a1c2bfbecc69
Diffstat (limited to 'src/quick/scenegraph/compressedtexture')
-rw-r--r--src/quick/scenegraph/compressedtexture/qsgcompressedatlastexture.cpp10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/quick/scenegraph/compressedtexture/qsgcompressedatlastexture.cpp b/src/quick/scenegraph/compressedtexture/qsgcompressedatlastexture.cpp
index e981921c69..7c98e2c1e1 100644
--- a/src/quick/scenegraph/compressedtexture/qsgcompressedatlastexture.cpp
+++ b/src/quick/scenegraph/compressedtexture/qsgcompressedatlastexture.cpp
@@ -136,12 +136,12 @@ Texture::Texture(Atlas *atlas, const QRect &textureRect, const QByteArray &data,
{
float w = atlas->size().width();
float h = atlas->size().height();
- QRect nopad = atlasSubRect();
+ const QRect &r = atlasSubRect();
// offset by half-pixel to prevent bleeding when scaling
- m_texture_coords_rect = QRectF((nopad.x() + .5) / w,
- (nopad.y() + .5) / h,
- (nopad.width() - 1.) / w,
- (nopad.height() - 1.) / h);
+ m_texture_coords_rect = QRectF((r.x() + .5) / w,
+ (r.y() + .5) / h,
+ (size.width() - 1.) / w,
+ (size.height() - 1.) / h);
}
Texture::~Texture()