aboutsummaryrefslogtreecommitdiffstats
path: root/tests/auto/quick/qquickanimatedsprite
diff options
context:
space:
mode:
authorLaszlo Agocs <laszlo.agocs@qt.io>2020-05-15 19:27:53 +0200
committerLaszlo Agocs <laszlo.agocs@qt.io>2020-05-16 10:33:01 +0200
commitfa1f0419128c23c3d38767ad40200c6ecf7d0cb0 (patch)
treed77b9b88900445a21c22beb28f5c368339522210 /tests/auto/quick/qquickanimatedsprite
parent82b9494360fb4cfcf38e99d46f32f117bff5e7ef (diff)
Remove OpenGL usage in AnimatedSprite autotest
It was never really necessary: the value is queriable from the rendercontext. Change-Id: Ibb7cf1b86a59c9dbf14476f2e798a29cabf6282f Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
Diffstat (limited to 'tests/auto/quick/qquickanimatedsprite')
-rw-r--r--tests/auto/quick/qquickanimatedsprite/tst_qquickanimatedsprite.cpp13
1 files changed, 2 insertions, 11 deletions
diff --git a/tests/auto/quick/qquickanimatedsprite/tst_qquickanimatedsprite.cpp b/tests/auto/quick/qquickanimatedsprite/tst_qquickanimatedsprite.cpp
index 47d6008c28..aaad5a2b89 100644
--- a/tests/auto/quick/qquickanimatedsprite/tst_qquickanimatedsprite.cpp
+++ b/tests/auto/quick/qquickanimatedsprite/tst_qquickanimatedsprite.cpp
@@ -32,10 +32,9 @@
#include <private/qabstractanimation_p.h>
#include <private/qquickanimatedsprite_p.h>
#include <private/qquickitem_p.h>
+#include <private/qquickwindow_p.h>
#include <QtCore/qscopedpointer.h>
#include <QtGui/qpainter.h>
-#include <qopenglcontext.h>
-#include <qopenglfunctions.h>
#include <QtGui/qoffscreensurface.h>
#include <QtQml/qqmlproperty.h>
@@ -298,15 +297,7 @@ void tst_qquickanimatedsprite::test_largeAnimation()
maxFrame = qMax(frame, maxFrame);
prevFrame = frame;
}
- int maxTextureSize;
- QOpenGLContext ctx;
- ctx.create();
- QOffscreenSurface offscreenSurface;
- offscreenSurface.setFormat(ctx.format());
- offscreenSurface.create();
- QVERIFY(ctx.makeCurrent(&offscreenSurface));
- ctx.functions()->glGetIntegerv(GL_MAX_TEXTURE_SIZE, &maxTextureSize);
- ctx.doneCurrent();
+ int maxTextureSize = QQuickWindowPrivate::get(window.data())->context->maxTextureSize();
maxTextureSize /= 512;
QVERIFY(maxFrame > maxTextureSize); // make sure we go beyond the texture width limitation
QCOMPARE(loopCounter, sprite->loops());