Changeset View
Changeset View
Standalone View
Standalone View
autotests/integration/scene_qpainter_test.cpp
Show First 20 Lines • Show All 351 Lines • ▼ Show 20 Line(s) | 316 | { | |||
---|---|---|---|---|---|
352 | if (!client->surface()) { | 352 | if (!client->surface()) { | ||
353 | // wait for surface | 353 | // wait for surface | ||
354 | QSignalSpy surfaceChangedSpy(client, &Toplevel::surfaceChanged); | 354 | QSignalSpy surfaceChangedSpy(client, &Toplevel::surfaceChanged); | ||
355 | QVERIFY(surfaceChangedSpy.isValid()); | 355 | QVERIFY(surfaceChangedSpy.isValid()); | ||
356 | QVERIFY(surfaceChangedSpy.wait()); | 356 | QVERIFY(surfaceChangedSpy.wait()); | ||
357 | } | 357 | } | ||
358 | QVERIFY(client->surface()); | 358 | QVERIFY(client->surface()); | ||
359 | QTRY_VERIFY(client->surface()->buffer()); | 359 | QTRY_VERIFY(client->surface()->buffer()); | ||
360 | QTRY_COMPARE(client->surface()->buffer()->data().size(), client->geometry().size()); | 360 | QTRY_COMPARE(client->surface()->buffer()->data().size(), client->size()); | ||
361 | QImage compareImage(client->clientSize(), QImage::Format_RGB32); | 361 | QImage compareImage(client->clientSize(), QImage::Format_RGB32); | ||
362 | compareImage.fill(Qt::white); | 362 | compareImage.fill(Qt::white); | ||
363 | QCOMPARE(client->surface()->buffer()->data().copy(QRect(client->clientPos(), client->clientSize())), compareImage); | 363 | QCOMPARE(client->surface()->buffer()->data().copy(QRect(client->clientPos(), client->clientSize())), compareImage); | ||
364 | 364 | | |||
365 | // enough time for rendering the window | 365 | // enough time for rendering the window | ||
366 | QTest::qWait(100); | 366 | QTest::qWait(100); | ||
367 | 367 | | |||
368 | auto scene = KWin::Compositor::self()->scene(); | 368 | auto scene = KWin::Compositor::self()->scene(); | ||
Show All 25 Lines |