Extend test_wayland_surface to test frame rendered callback
This commit is contained in:
parent
c14bbe9c53
commit
9ae04f2100
1 changed files with 6 additions and 1 deletions
|
@ -310,7 +310,9 @@ void TestWaylandSurface::testAttachBuffer()
|
|||
QVERIFY(blueBuffer->isUsed());
|
||||
s->attachBuffer(blueBuffer);
|
||||
s->damage(QRect(0, 0, 24, 24));
|
||||
s->commit(KWayland::Client::Surface::CommitFlag::None);
|
||||
QSignalSpy frameRenderedSpy(s, SIGNAL(frameRendered()));
|
||||
QVERIFY(frameRenderedSpy.isValid());
|
||||
s->commit();
|
||||
damageSpy.clear();
|
||||
QVERIFY(damageSpy.wait());
|
||||
QVERIFY(!buffer2->isReferenced());
|
||||
|
@ -334,6 +336,9 @@ void TestWaylandSurface::testAttachBuffer()
|
|||
buffer3->unref();
|
||||
QVERIFY(buffer3->isReferenced());
|
||||
|
||||
serverSurface->frameRendered(1);
|
||||
QVERIFY(frameRenderedSpy.wait());
|
||||
|
||||
// TODO: add signal test on release
|
||||
buffer->unref();
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue