Merge lp:~dandrader/qtmir/surfaceDrawn into lp:qtmir
- surfaceDrawn
- Merge into trunk
Status: | Superseded |
---|---|
Proposed branch: | lp:~dandrader/qtmir/surfaceDrawn |
Merge into: | lp:qtmir |
Diff against target: |
399 lines (+32/-57) 17 files modified
CMakeLists.txt (+1/-1) debian/control (+2/-2) src/modules/Unity/Application/mirsurface.cpp (+1/-1) src/modules/Unity/Application/mirsurface.h (+2/-2) src/modules/Unity/Application/mirsurfaceinterface.h (+0/-3) src/modules/Unity/Application/mirsurfacemanager.cpp (+2/-6) src/modules/Unity/Application/session.cpp (+0/-13) src/modules/Unity/Application/session.h (+1/-3) src/modules/Unity/Application/session_interface.h (+1/-1) tests/framework/fake_mirsurface.cpp (+2/-2) tests/framework/fake_mirsurface.h (+2/-1) tests/framework/fake_session.cpp (+1/-1) tests/framework/fake_session.h (+1/-1) tests/framework/mock_session.h (+1/-1) tests/modules/Application/application_test.cpp (+8/-8) tests/modules/ApplicationManager/application_manager_test.cpp (+1/-1) tests/modules/SessionManager/session_test.cpp (+6/-10) |
To merge this branch: | bzr merge lp:~dandrader/qtmir/surfaceDrawn |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Nick Dedekind (community) | code | Approve | |
Unity8 CI Bot (community) | continuous-integration | Needs Fixing | |
Review via email: mp+294428@code.launchpad.net |
This proposal has been superseded by a proposal from 2016-05-12.
Commit message
Implement MirSurface.drawn property
And no longer hide blank surfaces from shell
Description of the change
* Are there any related MPs required for this MP to build/function as expected? Please list.
https:/
https:/
* Did you perform an exploratory manual test run of your code change and any related functionality?
Yes
* If you changed the packaging (debian), did you subscribe the ubuntu-unity team to this MP?
N/A
Unity8 CI Bot (unity8-ci-bot) wrote : | # |
Unity8 CI Bot (unity8-ci-bot) wrote : | # |
FAILED: Continuous integration, rev:486
https:/
Executed test runs:
SUCCESS: https:/
SUCCESS: https:/
SUCCESS: https:/
FAILURE: https:/
FAILURE: https:/
FAILURE: https:/
FAILURE: https:/
FAILURE: https:/
FAILURE: https:/
Click here to trigger a rebuild:
https:/
Nick Dedekind (nick-dedekind) wrote : | # |
Code looks fine. Will test when silo built.
https:/
- 487. By Daniel d'Andrada
-
Implement MirSurface.drawn property
And no longer hide blank surfaces from shell
Unmerged revisions
- 487. By Daniel d'Andrada
-
Implement MirSurface.drawn property
And no longer hide blank surfaces from shell
Preview Diff
1 | === modified file 'CMakeLists.txt' | |||
2 | --- CMakeLists.txt 2016-04-26 07:20:33 +0000 | |||
3 | +++ CMakeLists.txt 2016-05-11 20:34:48 +0000 | |||
4 | @@ -76,7 +76,7 @@ | |||
5 | 76 | pkg_check_modules(GSETTINGS_QT REQUIRED gsettings-qt) | 76 | pkg_check_modules(GSETTINGS_QT REQUIRED gsettings-qt) |
6 | 77 | pkg_check_modules(QTDBUSTEST libqtdbustest-1 REQUIRED) | 77 | pkg_check_modules(QTDBUSTEST libqtdbustest-1 REQUIRED) |
7 | 78 | pkg_check_modules(QTDBUSMOCK libqtdbusmock-1 REQUIRED) | 78 | pkg_check_modules(QTDBUSMOCK libqtdbusmock-1 REQUIRED) |
9 | 79 | pkg_check_modules(APPLICATION_API REQUIRED unity-shell-application=15) | 79 | pkg_check_modules(APPLICATION_API REQUIRED unity-shell-application=16) |
10 | 80 | 80 | ||
11 | 81 | include_directories(${APPLICATION_API_INCLUDE_DIRS}) | 81 | include_directories(${APPLICATION_API_INCLUDE_DIRS}) |
12 | 82 | 82 | ||
13 | 83 | 83 | ||
14 | === modified file 'debian/control' | |||
15 | --- debian/control 2016-04-28 12:48:42 +0000 | |||
16 | +++ debian/control 2016-05-11 20:34:48 +0000 | |||
17 | @@ -22,7 +22,7 @@ | |||
18 | 22 | libubuntu-app-launch2-dev (>= 0.9), | 22 | libubuntu-app-launch2-dev (>= 0.9), |
19 | 23 | libubuntu-application-api-dev (>= 2.1.0), | 23 | libubuntu-application-api-dev (>= 2.1.0), |
20 | 24 | libudev-dev, | 24 | libudev-dev, |
22 | 25 | libunity-api-dev (>= 7.110), | 25 | libunity-api-dev (>= 7.112), |
23 | 26 | liburl-dispatcher1-dev, | 26 | liburl-dispatcher1-dev, |
24 | 27 | libxkbcommon-dev, | 27 | libxkbcommon-dev, |
25 | 28 | libxrender-dev, | 28 | libxrender-dev, |
26 | @@ -93,7 +93,7 @@ | |||
27 | 93 | Conflicts: libqtmir, | 93 | Conflicts: libqtmir, |
28 | 94 | libunity-mir1, | 94 | libunity-mir1, |
29 | 95 | Provides: unity-application-impl, | 95 | Provides: unity-application-impl, |
31 | 96 | unity-application-impl-15, | 96 | unity-application-impl-16, |
32 | 97 | Description: Qt plugin for Unity specific Mir APIs | 97 | Description: Qt plugin for Unity specific Mir APIs |
33 | 98 | QtMir provides Qt/QML bindings for Mir features that are exposed through the | 98 | QtMir provides Qt/QML bindings for Mir features that are exposed through the |
34 | 99 | qtmir-desktop or qtmir-android QPA plugin such as Application management | 99 | qtmir-desktop or qtmir-android QPA plugin such as Application management |
35 | 100 | 100 | ||
36 | === modified file 'src/modules/Unity/Application/mirsurface.cpp' | |||
37 | --- src/modules/Unity/Application/mirsurface.cpp 2016-04-26 08:30:26 +0000 | |||
38 | +++ src/modules/Unity/Application/mirsurface.cpp 2016-05-11 20:34:48 +0000 | |||
39 | @@ -263,7 +263,7 @@ | |||
40 | 263 | { | 263 | { |
41 | 264 | if (!m_firstFrameDrawn) { | 264 | if (!m_firstFrameDrawn) { |
42 | 265 | m_firstFrameDrawn = true; | 265 | m_firstFrameDrawn = true; |
44 | 266 | Q_EMIT firstFrameDrawn(); | 266 | Q_EMIT drawnChanged(true); |
45 | 267 | } | 267 | } |
46 | 268 | 268 | ||
47 | 269 | // restart the frame dropper so that items have enough time to render the next frame. | 269 | // restart the frame dropper so that items have enough time to render the next frame. |
48 | 270 | 270 | ||
49 | === modified file 'src/modules/Unity/Application/mirsurface.h' | |||
50 | --- src/modules/Unity/Application/mirsurface.h 2016-04-26 08:30:26 +0000 | |||
51 | +++ src/modules/Unity/Application/mirsurface.h 2016-05-11 20:34:48 +0000 | |||
52 | @@ -90,6 +90,8 @@ | |||
53 | 90 | 90 | ||
54 | 91 | unity::shell::application::MirSurfaceListInterface* promptSurfaceList() override; | 91 | unity::shell::application::MirSurfaceListInterface* promptSurfaceList() override; |
55 | 92 | 92 | ||
56 | 93 | bool drawn() const override { return m_firstFrameDrawn; } | ||
57 | 94 | |||
58 | 93 | Q_INVOKABLE void requestFocus() override; | 95 | Q_INVOKABLE void requestFocus() override; |
59 | 94 | Q_INVOKABLE void close() override; | 96 | Q_INVOKABLE void close() override; |
60 | 95 | Q_INVOKABLE void raise() override; | 97 | Q_INVOKABLE void raise() override; |
61 | @@ -99,8 +101,6 @@ | |||
62 | 99 | 101 | ||
63 | 100 | void setLive(bool value) override; | 102 | void setLive(bool value) override; |
64 | 101 | 103 | ||
65 | 102 | bool isFirstFrameDrawn() const override { return m_firstFrameDrawn; } | ||
66 | 103 | |||
67 | 104 | void stopFrameDropper() override; | 104 | void stopFrameDropper() override; |
68 | 105 | void startFrameDropper() override; | 105 | void startFrameDropper() override; |
69 | 106 | 106 | ||
70 | 107 | 107 | ||
71 | === modified file 'src/modules/Unity/Application/mirsurfaceinterface.h' | |||
72 | --- src/modules/Unity/Application/mirsurfaceinterface.h 2016-04-29 15:41:00 +0000 | |||
73 | +++ src/modules/Unity/Application/mirsurfaceinterface.h 2016-05-11 20:34:48 +0000 | |||
74 | @@ -44,8 +44,6 @@ | |||
75 | 44 | 44 | ||
76 | 45 | virtual void setLive(bool value) = 0; | 45 | virtual void setLive(bool value) = 0; |
77 | 46 | 46 | ||
78 | 47 | virtual bool isFirstFrameDrawn() const = 0; | ||
79 | 48 | |||
80 | 49 | virtual void stopFrameDropper() = 0; | 47 | virtual void stopFrameDropper() = 0; |
81 | 50 | virtual void startFrameDropper() = 0; | 48 | virtual void startFrameDropper() = 0; |
82 | 51 | 49 | ||
83 | @@ -116,7 +114,6 @@ | |||
84 | 116 | void cursorChanged(const QCursor &cursor); | 114 | void cursorChanged(const QCursor &cursor); |
85 | 117 | void raiseRequested(); | 115 | void raiseRequested(); |
86 | 118 | void closeRequested(); | 116 | void closeRequested(); |
87 | 119 | void firstFrameDrawn(); | ||
88 | 120 | void framesPosted(); | 117 | void framesPosted(); |
89 | 121 | void isBeingDisplayedChanged(); | 118 | void isBeingDisplayedChanged(); |
90 | 122 | void frameDropped(); | 119 | void frameDropped(); |
91 | 123 | 120 | ||
92 | === modified file 'src/modules/Unity/Application/mirsurfacemanager.cpp' | |||
93 | --- src/modules/Unity/Application/mirsurfacemanager.cpp 2016-04-29 15:41:00 +0000 | |||
94 | +++ src/modules/Unity/Application/mirsurfacemanager.cpp 2016-05-11 20:34:48 +0000 | |||
95 | @@ -113,18 +113,14 @@ | |||
96 | 113 | } | 113 | } |
97 | 114 | 114 | ||
98 | 115 | if (session) | 115 | if (session) |
100 | 116 | session->registerSurface(qmlSurface); | 116 | session->prependSurface(qmlSurface); |
101 | 117 | 117 | ||
102 | 118 | if (qmlSurface->type() == Mir::InputMethodType) { | 118 | if (qmlSurface->type() == Mir::InputMethodType) { |
103 | 119 | m_inputMethodSurface = qmlSurface; | 119 | m_inputMethodSurface = qmlSurface; |
104 | 120 | Q_EMIT inputMethodSurfaceChanged(); | 120 | Q_EMIT inputMethodSurfaceChanged(); |
105 | 121 | } | 121 | } |
106 | 122 | 122 | ||
112 | 123 | // Only notify QML of surface creation once it has drawn its first frame. | 123 | Q_EMIT surfaceCreated(qmlSurface); |
108 | 124 | connect(qmlSurface, &MirSurfaceInterface::firstFrameDrawn, this, [=]() { | ||
109 | 125 | tracepoint(qtmir, firstFrameDrawn); | ||
110 | 126 | Q_EMIT surfaceCreated(qmlSurface); | ||
111 | 127 | }); | ||
113 | 128 | 124 | ||
114 | 129 | // clean up after MirSurface is destroyed | 125 | // clean up after MirSurface is destroyed |
115 | 130 | connect(qmlSurface, &QObject::destroyed, this, [&](QObject *obj) { | 126 | connect(qmlSurface, &QObject::destroyed, this, [&](QObject *obj) { |
116 | 131 | 127 | ||
117 | === modified file 'src/modules/Unity/Application/session.cpp' | |||
118 | --- src/modules/Unity/Application/session.cpp 2016-04-06 16:52:49 +0000 | |||
119 | +++ src/modules/Unity/Application/session.cpp 2016-05-11 20:34:48 +0000 | |||
120 | @@ -191,19 +191,6 @@ | |||
121 | 191 | Q_EMIT applicationChanged(application); | 191 | Q_EMIT applicationChanged(application); |
122 | 192 | } | 192 | } |
123 | 193 | 193 | ||
124 | 194 | void Session::registerSurface(MirSurfaceInterface *newSurface) | ||
125 | 195 | { | ||
126 | 196 | qCDebug(QTMIR_SESSIONS) << "Session::resgisterSurface - session=" << name() << "surface=" << newSurface; | ||
127 | 197 | |||
128 | 198 | // Only notify QML of surface creation once it has drawn its first frame. | ||
129 | 199 | if (newSurface->isFirstFrameDrawn()) { | ||
130 | 200 | prependSurface(newSurface); | ||
131 | 201 | } else { | ||
132 | 202 | connect(newSurface, &MirSurfaceInterface::firstFrameDrawn, | ||
133 | 203 | this, [this, newSurface]() { this->prependSurface(newSurface); }); | ||
134 | 204 | } | ||
135 | 205 | } | ||
136 | 206 | |||
137 | 207 | void Session::prependSurface(MirSurfaceInterface *newSurface) | 194 | void Session::prependSurface(MirSurfaceInterface *newSurface) |
138 | 208 | { | 195 | { |
139 | 209 | qCDebug(QTMIR_SESSIONS) << "Session::prependSurface - session=" << name() << "surface=" << newSurface; | 196 | qCDebug(QTMIR_SESSIONS) << "Session::prependSurface - session=" << name() << "surface=" << newSurface; |
140 | 210 | 197 | ||
141 | === modified file 'src/modules/Unity/Application/session.h' | |||
142 | --- src/modules/Unity/Application/session.h 2016-03-28 18:02:26 +0000 | |||
143 | +++ src/modules/Unity/Application/session.h 2016-05-11 20:34:48 +0000 | |||
144 | @@ -57,7 +57,7 @@ | |||
145 | 57 | 57 | ||
146 | 58 | void setApplication(unity::shell::application::ApplicationInfoInterface* item) override; | 58 | void setApplication(unity::shell::application::ApplicationInfoInterface* item) override; |
147 | 59 | 59 | ||
149 | 60 | void registerSurface(MirSurfaceInterface* surface) override; | 60 | void prependSurface(MirSurfaceInterface* surface) override; |
150 | 61 | 61 | ||
151 | 62 | void suspend() override; | 62 | void suspend() override; |
152 | 63 | void resume() override; | 63 | void resume() override; |
153 | @@ -102,8 +102,6 @@ | |||
154 | 102 | 102 | ||
155 | 103 | void stopPromptSessions(); | 103 | void stopPromptSessions(); |
156 | 104 | 104 | ||
157 | 105 | void prependSurface(MirSurfaceInterface* surface); | ||
158 | 106 | |||
159 | 107 | std::shared_ptr<mir::scene::Session> m_session; | 105 | std::shared_ptr<mir::scene::Session> m_session; |
160 | 108 | Application* m_application; | 106 | Application* m_application; |
161 | 109 | MirSurfaceListModel m_surfaceList; | 107 | MirSurfaceListModel m_surfaceList; |
162 | 110 | 108 | ||
163 | === modified file 'src/modules/Unity/Application/session_interface.h' | |||
164 | --- src/modules/Unity/Application/session_interface.h 2016-04-06 16:52:49 +0000 | |||
165 | +++ src/modules/Unity/Application/session_interface.h 2016-05-11 20:34:48 +0000 | |||
166 | @@ -77,7 +77,7 @@ | |||
167 | 77 | 77 | ||
168 | 78 | // For MirSurface and MirSurfaceManager use | 78 | // For MirSurface and MirSurfaceManager use |
169 | 79 | 79 | ||
171 | 80 | virtual void registerSurface(MirSurfaceInterface* surface) = 0; | 80 | virtual void prependSurface(MirSurfaceInterface* surface) = 0; |
172 | 81 | 81 | ||
173 | 82 | // For Application use | 82 | // For Application use |
174 | 83 | 83 | ||
175 | 84 | 84 | ||
176 | === modified file 'tests/framework/fake_mirsurface.cpp' | |||
177 | --- tests/framework/fake_mirsurface.cpp 2016-04-05 18:58:38 +0000 | |||
178 | +++ tests/framework/fake_mirsurface.cpp 2016-05-11 20:34:48 +0000 | |||
179 | @@ -91,7 +91,7 @@ | |||
180 | 91 | } | 91 | } |
181 | 92 | } | 92 | } |
182 | 93 | 93 | ||
184 | 94 | bool FakeMirSurface::isFirstFrameDrawn() const | 94 | bool FakeMirSurface::drawn() const |
185 | 95 | { | 95 | { |
186 | 96 | return m_isFirstFrameDrawn; | 96 | return m_isFirstFrameDrawn; |
187 | 97 | } | 97 | } |
188 | @@ -188,7 +188,7 @@ | |||
189 | 188 | { | 188 | { |
190 | 189 | if (!m_isFirstFrameDrawn) { | 189 | if (!m_isFirstFrameDrawn) { |
191 | 190 | m_isFirstFrameDrawn = true; | 190 | m_isFirstFrameDrawn = true; |
193 | 191 | Q_EMIT firstFrameDrawn(); | 191 | Q_EMIT drawnChanged(true); |
194 | 192 | } | 192 | } |
195 | 193 | } | 193 | } |
196 | 194 | 194 | ||
197 | 195 | 195 | ||
198 | === modified file 'tests/framework/fake_mirsurface.h' | |||
199 | --- tests/framework/fake_mirsurface.h 2016-04-26 08:30:26 +0000 | |||
200 | +++ tests/framework/fake_mirsurface.h 2016-05-11 20:34:48 +0000 | |||
201 | @@ -79,6 +79,8 @@ | |||
202 | 79 | 79 | ||
203 | 80 | unity::shell::application::MirSurfaceListInterface* promptSurfaceList() override { return &m_promptSurfaceList;} | 80 | unity::shell::application::MirSurfaceListInterface* promptSurfaceList() override { return &m_promptSurfaceList;} |
204 | 81 | 81 | ||
205 | 82 | bool drawn() const override; | ||
206 | 83 | |||
207 | 82 | void requestFocus() override { | 84 | void requestFocus() override { |
208 | 83 | Q_EMIT focusRequested(); | 85 | Q_EMIT focusRequested(); |
209 | 84 | } | 86 | } |
210 | @@ -94,7 +96,6 @@ | |||
211 | 94 | //// | 96 | //// |
212 | 95 | // qtmir.MirSurfaceInterface | 97 | // qtmir.MirSurfaceInterface |
213 | 96 | 98 | ||
214 | 97 | bool isFirstFrameDrawn() const override; | ||
215 | 98 | void stopFrameDropper() override; | 99 | void stopFrameDropper() override; |
216 | 99 | void startFrameDropper() override; | 100 | void startFrameDropper() override; |
217 | 100 | void setLive(bool value) override; | 101 | void setLive(bool value) override; |
218 | 101 | 102 | ||
219 | === modified file 'tests/framework/fake_session.cpp' | |||
220 | --- tests/framework/fake_session.cpp 2016-03-28 18:02:26 +0000 | |||
221 | +++ tests/framework/fake_session.cpp 2016-05-11 20:34:48 +0000 | |||
222 | @@ -49,7 +49,7 @@ | |||
223 | 49 | return m_session; | 49 | return m_session; |
224 | 50 | } | 50 | } |
225 | 51 | 51 | ||
227 | 52 | void FakeSession::registerSurface(MirSurfaceInterface *) {} | 52 | void FakeSession::prependSurface(MirSurfaceInterface *) {} |
228 | 53 | 53 | ||
229 | 54 | void FakeSession::setApplication(unity::shell::application::ApplicationInfoInterface *app) | 54 | void FakeSession::setApplication(unity::shell::application::ApplicationInfoInterface *app) |
230 | 55 | { | 55 | { |
231 | 56 | 56 | ||
232 | === modified file 'tests/framework/fake_session.h' | |||
233 | --- tests/framework/fake_session.h 2016-03-28 18:02:26 +0000 | |||
234 | +++ tests/framework/fake_session.h 2016-05-11 20:34:48 +0000 | |||
235 | @@ -43,7 +43,7 @@ | |||
236 | 43 | 43 | ||
237 | 44 | // For MirSurfaceItem and MirSurfaceManager use | 44 | // For MirSurfaceItem and MirSurfaceManager use |
238 | 45 | 45 | ||
240 | 46 | void registerSurface(MirSurfaceInterface*) override; | 46 | void prependSurface(MirSurfaceInterface*) override; |
241 | 47 | 47 | ||
242 | 48 | // For Application use | 48 | // For Application use |
243 | 49 | 49 | ||
244 | 50 | 50 | ||
245 | === modified file 'tests/framework/mock_session.h' | |||
246 | --- tests/framework/mock_session.h 2016-03-28 18:02:26 +0000 | |||
247 | +++ tests/framework/mock_session.h 2016-05-11 20:34:48 +0000 | |||
248 | @@ -42,7 +42,7 @@ | |||
249 | 42 | 42 | ||
250 | 43 | MOCK_CONST_METHOD0(session, std::shared_ptr<mir::scene::Session>()); | 43 | MOCK_CONST_METHOD0(session, std::shared_ptr<mir::scene::Session>()); |
251 | 44 | 44 | ||
253 | 45 | MOCK_METHOD1(registerSurface, void(MirSurfaceInterface* surface)); | 45 | MOCK_METHOD1(prependSurface, void(MirSurfaceInterface* surface)); |
254 | 46 | MOCK_METHOD1(removeSurface, void(MirSurfaceInterface* surface)); | 46 | MOCK_METHOD1(removeSurface, void(MirSurfaceInterface* surface)); |
255 | 47 | 47 | ||
256 | 48 | MOCK_METHOD1(setApplication, void(unity::shell::application::ApplicationInfoInterface* item)); | 48 | MOCK_METHOD1(setApplication, void(unity::shell::application::ApplicationInfoInterface* item)); |
257 | 49 | 49 | ||
258 | === modified file 'tests/modules/Application/application_test.cpp' | |||
259 | --- tests/modules/Application/application_test.cpp 2016-04-26 08:56:36 +0000 | |||
260 | +++ tests/modules/Application/application_test.cpp 2016-05-11 20:34:48 +0000 | |||
261 | @@ -285,7 +285,7 @@ | |||
262 | 285 | QSignalSpy spyAppStopped(application.data(), SIGNAL(stopped())); | 285 | QSignalSpy spyAppStopped(application.data(), SIGNAL(stopped())); |
263 | 286 | 286 | ||
264 | 287 | FakeMirSurface *surface = new FakeMirSurface; | 287 | FakeMirSurface *surface = new FakeMirSurface; |
266 | 288 | session->registerSurface(surface); | 288 | session->prependSurface(surface); |
267 | 289 | surface->drawFirstFrame(); | 289 | surface->drawFirstFrame(); |
268 | 290 | 290 | ||
269 | 291 | ASSERT_EQ(Application::InternalState::Running, application->internalState()); | 291 | ASSERT_EQ(Application::InternalState::Running, application->internalState()); |
270 | @@ -380,7 +380,7 @@ | |||
271 | 380 | application->setSession(session); | 380 | application->setSession(session); |
272 | 381 | 381 | ||
273 | 382 | FakeMirSurface *surface = new FakeMirSurface; | 382 | FakeMirSurface *surface = new FakeMirSurface; |
275 | 383 | session->registerSurface(surface); | 383 | session->prependSurface(surface); |
276 | 384 | surface->drawFirstFrame(); | 384 | surface->drawFirstFrame(); |
277 | 385 | 385 | ||
278 | 386 | ASSERT_EQ(Application::InternalState::Running, application->internalState()); | 386 | ASSERT_EQ(Application::InternalState::Running, application->internalState()); |
279 | @@ -388,7 +388,7 @@ | |||
280 | 388 | // Add a second surface to ensure the application doesn't kill itself after it loses | 388 | // Add a second surface to ensure the application doesn't kill itself after it loses |
281 | 389 | // one surface. | 389 | // one surface. |
282 | 390 | FakeMirSurface *secondSurface = new FakeMirSurface; | 390 | FakeMirSurface *secondSurface = new FakeMirSurface; |
284 | 391 | session->registerSurface(secondSurface); | 391 | session->prependSurface(secondSurface); |
285 | 392 | secondSurface->drawFirstFrame(); | 392 | secondSurface->drawFirstFrame(); |
286 | 393 | 393 | ||
287 | 394 | suspend(application.data()); | 394 | suspend(application.data()); |
288 | @@ -437,14 +437,14 @@ | |||
289 | 437 | application->setSession(session); | 437 | application->setSession(session); |
290 | 438 | 438 | ||
291 | 439 | FakeMirSurface *surface = new FakeMirSurface; | 439 | FakeMirSurface *surface = new FakeMirSurface; |
293 | 440 | session->registerSurface(surface); | 440 | session->prependSurface(surface); |
294 | 441 | surface->drawFirstFrame(); | 441 | surface->drawFirstFrame(); |
295 | 442 | 442 | ||
296 | 443 | ASSERT_EQ(Application::InternalState::Running, application->internalState()); | 443 | ASSERT_EQ(Application::InternalState::Running, application->internalState()); |
297 | 444 | ASSERT_EQ(Session::Running, session->state()); | 444 | ASSERT_EQ(Session::Running, session->state()); |
298 | 445 | 445 | ||
299 | 446 | FakeMirSurface *secondSurface = new FakeMirSurface; | 446 | FakeMirSurface *secondSurface = new FakeMirSurface; |
301 | 447 | session->registerSurface(secondSurface); | 447 | session->prependSurface(secondSurface); |
302 | 448 | secondSurface->drawFirstFrame(); | 448 | secondSurface->drawFirstFrame(); |
303 | 449 | 449 | ||
304 | 450 | delete surface; | 450 | delete surface; |
305 | @@ -488,7 +488,7 @@ | |||
306 | 488 | application->setSession(session); | 488 | application->setSession(session); |
307 | 489 | 489 | ||
308 | 490 | FakeMirSurface *surface = new FakeMirSurface; | 490 | FakeMirSurface *surface = new FakeMirSurface; |
310 | 491 | session->registerSurface(surface); | 491 | session->prependSurface(surface); |
311 | 492 | surface->drawFirstFrame(); | 492 | surface->drawFirstFrame(); |
312 | 493 | ASSERT_EQ(Application::InternalState::Running, application->internalState()); | 493 | ASSERT_EQ(Application::InternalState::Running, application->internalState()); |
313 | 494 | 494 | ||
314 | @@ -532,7 +532,7 @@ | |||
315 | 532 | application->setSession(session); | 532 | application->setSession(session); |
316 | 533 | 533 | ||
317 | 534 | FakeMirSurface *surface = new FakeMirSurface; | 534 | FakeMirSurface *surface = new FakeMirSurface; |
319 | 535 | session->registerSurface(surface); | 535 | session->prependSurface(surface); |
320 | 536 | surface->drawFirstFrame(); | 536 | surface->drawFirstFrame(); |
321 | 537 | ASSERT_EQ(Application::InternalState::Running, application->internalState()); | 537 | ASSERT_EQ(Application::InternalState::Running, application->internalState()); |
322 | 538 | 538 | ||
323 | @@ -570,7 +570,7 @@ | |||
324 | 570 | application->setSession(session); | 570 | application->setSession(session); |
325 | 571 | 571 | ||
326 | 572 | FakeMirSurface *surface = new FakeMirSurface; | 572 | FakeMirSurface *surface = new FakeMirSurface; |
328 | 573 | session->registerSurface(surface); | 573 | session->prependSurface(surface); |
329 | 574 | surface->drawFirstFrame(); | 574 | surface->drawFirstFrame(); |
330 | 575 | 575 | ||
331 | 576 | ASSERT_EQ(Application::InternalState::Running, application->internalState()); | 576 | ASSERT_EQ(Application::InternalState::Running, application->internalState()); |
332 | 577 | 577 | ||
333 | === modified file 'tests/modules/ApplicationManager/application_manager_test.cpp' | |||
334 | --- tests/modules/ApplicationManager/application_manager_test.cpp 2016-04-26 08:56:36 +0000 | |||
335 | +++ tests/modules/ApplicationManager/application_manager_test.cpp 2016-05-11 20:34:48 +0000 | |||
336 | @@ -55,7 +55,7 @@ | |||
337 | 55 | 55 | ||
338 | 56 | SessionInterface* qmlSession = sessionManager.findSession(mirSession); | 56 | SessionInterface* qmlSession = sessionManager.findSession(mirSession); |
339 | 57 | if (qmlSession) { | 57 | if (qmlSession) { |
341 | 58 | qmlSession->registerSurface(qmlSurface); | 58 | qmlSession->prependSurface(qmlSurface); |
342 | 59 | } | 59 | } |
343 | 60 | 60 | ||
344 | 61 | // I assume that applicationManager ignores the mirSurface parameter, so sending | 61 | // I assume that applicationManager ignores the mirSurface parameter, so sending |
345 | 62 | 62 | ||
346 | === modified file 'tests/modules/SessionManager/session_test.cpp' | |||
347 | --- tests/modules/SessionManager/session_test.cpp 2016-03-28 18:02:26 +0000 | |||
348 | +++ tests/modules/SessionManager/session_test.cpp 2016-05-11 20:34:48 +0000 | |||
349 | @@ -43,7 +43,7 @@ | |||
350 | 43 | } | 43 | } |
351 | 44 | }; | 44 | }; |
352 | 45 | 45 | ||
354 | 46 | TEST_F(SessionTests, FromStartingToRunningOnceSurfaceDrawsFirstFrame) | 46 | TEST_F(SessionTests, FromStartingToRunningOnceFirstSurfaceAppears) |
355 | 47 | { | 47 | { |
356 | 48 | using namespace testing; | 48 | using namespace testing; |
357 | 49 | 49 | ||
358 | @@ -58,12 +58,8 @@ | |||
359 | 58 | EXPECT_EQ(Session::Starting, session->state()); | 58 | EXPECT_EQ(Session::Starting, session->state()); |
360 | 59 | 59 | ||
361 | 60 | FakeMirSurface *surface = new FakeMirSurface; | 60 | FakeMirSurface *surface = new FakeMirSurface; |
368 | 61 | session->registerSurface(surface); | 61 | session->prependSurface(surface); |
369 | 62 | 62 | ||
364 | 63 | // Still on Starting as the surface hasn't drawn its first frame yet | ||
365 | 64 | EXPECT_EQ(Session::Starting, session->state()); | ||
366 | 65 | |||
367 | 66 | surface->drawFirstFrame(); | ||
370 | 67 | EXPECT_EQ(Session::Running, session->state()); | 63 | EXPECT_EQ(Session::Running, session->state()); |
371 | 68 | } | 64 | } |
372 | 69 | 65 | ||
373 | @@ -221,7 +217,7 @@ | |||
374 | 221 | auto session = std::make_shared<qtmir::Session>(mirSession, mirServer->the_prompt_session_manager()); | 217 | auto session = std::make_shared<qtmir::Session>(mirSession, mirServer->the_prompt_session_manager()); |
375 | 222 | { | 218 | { |
376 | 223 | FakeMirSurface *surface = new FakeMirSurface; | 219 | FakeMirSurface *surface = new FakeMirSurface; |
378 | 224 | session->registerSurface(surface); | 220 | session->prependSurface(surface); |
379 | 225 | surface->drawFirstFrame(); | 221 | surface->drawFirstFrame(); |
380 | 226 | } | 222 | } |
381 | 227 | EXPECT_EQ(Session::Running, session->state()); | 223 | EXPECT_EQ(Session::Running, session->state()); |
382 | @@ -252,7 +248,7 @@ | |||
383 | 252 | auto session = std::make_shared<qtmir::Session>(mirSession, promptSessionManager); | 248 | auto session = std::make_shared<qtmir::Session>(mirSession, promptSessionManager); |
384 | 253 | { | 249 | { |
385 | 254 | FakeMirSurface *surface = new FakeMirSurface; | 250 | FakeMirSurface *surface = new FakeMirSurface; |
387 | 255 | session->registerSurface(surface); | 251 | session->prependSurface(surface); |
388 | 256 | surface->drawFirstFrame(); | 252 | surface->drawFirstFrame(); |
389 | 257 | } | 253 | } |
390 | 258 | EXPECT_EQ(Session::Running, session->state()); | 254 | EXPECT_EQ(Session::Running, session->state()); |
391 | @@ -297,7 +293,7 @@ | |||
392 | 297 | auto session = std::make_shared<SessionTestClass>(mirSession, mirServer->the_prompt_session_manager()); | 293 | auto session = std::make_shared<SessionTestClass>(mirSession, mirServer->the_prompt_session_manager()); |
393 | 298 | { | 294 | { |
394 | 299 | FakeMirSurface *surface = new FakeMirSurface; | 295 | FakeMirSurface *surface = new FakeMirSurface; |
396 | 300 | session->registerSurface(surface); | 296 | session->prependSurface(surface); |
397 | 301 | surface->drawFirstFrame(); | 297 | surface->drawFirstFrame(); |
398 | 302 | } | 298 | } |
399 | 303 | EXPECT_EQ(Session::Running, session->state()); | 299 | EXPECT_EQ(Session::Running, session->state()); |
FAILED: Continuous integration, rev:485 /unity8- jenkins. ubuntu. com/job/ lp-qtmir- ci/213/ /unity8- jenkins. ubuntu. com/job/ build-0- fetch/1600 /unity8- jenkins. ubuntu. com/job/ build-1- sourcepkg/ release= vivid+overlay/ 1553 /unity8- jenkins. ubuntu. com/job/ build-1- sourcepkg/ release= xenial+ overlay/ 1553 /unity8- jenkins. ubuntu. com/job/ build-2- binpkg/ arch=amd64, release= vivid+overlay/ 1553/console /unity8- jenkins. ubuntu. com/job/ build-2- binpkg/ arch=amd64, release= xenial+ overlay/ 1553/console /unity8- jenkins. ubuntu. com/job/ build-2- binpkg/ arch=armhf, release= vivid+overlay/ 1553/console /unity8- jenkins. ubuntu. com/job/ build-2- binpkg/ arch=armhf, release= xenial+ overlay/ 1553/console /unity8- jenkins. ubuntu. com/job/ build-2- binpkg/ arch=i386, release= vivid+overlay/ 1553/console /unity8- jenkins. ubuntu. com/job/ build-2- binpkg/ arch=i386, release= xenial+ overlay/ 1553/console
https:/
Executed test runs:
SUCCESS: https:/
SUCCESS: https:/
SUCCESS: https:/
FAILURE: https:/
FAILURE: https:/
FAILURE: https:/
FAILURE: https:/
FAILURE: https:/
FAILURE: https:/
Click here to trigger a rebuild: /unity8- jenkins. ubuntu. com/job/ lp-qtmir- ci/213/ rebuild
https:/