diff options
author | Richard Moe Gustavsen <richard.gustavsen@qt.io> | 2017-12-14 12:16:31 +0100 |
---|---|---|
committer | Richard Moe Gustavsen <richard.gustavsen@qt.io> | 2018-04-23 09:10:56 +0000 |
commit | 40e54cedaad19263c0dacadbb96a971b53c31b90 (patch) | |
tree | 6d9f46e3b9e4cadc481b2eb229ab115cf229fae9 /tests | |
parent | f23d1d54a06b0f3473e17300c3a1c495bcc25fdc (diff) |
QQuickContext2DFBOTexture: use normalized sub rect when using FBO with POT texture
When creating a Canvas item with renderStrategy set to Canvas.FramebufferObject
we might end up creating an FBO with a POT texture (e.g on iOS) that doesn't match
the size of the canvas. The result will be that the image turn out scaled.
QSGTexture::normalizedTextureSubRect() is a function that needs to be
overridden to be used. So this patch will create a subclass of QSGPlainTexture
that overrides it, and returns the normalized subrect inside the
FBO that that matches the size of the canvas.
Task-number: QTBUG-59192
Change-Id: I0f0e57e117656df21a94b7015bd160c44485046d
Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
Diffstat (limited to 'tests')
0 files changed, 0 insertions, 0 deletions