Changeset View
Changeset View
Standalone View
Standalone View
autotests/integration/generic_scene_opengl_test.cpp
Show First 20 Lines • Show All 73 Lines • ▼ Show 20 Line(s) | 51 | { | |||
---|---|---|---|---|---|
74 | 74 | | |||
75 | kwinApp()->start(); | 75 | kwinApp()->start(); | ||
76 | QVERIFY(workspaceCreatedSpy.wait()); | 76 | QVERIFY(workspaceCreatedSpy.wait()); | ||
77 | QVERIFY(Compositor::self()); | 77 | QVERIFY(Compositor::self()); | ||
78 | 78 | | |||
79 | auto scene = KWin::Compositor::self()->scene(); | 79 | auto scene = KWin::Compositor::self()->scene(); | ||
80 | QVERIFY(scene); | 80 | QVERIFY(scene); | ||
81 | QCOMPARE(scene->compositingType(), KWin::OpenGL2Compositing); | 81 | QCOMPARE(scene->compositingType(), KWin::OpenGL2Compositing); | ||
82 | QCOMPARE(kwinApp()->platform()->selectedCompositor(), KWin::OpenGLCompositing); | ||||
82 | } | 83 | } | ||
83 | 84 | | |||
84 | void GenericSceneOpenGLTest::testRestart_data() | 85 | void GenericSceneOpenGLTest::testRestart_data() | ||
85 | { | 86 | { | ||
86 | QTest::addColumn<bool>("core"); | 87 | QTest::addColumn<bool>("core"); | ||
87 | 88 | | |||
88 | QTest::newRow("GLCore") << true; | 89 | QTest::newRow("GLCore") << true; | ||
89 | QTest::newRow("Legacy") << false; | 90 | QTest::newRow("Legacy") << false; | ||
Show All 14 Lines | 94 | { | |||
104 | KWin::Compositor::self()->slotReinitialize(); | 105 | KWin::Compositor::self()->slotReinitialize(); | ||
105 | if (sceneCreatedSpy.isEmpty()) { | 106 | if (sceneCreatedSpy.isEmpty()) { | ||
106 | QVERIFY(sceneCreatedSpy.wait()); | 107 | QVERIFY(sceneCreatedSpy.wait()); | ||
107 | } | 108 | } | ||
108 | QCOMPARE(sceneCreatedSpy.count(), 1); | 109 | QCOMPARE(sceneCreatedSpy.count(), 1); | ||
109 | auto scene = KWin::Compositor::self()->scene(); | 110 | auto scene = KWin::Compositor::self()->scene(); | ||
110 | QVERIFY(scene); | 111 | QVERIFY(scene); | ||
111 | QCOMPARE(scene->compositingType(), KWin::OpenGL2Compositing); | 112 | QCOMPARE(scene->compositingType(), KWin::OpenGL2Compositing); | ||
113 | QCOMPARE(kwinApp()->platform()->selectedCompositor(), KWin::OpenGLCompositing); | ||||
112 | 114 | | |||
113 | // trigger a repaint | 115 | // trigger a repaint | ||
114 | KWin::Compositor::self()->addRepaintFull(); | 116 | KWin::Compositor::self()->addRepaintFull(); | ||
115 | // and wait 100 msec to ensure it's rendered | 117 | // and wait 100 msec to ensure it's rendered | ||
116 | // TODO: introduce frameRendered signal in SceneOpenGL | 118 | // TODO: introduce frameRendered signal in SceneOpenGL | ||
117 | QTest::qWait(100); | 119 | QTest::qWait(100); | ||
118 | } | 120 | } |