aboutsummaryrefslogtreecommitdiffstats
path: root/src/quick/scenegraph/compressedtexture/qsgcompressedatlastexture.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/quick/scenegraph/compressedtexture/qsgcompressedatlastexture.cpp')
-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 ac21ec2ed9..45d7a65555 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()