From fa42faaee527b9822500cd9a69023be817083d92 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Samuel=20R=C3=B8dal?= Date: Mon, 12 Sep 2011 14:53:20 +0200 Subject: Implemented texture cache for GL paint engine in QtGui. This is simpler than the existing texture cache in QtOpenGL, as it only serves the GL paint engine. There's one per context group, to simplify the design and to prevent performance degradations. Change-Id: I61e3c9a444d8e246a8b38da019a56f2c0a533c0c Reviewed-on: http://codereview.qt-project.org/4674 Reviewed-by: Qt Sanity Bot Reviewed-by: Kim M. Kalland --- tests/auto/qopengl/tst_qopengl.cpp | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) (limited to 'tests') diff --git a/tests/auto/qopengl/tst_qopengl.cpp b/tests/auto/qopengl/tst_qopengl.cpp index 18e7e07d94..577fbafe4a 100644 --- a/tests/auto/qopengl/tst_qopengl.cpp +++ b/tests/auto/qopengl/tst_qopengl.cpp @@ -418,14 +418,20 @@ void tst_QOpenGL::openGLPaintDevice() QCOMPARE(image, fbo.toImage().convertToFormat(QImage::Format_RGB32)); - QSKIP("Image / pixmap painting needs to be implemented", SkipSingle); p.begin(&device); + p.fillRect(0, 0, image.width(), image.height(), Qt::black); p.drawImage(0, 0, image); p.end(); QCOMPARE(image, fbo.toImage().convertToFormat(QImage::Format_RGB32)); -} + p.begin(&device); + p.fillRect(0, 0, image.width(), image.height(), Qt::black); + p.fillRect(0, 0, image.width(), image.height(), QBrush(image)); + p.end(); + + QCOMPARE(image, fbo.toImage().convertToFormat(QImage::Format_RGB32)); +} QTEST_MAIN(tst_QOpenGL) #include "tst_qopengl.moc" -- cgit v1.2.3