Merge lp:~vanvugt/mir/overlay-terminology-is-awkward into lp:mir
- overlay-terminology-is-awkward
- Merge into development-branch
Status: | Merged |
---|---|
Merged at revision: | 3710 |
Proposed branch: | lp:~vanvugt/mir/overlay-terminology-is-awkward |
Merge into: | lp:mir |
Diff against target: |
575 lines (+61/-63) 28 files modified
examples/server_example_adorning_compositor.cpp (+1/-1) include/platform/mir/graphics/display_buffer.h (+6/-8) include/test/mir/test/doubles/null_display_buffer.h (+1/-1) playground/demo-shell/demo_compositor.cpp (+1/-1) src/platform/symbols.map (+1/-1) src/platforms/android/server/display_buffer.cpp (+1/-1) src/platforms/android/server/display_buffer.h (+1/-1) src/platforms/android/utils/render_overlays.cpp (+1/-1) src/platforms/android/utils/test_android_hardware_sanity.cpp (+1/-1) src/platforms/eglstream-kms/server/display.cpp (+1/-1) src/platforms/mesa/server/kms/display_buffer.cpp (+1/-1) src/platforms/mesa/server/kms/display_buffer.h (+1/-1) src/platforms/mesa/server/x11/graphics/display_buffer.cpp (+1/-1) src/platforms/mesa/server/x11/graphics/display_buffer.h (+1/-1) src/server/compositor/default_display_buffer_compositor.cpp (+1/-1) src/server/compositor/screencast_display_buffer.cpp (+1/-1) src/server/compositor/screencast_display_buffer.h (+1/-1) src/server/graphics/nested/display_buffer.cpp (+1/-1) src/server/graphics/nested/display_buffer.h (+1/-1) tests/acceptance-tests/test_latency.cpp (+1/-1) tests/include/mir/test/doubles/mock_display_buffer.h (+1/-1) tests/mir_test_framework/headless_display_buffer_compositor_factory.cpp (+1/-1) tests/unit-tests/compositor/test_default_display_buffer_compositor.cpp (+7/-7) tests/unit-tests/compositor/test_screencast_display_buffer.cpp (+1/-1) tests/unit-tests/platforms/android/server/test_display.cpp (+1/-1) tests/unit-tests/platforms/android/server/test_display_buffer.cpp (+11/-11) tests/unit-tests/platforms/android/server/test_display_group.cpp (+1/-1) tests/unit-tests/platforms/mesa/kms/test_display_buffer.cpp (+13/-13) |
To merge this branch: | bzr merge lp:~vanvugt/mir/overlay-terminology-is-awkward |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Mir CI Bot | continuous-integration | Needs Fixing | |
Cemil Azizoglu (community) | Approve | ||
Kevin DuBois (community) | Approve | ||
Review via email: mp+305916@code.launchpad.net |
Commit message
Rename 'post_renderabl
and less wordy. Also don't mention 'post_update' which no longer
exists.
Description of the change
There are a few problems with the current function name:
1. "post" is vague. Even in graphics texts it can mean different
things.
2. Even if you assume the Mir definition of "post" then this
function isn't posting any more. A long time ago it was changed
so that it doesn't replace post(). You still need to call post()
after it.
3. "if_optimizable" is vague because it sounds like we intend to
just optimize the RenderableList (and what does that even mean?)
rather than "post" (even though we're not even posting).
4. It's too long and wordy.
5. Anyone who knew what they were looking for and grepped for
"overlay" or "composite" would never find it.
The new name should cover all implementations which are presently:
mesa-kms: Fullscreen bypass of a single surface, and in future
could be multiple surfaces (DRM planes); and
android: Hardware composition of multiple surfaces
Final note: The two affected ABIs are already broken and bumped in this
series and do not need bumping again.
Mir CI Bot (mir-ci-bot) wrote : | # |
Kevin DuBois (kdub) wrote : | # |
The naming is a bit out-of-date. Breaking ABI for this wouldn't be worth it, but as it is, we've already broken abi here, so we may as well rename.
This also could do with an update to use the recently-added native_
suggestion:
try_to_composite is better than the current name, but we might not be compositing at all. Maybe just set_overlays() ?
needs fixing:
This bit of documentation needs updating as well:
* When this call completes, the renderlist will have been posted
* to the screen.
Daniel van Vugt (vanvugt) wrote : | # |
I wouldn't mind just calling it "overlay()" in future. However would prefer that be in future after we support the possibility of doing both in a single frame:
if (!display_
{
renderer-
display_
}
Remember "overlay" is a verb more often than it's a noun, so the "set_" prefix is unnecessary.
Mir CI Bot (mir-ci-bot) wrote : | # |
PASSED: Continuous integration, rev:3709
https:/
Executed test runs:
SUCCESS: https:/
SUCCESS: https:/
SUCCESS: https:/
SUCCESS: https:/
SUCCESS: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
Click here to trigger a rebuild:
https:/
Daniel van Vugt (vanvugt) wrote : | # |
Or rather in future it would be nice to have:
if (!display_
{
renderer-
if (!display_
}
Mir CI Bot (mir-ci-bot) wrote : | # |
FAILED: Continuous integration, rev:3710
https:/
Executed test runs:
FAILURE: https:/
SUCCESS: https:/
SUCCESS: https:/
SUCCESS: https:/
SUCCESS: https:/
SUCCESS: https:/
deb: https:/
FAILURE: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
Click here to trigger a rebuild:
https:/
Daniel van Vugt (vanvugt) wrote : | # |
^^^
Bug 1523621
Mir CI Bot (mir-ci-bot) wrote : | # |
FAILED: Continuous integration, rev:3711
https:/
Executed test runs:
FAILURE: https:/
SUCCESS: https:/
SUCCESS: https:/
SUCCESS: https:/
SUCCESS: https:/
SUCCESS: https:/
deb: https:/
FAILURE: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
Click here to trigger a rebuild:
https:/
Daniel van Vugt (vanvugt) wrote : | # |
^^^
Bug 1624188 back again this week. It had been gone for months/weeks...
Mir CI Bot (mir-ci-bot) wrote : | # |
PASSED: Continuous integration, rev:3712
https:/
Executed test runs:
SUCCESS: https:/
SUCCESS: https:/
SUCCESS: https:/
SUCCESS: https:/
SUCCESS: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
Click here to trigger a rebuild:
https:/
Kevin DuBois (kdub) wrote : | # |
I'm alright with just overlay(), lgtm.
Mir CI Bot (mir-ci-bot) wrote : | # |
FAILED: Autolanding.
More details in the following jenkins job:
https:/
Executed test runs:
SUCCESS: https:/
FAILURE: https:/
None: https:/
SUCCESS: https:/
SUCCESS: https:/
SUCCESS: https:/
SUCCESS: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
Preview Diff
1 | === modified file 'examples/server_example_adorning_compositor.cpp' |
2 | --- examples/server_example_adorning_compositor.cpp 2016-06-02 05:33:50 +0000 |
3 | +++ examples/server_example_adorning_compositor.cpp 2016-09-19 09:16:51 +0000 |
4 | @@ -183,7 +183,7 @@ |
5 | remove_occlusions_from(scene_sequence, db.view_area()); |
6 | |
7 | //note: If what should be drawn is expressible as a SceneElementSequence, |
8 | - // mg::DisplayBuffer::post_renderables_if_optimizable() should be used, |
9 | + // mg::DisplayBuffer::overlay() should be used, |
10 | // to give the the display hardware a chance at an optimized render of |
11 | // the scene. In this example though, we want some custom elements, so |
12 | // we'll always use GLES. |
13 | |
14 | === modified file 'include/platform/mir/graphics/display_buffer.h' |
15 | --- include/platform/mir/graphics/display_buffer.h 2016-05-03 06:55:25 +0000 |
16 | +++ include/platform/mir/graphics/display_buffer.h 2016-09-19 09:16:51 +0000 |
17 | @@ -58,16 +58,14 @@ |
18 | * The renderables that should appear on the screen if the hardware |
19 | * is capable of optmizing that list somehow. If what you want |
20 | * displayed on the screen cannot be represented by a RenderableList, |
21 | - * then you should draw using OpenGL and use post_update() |
22 | + * then you should render using a graphics library like OpenGL. |
23 | * \returns |
24 | - * true if the hardware can optimize the rendering of the list. |
25 | - * When this call completes, the renderlist will have been posted |
26 | - * to the screen. |
27 | - * false if the hardware platform cannot optimize the list. The screen |
28 | - * will not be updated. The caller should render the list another way, |
29 | - * and post using post_update() |
30 | + * True if the hardware can (and has) fully composite/overlay the list; |
31 | + * False if the hardware platform cannot composite the list, and the |
32 | + * caller should then render the list another way using a graphics |
33 | + * library such as OpenGL. |
34 | **/ |
35 | - virtual bool post_renderables_if_optimizable(RenderableList const& renderlist) = 0; |
36 | + virtual bool overlay(RenderableList const& renderlist) = 0; |
37 | |
38 | /** Returns the orientation of the display buffer relative to how the |
39 | * user should see it (the orientation of the output). |
40 | |
41 | === modified file 'include/test/mir/test/doubles/null_display_buffer.h' |
42 | --- include/test/mir/test/doubles/null_display_buffer.h 2016-05-03 06:55:25 +0000 |
43 | +++ include/test/mir/test/doubles/null_display_buffer.h 2016-09-19 09:16:51 +0000 |
44 | @@ -32,7 +32,7 @@ |
45 | { |
46 | public: |
47 | geometry::Rectangle view_area() const override { return geometry::Rectangle(); } |
48 | - bool post_renderables_if_optimizable(graphics::RenderableList const&) override { return false; } |
49 | + bool overlay(graphics::RenderableList const&) override { return false; } |
50 | MirOrientation orientation() const override { return mir_orientation_normal; } |
51 | MirMirrorMode mirror_mode() const override { return mir_mirror_mode_none; } |
52 | NativeDisplayBuffer* native_display_buffer() override { return this; } |
53 | |
54 | === modified file 'playground/demo-shell/demo_compositor.cpp' |
55 | --- playground/demo-shell/demo_compositor.cpp 2016-05-03 06:55:25 +0000 |
56 | +++ playground/demo-shell/demo_compositor.cpp 2016-09-19 09:16:51 +0000 |
57 | @@ -118,7 +118,7 @@ |
58 | |
59 | if (!nonrenderlist_elements && |
60 | viewport == display_buffer.view_area() && // no bypass while zoomed |
61 | - display_buffer.post_renderables_if_optimizable(renderable_list)) |
62 | + display_buffer.overlay(renderable_list)) |
63 | { |
64 | report->renderables_in_frame(this, renderable_list); |
65 | renderer.suspend(); |
66 | |
67 | === modified file 'src/platform/symbols.map' |
68 | --- src/platform/symbols.map 2016-09-02 16:51:10 +0000 |
69 | +++ src/platform/symbols.map 2016-09-19 09:16:51 +0000 |
70 | @@ -26,7 +26,7 @@ |
71 | mir::graphics::DisplayBuffer::native_display_buffer*; |
72 | mir::graphics::DisplayBuffer::operator*; |
73 | mir::graphics::DisplayBuffer::orientation*; |
74 | - mir::graphics::DisplayBuffer::post_renderables_if_optimizable*; |
75 | + mir::graphics::DisplayBuffer::overlay*; |
76 | mir::graphics::DisplayBuffer::view_area*; |
77 | mir::graphics::Display::configuration*; |
78 | mir::graphics::DisplayConfiguration::DisplayConfiguration*; |
79 | |
80 | === modified file 'src/platforms/android/server/display_buffer.cpp' |
81 | --- src/platforms/android/server/display_buffer.cpp 2016-05-03 06:55:25 +0000 |
82 | +++ src/platforms/android/server/display_buffer.cpp 2016-09-19 09:16:51 +0000 |
83 | @@ -79,7 +79,7 @@ |
84 | gl_context.release_current(); |
85 | } |
86 | |
87 | -bool mga::DisplayBuffer::post_renderables_if_optimizable(RenderableList const& renderlist) |
88 | +bool mga::DisplayBuffer::overlay(RenderableList const& renderlist) |
89 | { |
90 | if (!overlay_enabled || |
91 | !display_device->compatible_renderlist(renderlist) || |
92 | |
93 | === modified file 'src/platforms/android/server/display_buffer.h' |
94 | --- src/platforms/android/server/display_buffer.h 2016-05-03 06:55:25 +0000 |
95 | +++ src/platforms/android/server/display_buffer.h 2016-09-19 09:16:51 +0000 |
96 | @@ -63,7 +63,7 @@ |
97 | void make_current() override; |
98 | void release_current() override; |
99 | void swap_buffers() override; |
100 | - bool post_renderables_if_optimizable(RenderableList const& renderlist) override; |
101 | + bool overlay(RenderableList const& renderlist) override; |
102 | void bind() override; |
103 | |
104 | MirOrientation orientation() const override; |
105 | |
106 | === modified file 'src/platforms/android/utils/render_overlays.cpp' |
107 | --- src/platforms/android/utils/render_overlays.cpp 2016-08-16 19:34:28 +0000 |
108 | +++ src/platforms/android/utils/render_overlays.cpp 2016-09-19 09:16:51 +0000 |
109 | @@ -214,7 +214,7 @@ |
110 | { |
111 | // TODO: Is make_current() really needed here? |
112 | me::as_render_target(buffer)->make_current(); |
113 | - buffer.post_renderables_if_optimizable(renderlist); |
114 | + buffer.overlay(renderlist); |
115 | }); |
116 | group.post(); |
117 | }); |
118 | |
119 | === modified file 'src/platforms/android/utils/test_android_hardware_sanity.cpp' |
120 | --- src/platforms/android/utils/test_android_hardware_sanity.cpp 2016-08-22 14:34:05 +0000 |
121 | +++ src/platforms/android/utils/test_android_hardware_sanity.cpp 2016-09-19 09:16:51 +0000 |
122 | @@ -281,7 +281,7 @@ |
123 | std::make_shared<BasicRenderable>(buffer) |
124 | }; |
125 | |
126 | - db.post_renderables_if_optimizable(list); |
127 | + db.overlay(list); |
128 | }); |
129 | group.post(); |
130 | }); |
131 | |
132 | === modified file 'src/platforms/eglstream-kms/server/display.cpp' |
133 | --- src/platforms/eglstream-kms/server/display.cpp 2016-08-01 09:37:45 +0000 |
134 | +++ src/platforms/eglstream-kms/server/display.cpp 2016-09-19 09:16:51 +0000 |
135 | @@ -195,7 +195,7 @@ |
136 | return view_area_; |
137 | } |
138 | |
139 | - bool post_renderables_if_optimizable(const mir::graphics::RenderableList& /*renderlist*/) override |
140 | + bool overlay(const mir::graphics::RenderableList& /*renderlist*/) override |
141 | { |
142 | return false; |
143 | } |
144 | |
145 | === modified file 'src/platforms/mesa/server/kms/display_buffer.cpp' |
146 | --- src/platforms/mesa/server/kms/display_buffer.cpp 2016-09-16 15:18:36 +0000 |
147 | +++ src/platforms/mesa/server/kms/display_buffer.cpp 2016-09-19 09:16:51 +0000 |
148 | @@ -198,7 +198,7 @@ |
149 | area = a; |
150 | } |
151 | |
152 | -bool mgm::DisplayBuffer::post_renderables_if_optimizable(RenderableList const& renderable_list) |
153 | +bool mgm::DisplayBuffer::overlay(RenderableList const& renderable_list) |
154 | { |
155 | if ((rotation == mir_orientation_normal) && |
156 | (bypass_option == mgm::BypassOption::allowed)) |
157 | |
158 | === modified file 'src/platforms/mesa/server/kms/display_buffer.h' |
159 | --- src/platforms/mesa/server/kms/display_buffer.h 2016-05-03 06:55:25 +0000 |
160 | +++ src/platforms/mesa/server/kms/display_buffer.h 2016-09-19 09:16:51 +0000 |
161 | @@ -66,7 +66,7 @@ |
162 | void make_current() override; |
163 | void release_current() override; |
164 | void swap_buffers() override; |
165 | - bool post_renderables_if_optimizable(RenderableList const& renderlist) override; |
166 | + bool overlay(RenderableList const& renderlist) override; |
167 | void bind() override; |
168 | |
169 | void for_each_display_buffer( |
170 | |
171 | === modified file 'src/platforms/mesa/server/x11/graphics/display_buffer.cpp' |
172 | --- src/platforms/mesa/server/x11/graphics/display_buffer.cpp 2016-09-09 08:04:25 +0000 |
173 | +++ src/platforms/mesa/server/x11/graphics/display_buffer.cpp 2016-09-19 09:16:51 +0000 |
174 | @@ -66,7 +66,7 @@ |
175 | BOOST_THROW_EXCEPTION(mg::egl_error("Cannot make uncurrent")); |
176 | } |
177 | |
178 | -bool mgx::DisplayBuffer::post_renderables_if_optimizable(RenderableList const& /*renderlist*/) |
179 | +bool mgx::DisplayBuffer::overlay(RenderableList const& /*renderlist*/) |
180 | { |
181 | return false; |
182 | } |
183 | |
184 | === modified file 'src/platforms/mesa/server/x11/graphics/display_buffer.h' |
185 | --- src/platforms/mesa/server/x11/graphics/display_buffer.h 2016-09-07 03:37:03 +0000 |
186 | +++ src/platforms/mesa/server/x11/graphics/display_buffer.h 2016-09-19 09:16:51 +0000 |
187 | @@ -53,7 +53,7 @@ |
188 | void release_current() override; |
189 | void swap_buffers() override; |
190 | void bind() override; |
191 | - bool post_renderables_if_optimizable(RenderableList const& renderlist) override; |
192 | + bool overlay(RenderableList const& renderlist) override; |
193 | void set_orientation(MirOrientation const new_orientation); |
194 | |
195 | MirOrientation orientation() const override; |
196 | |
197 | === modified file 'src/server/compositor/default_display_buffer_compositor.cpp' |
198 | --- src/server/compositor/default_display_buffer_compositor.cpp 2016-08-26 19:01:27 +0000 |
199 | +++ src/server/compositor/default_display_buffer_compositor.cpp 2016-09-19 09:16:51 +0000 |
200 | @@ -72,7 +72,7 @@ |
201 | */ |
202 | scene_elements.clear(); // Those in use are still in renderable_list |
203 | |
204 | - if (display_buffer.post_renderables_if_optimizable(renderable_list)) |
205 | + if (display_buffer.overlay(renderable_list)) |
206 | { |
207 | report->renderables_in_frame(this, renderable_list); |
208 | renderer->suspend(); |
209 | |
210 | === modified file 'src/server/compositor/screencast_display_buffer.cpp' |
211 | --- src/server/compositor/screencast_display_buffer.cpp 2016-07-28 09:10:43 +0000 |
212 | +++ src/server/compositor/screencast_display_buffer.cpp 2016-09-19 09:16:51 +0000 |
213 | @@ -153,7 +153,7 @@ |
214 | gl_context->release_current(); |
215 | } |
216 | |
217 | -bool mc::ScreencastDisplayBuffer::post_renderables_if_optimizable(mg::RenderableList const&) |
218 | +bool mc::ScreencastDisplayBuffer::overlay(mg::RenderableList const&) |
219 | { |
220 | return false; |
221 | } |
222 | |
223 | === modified file 'src/server/compositor/screencast_display_buffer.h' |
224 | --- src/server/compositor/screencast_display_buffer.h 2016-07-28 09:10:43 +0000 |
225 | +++ src/server/compositor/screencast_display_buffer.h 2016-09-19 09:16:51 +0000 |
226 | @@ -108,7 +108,7 @@ |
227 | |
228 | void release_current() override; |
229 | |
230 | - bool post_renderables_if_optimizable(graphics::RenderableList const&) override; |
231 | + bool overlay(graphics::RenderableList const&) override; |
232 | |
233 | void swap_buffers() override; |
234 | |
235 | |
236 | === modified file 'src/server/graphics/nested/display_buffer.cpp' |
237 | --- src/server/graphics/nested/display_buffer.cpp 2016-08-25 13:34:29 +0000 |
238 | +++ src/server/graphics/nested/display_buffer.cpp 2016-09-19 09:16:51 +0000 |
239 | @@ -97,7 +97,7 @@ |
240 | { |
241 | } |
242 | |
243 | -bool mgn::detail::DisplayBuffer::post_renderables_if_optimizable(RenderableList const&) |
244 | +bool mgn::detail::DisplayBuffer::overlay(RenderableList const&) |
245 | { |
246 | return false; |
247 | } |
248 | |
249 | === modified file 'src/server/graphics/nested/display_buffer.h' |
250 | --- src/server/graphics/nested/display_buffer.h 2016-08-25 12:58:00 +0000 |
251 | +++ src/server/graphics/nested/display_buffer.h 2016-09-19 09:16:51 +0000 |
252 | @@ -58,7 +58,7 @@ |
253 | MirOrientation orientation() const override; |
254 | MirMirrorMode mirror_mode() const override; |
255 | |
256 | - bool post_renderables_if_optimizable(RenderableList const& renderlist) override; |
257 | + bool overlay(RenderableList const& renderlist) override; |
258 | |
259 | NativeDisplayBuffer* native_display_buffer() override; |
260 | |
261 | |
262 | === modified file 'tests/acceptance-tests/test_latency.cpp' |
263 | --- tests/acceptance-tests/test_latency.cpp 2016-08-26 16:52:19 +0000 |
264 | +++ tests/acceptance-tests/test_latency.cpp 2016-09-19 09:16:51 +0000 |
265 | @@ -129,7 +129,7 @@ |
266 | return {{0,0}, {1920, 1080}}; |
267 | } |
268 | |
269 | - bool post_renderables_if_optimizable(mg::RenderableList const& renderables) override |
270 | + bool overlay(mg::RenderableList const& renderables) override |
271 | { |
272 | //the surface will be the frontmost of the renderables |
273 | if (!renderables.empty()) |
274 | |
275 | === modified file 'tests/include/mir/test/doubles/mock_display_buffer.h' |
276 | --- tests/include/mir/test/doubles/mock_display_buffer.h 2016-05-03 06:55:25 +0000 |
277 | +++ tests/include/mir/test/doubles/mock_display_buffer.h 2016-09-19 09:16:51 +0000 |
278 | @@ -43,7 +43,7 @@ |
279 | .WillByDefault(Return(this)); |
280 | } |
281 | MOCK_CONST_METHOD0(view_area, geometry::Rectangle()); |
282 | - MOCK_METHOD1(post_renderables_if_optimizable, bool(graphics::RenderableList const&)); |
283 | + MOCK_METHOD1(overlay, bool(graphics::RenderableList const&)); |
284 | MOCK_CONST_METHOD0(orientation, MirOrientation()); |
285 | MOCK_CONST_METHOD0(mirror_mode, MirMirrorMode()); |
286 | MOCK_METHOD0(native_display_buffer, graphics::NativeDisplayBuffer*()); |
287 | |
288 | === modified file 'tests/mir_test_framework/headless_display_buffer_compositor_factory.cpp' |
289 | --- tests/mir_test_framework/headless_display_buffer_compositor_factory.cpp 2016-09-16 15:18:36 +0000 |
290 | +++ tests/mir_test_framework/headless_display_buffer_compositor_factory.cpp 2016-09-19 09:16:51 +0000 |
291 | @@ -72,7 +72,7 @@ |
292 | void composite(mir::compositor::SceneElementSequence&& seq) override |
293 | { |
294 | auto renderlist = filter(seq, db.view_area()); |
295 | - if (db.post_renderables_if_optimizable(renderlist)) |
296 | + if (db.overlay(renderlist)) |
297 | return; |
298 | |
299 | // Invoke GL renderer specific functions if the DisplayBuffer supports them |
300 | |
301 | === modified file 'tests/unit-tests/compositor/test_default_display_buffer_compositor.cpp' |
302 | --- tests/unit-tests/compositor/test_default_display_buffer_compositor.cpp 2016-08-01 14:43:19 +0000 |
303 | +++ tests/unit-tests/compositor/test_default_display_buffer_compositor.cpp 2016-09-19 09:16:51 +0000 |
304 | @@ -104,7 +104,7 @@ |
305 | .WillByDefault(Return(mir_mirror_mode_none)); |
306 | ON_CALL(display_buffer, view_area()) |
307 | .WillByDefault(Return(screen)); |
308 | - ON_CALL(display_buffer, post_renderables_if_optimizable(_)) |
309 | + ON_CALL(display_buffer, overlay(_)) |
310 | .WillByDefault(Return(false)); |
311 | } |
312 | |
313 | @@ -140,7 +140,7 @@ |
314 | Sequence seq; |
315 | EXPECT_CALL(*report, began_frame(_)) |
316 | .InSequence(seq); |
317 | - EXPECT_CALL(display_buffer, post_renderables_if_optimizable(_)) |
318 | + EXPECT_CALL(display_buffer, overlay(_)) |
319 | .InSequence(seq) |
320 | .WillOnce(Return(true)); |
321 | EXPECT_CALL(*report, renderables_in_frame(_,_)) |
322 | @@ -170,7 +170,7 @@ |
323 | Sequence seq; |
324 | EXPECT_CALL(*report, began_frame(_)) |
325 | .InSequence(seq); |
326 | - EXPECT_CALL(display_buffer, post_renderables_if_optimizable(_)) |
327 | + EXPECT_CALL(display_buffer, overlay(_)) |
328 | .InSequence(seq) |
329 | .WillOnce(Return(false)); |
330 | EXPECT_CALL(*report, renderables_in_frame(_,_)) |
331 | @@ -227,7 +227,7 @@ |
332 | .WillByDefault(Return(mir_mirror_mode_none)); |
333 | |
334 | Sequence seq; |
335 | - EXPECT_CALL(display_buffer, post_renderables_if_optimizable(_)) |
336 | + EXPECT_CALL(display_buffer, overlay(_)) |
337 | .InSequence(seq) |
338 | .WillOnce(Return(false)); |
339 | |
340 | @@ -238,12 +238,12 @@ |
341 | EXPECT_CALL(mock_renderer, render(IsEmpty())) |
342 | .InSequence(seq); |
343 | |
344 | - EXPECT_CALL(display_buffer, post_renderables_if_optimizable(_)) |
345 | + EXPECT_CALL(display_buffer, overlay(_)) |
346 | .InSequence(seq) |
347 | .WillOnce(Return(true)); |
348 | //we should be testing that post_buffer is called, not just that |
349 | //we check the bits on the compositor buffer |
350 | - EXPECT_CALL(display_buffer, post_renderables_if_optimizable(_)) |
351 | + EXPECT_CALL(display_buffer, overlay(_)) |
352 | .InSequence(seq) |
353 | .WillOnce(Return(false)); |
354 | EXPECT_CALL(display_buffer, orientation()) |
355 | @@ -274,7 +274,7 @@ |
356 | .WillOnce(Return(mir_orientation_normal)); |
357 | EXPECT_CALL(display_buffer, mirror_mode()) |
358 | .WillOnce(Return(mir_mirror_mode_none)); |
359 | - EXPECT_CALL(display_buffer, post_renderables_if_optimizable(_)) |
360 | + EXPECT_CALL(display_buffer, overlay(_)) |
361 | .WillRepeatedly(Return(false)); |
362 | |
363 | auto window0 = std::make_shared<mtd::FakeRenderable>(geom::Rectangle{{99,99},{2,2}}); |
364 | |
365 | === modified file 'tests/unit-tests/compositor/test_screencast_display_buffer.cpp' |
366 | --- tests/unit-tests/compositor/test_screencast_display_buffer.cpp 2016-04-22 02:39:57 +0000 |
367 | +++ tests/unit-tests/compositor/test_screencast_display_buffer.cpp 2016-09-19 09:16:51 +0000 |
368 | @@ -169,7 +169,7 @@ |
369 | default_mirror_mode, free_queue, |
370 | ready_queue, stub_display}; |
371 | |
372 | - EXPECT_FALSE(db.post_renderables_if_optimizable(renderables)); |
373 | + EXPECT_FALSE(db.overlay(renderables)); |
374 | } |
375 | |
376 | TEST_F(ScreencastDisplayBufferTest, does_not_throw_on_multiple_make_current_calls) |
377 | |
378 | === modified file 'tests/unit-tests/platforms/android/server/test_display.cpp' |
379 | --- tests/unit-tests/platforms/android/server/test_display.cpp 2016-08-24 02:09:08 +0000 |
380 | +++ tests/unit-tests/platforms/android/server/test_display.cpp 2016-09-19 09:16:51 +0000 |
381 | @@ -1033,7 +1033,7 @@ |
382 | |
383 | display.for_each_display_sync_group([](mg::DisplaySyncGroup& group) { |
384 | group.for_each_display_buffer([](mg::DisplayBuffer& db) { |
385 | - EXPECT_FALSE(db.post_renderables_if_optimizable({std::make_shared<mtd::StubRenderable>()})); |
386 | + EXPECT_FALSE(db.overlay({std::make_shared<mtd::StubRenderable>()})); |
387 | }); |
388 | }); |
389 | } |
390 | |
391 | === modified file 'tests/unit-tests/platforms/android/server/test_display_buffer.cpp' |
392 | --- tests/unit-tests/platforms/android/server/test_display_buffer.cpp 2016-08-24 02:09:08 +0000 |
393 | +++ tests/unit-tests/platforms/android/server/test_display_buffer.cpp 2016-09-19 09:16:51 +0000 |
394 | @@ -105,8 +105,8 @@ |
395 | .WillOnce(Return(true)) |
396 | .WillOnce(Return(false)); |
397 | |
398 | - EXPECT_TRUE(db.post_renderables_if_optimizable(renderlist)); |
399 | - EXPECT_FALSE(db.post_renderables_if_optimizable(renderlist)); |
400 | + EXPECT_TRUE(db.overlay(renderlist)); |
401 | + EXPECT_FALSE(db.overlay(renderlist)); |
402 | } |
403 | |
404 | TEST_F(DisplayBuffer, defaults_to_normal_orientation) |
405 | @@ -287,7 +287,7 @@ |
406 | top_left, |
407 | mga::OverlayOptimization::disabled); |
408 | |
409 | - EXPECT_FALSE(db.post_renderables_if_optimizable(renderlist)); |
410 | + EXPECT_FALSE(db.overlay(renderlist)); |
411 | } |
412 | |
413 | TEST_F(DisplayBuffer, rejects_commit_if_list_doesnt_need_commit) |
414 | @@ -313,19 +313,19 @@ |
415 | }; |
416 | |
417 | mg::RenderableList renderlist{buffer1, buffer2}; |
418 | - EXPECT_TRUE(db.post_renderables_if_optimizable(renderlist)); |
419 | + EXPECT_TRUE(db.overlay(renderlist)); |
420 | set_to_overlays(db.contents().list); |
421 | - EXPECT_FALSE(db.post_renderables_if_optimizable(renderlist)); |
422 | + EXPECT_FALSE(db.overlay(renderlist)); |
423 | |
424 | renderlist = mg::RenderableList{buffer2, buffer1}; //ordering changed |
425 | - EXPECT_TRUE(db.post_renderables_if_optimizable(renderlist)); |
426 | + EXPECT_TRUE(db.overlay(renderlist)); |
427 | set_to_overlays(db.contents().list); |
428 | - EXPECT_FALSE(db.post_renderables_if_optimizable(renderlist)); |
429 | + EXPECT_FALSE(db.overlay(renderlist)); |
430 | |
431 | renderlist = mg::RenderableList{buffer3, buffer1}; //buffer changed |
432 | - EXPECT_TRUE(db.post_renderables_if_optimizable(renderlist)); |
433 | + EXPECT_TRUE(db.overlay(renderlist)); |
434 | set_to_overlays(db.contents().list); |
435 | - EXPECT_FALSE(db.post_renderables_if_optimizable(renderlist)); |
436 | + EXPECT_FALSE(db.overlay(renderlist)); |
437 | } |
438 | |
439 | TEST_F(DisplayBuffer, reports_position_correctly) |
440 | @@ -351,7 +351,7 @@ |
441 | std::make_shared<mtd::StubBuffer>(std::make_shared<mtd::StubAndroidNativeBuffer>()))}; |
442 | |
443 | db.configure(mir_power_mode_on, mir_orientation_inverted, geom::Displacement{0,0}); |
444 | - EXPECT_FALSE(db.post_renderables_if_optimizable(renderlist)); |
445 | + EXPECT_FALSE(db.overlay(renderlist)); |
446 | db.configure(mir_power_mode_on, mir_orientation_normal, geom::Displacement{0,0}); |
447 | - EXPECT_TRUE(db.post_renderables_if_optimizable(renderlist)); |
448 | + EXPECT_TRUE(db.overlay(renderlist)); |
449 | } |
450 | |
451 | === modified file 'tests/unit-tests/platforms/android/server/test_display_group.cpp' |
452 | --- tests/unit-tests/platforms/android/server/test_display_group.cpp 2016-08-24 02:09:08 +0000 |
453 | +++ tests/unit-tests/platforms/android/server/test_display_group.cpp 2016-09-19 09:16:51 +0000 |
454 | @@ -35,7 +35,7 @@ |
455 | struct StubConfigurableDB : mga::ConfigurableDisplayBuffer, mg::NativeDisplayBuffer |
456 | { |
457 | mir::geometry::Rectangle view_area() const override { return {}; } |
458 | - bool post_renderables_if_optimizable(mg::RenderableList const&) override { return false; } |
459 | + bool overlay(mg::RenderableList const&) override { return false; } |
460 | MirOrientation orientation() const override { return mir_orientation_normal; } |
461 | MirMirrorMode mirror_mode() const override { return mir_mirror_mode_none; } |
462 | mg::NativeDisplayBuffer* native_display_buffer() override { return this; } |
463 | |
464 | === modified file 'tests/unit-tests/platforms/mesa/kms/test_display_buffer.cpp' |
465 | --- tests/unit-tests/platforms/mesa/kms/test_display_buffer.cpp 2016-09-16 15:18:36 +0000 |
466 | +++ tests/unit-tests/platforms/mesa/kms/test_display_buffer.cpp 2016-09-19 09:16:51 +0000 |
467 | @@ -164,7 +164,7 @@ |
468 | |
469 | auto original_count = mock_bypassable_buffer.use_count(); |
470 | |
471 | - EXPECT_TRUE(db.post_renderables_if_optimizable(bypassable_list)); |
472 | + EXPECT_TRUE(db.overlay(bypassable_list)); |
473 | EXPECT_EQ(original_count+1, mock_bypassable_buffer.use_count()); |
474 | |
475 | // Switch back to normal compositing |
476 | @@ -192,7 +192,7 @@ |
477 | |
478 | for (int frame = 0; frame < 5; ++frame) |
479 | { |
480 | - ASSERT_TRUE(db.post_renderables_if_optimizable(bypassable_list)); |
481 | + ASSERT_TRUE(db.overlay(bypassable_list)); |
482 | db.post(); |
483 | |
484 | // Cast to a simple int type so that test failures are readable |
485 | @@ -222,7 +222,7 @@ |
486 | |
487 | for (int frame = 0; frame < 5; ++frame) |
488 | { |
489 | - ASSERT_FALSE(db.post_renderables_if_optimizable(non_bypassable_list)); |
490 | + ASSERT_FALSE(db.overlay(non_bypassable_list)); |
491 | db.post(); |
492 | |
493 | // Cast to a simple int type so that test failures are readable |
494 | @@ -246,7 +246,7 @@ |
495 | |
496 | auto original_count = mock_bypassable_buffer.use_count(); |
497 | |
498 | - EXPECT_TRUE(db.post_renderables_if_optimizable(bypassable_list)); |
499 | + EXPECT_TRUE(db.overlay(bypassable_list)); |
500 | EXPECT_EQ(original_count+1, mock_bypassable_buffer.use_count()); |
501 | |
502 | db.post(); |
503 | @@ -269,7 +269,7 @@ |
504 | gl_config, |
505 | mock_egl.fake_egl_context); |
506 | |
507 | - EXPECT_TRUE(db.post_renderables_if_optimizable(bypassable_list)); |
508 | + EXPECT_TRUE(db.overlay(bypassable_list)); |
509 | } |
510 | |
511 | TEST_F(MesaDisplayBufferTest, failed_bypass_falls_back_gracefully) |
512 | @@ -291,9 +291,9 @@ |
513 | gl_config, |
514 | mock_egl.fake_egl_context); |
515 | |
516 | - EXPECT_FALSE(db.post_renderables_if_optimizable(bypassable_list)); |
517 | + EXPECT_FALSE(db.overlay(bypassable_list)); |
518 | // And then we recover. DRM finds enough resources to AddFB ... |
519 | - EXPECT_TRUE(db.post_renderables_if_optimizable(bypassable_list)); |
520 | + EXPECT_TRUE(db.overlay(bypassable_list)); |
521 | } |
522 | |
523 | TEST_F(MesaDisplayBufferTest, skips_bypass_because_of_lagging_resize) |
524 | @@ -320,7 +320,7 @@ |
525 | gl_config, |
526 | mock_egl.fake_egl_context); |
527 | |
528 | - EXPECT_FALSE(db.post_renderables_if_optimizable(list)); |
529 | + EXPECT_FALSE(db.overlay(list)); |
530 | } |
531 | |
532 | TEST_F(MesaDisplayBufferTest, rotated_cannot_bypass) |
533 | @@ -337,7 +337,7 @@ |
534 | gl_config, |
535 | mock_egl.fake_egl_context); |
536 | |
537 | - EXPECT_FALSE(db.post_renderables_if_optimizable(bypassable_list)); |
538 | + EXPECT_FALSE(db.overlay(bypassable_list)); |
539 | } |
540 | |
541 | TEST_F(MesaDisplayBufferTest, fullscreen_software_buffer_cannot_bypass) |
542 | @@ -359,7 +359,7 @@ |
543 | gl_config, |
544 | mock_egl.fake_egl_context); |
545 | |
546 | - EXPECT_FALSE(db.post_renderables_if_optimizable(list)); |
547 | + EXPECT_FALSE(db.overlay(list)); |
548 | } |
549 | |
550 | TEST_F(MesaDisplayBufferTest, fullscreen_software_buffer_not_used_as_gbm_bo) |
551 | @@ -384,7 +384,7 @@ |
552 | // If you find yourself using gbm_ functions on a Shm buffer then you're |
553 | // asking for a crash (LP: #1493721) ... |
554 | EXPECT_CALL(mock_gbm, gbm_bo_get_user_data(_)).Times(0); |
555 | - db.post_renderables_if_optimizable(list); |
556 | + db.overlay(list); |
557 | } |
558 | |
559 | TEST_F(MesaDisplayBufferTest, orientation_not_implemented_internally) |
560 | @@ -585,7 +585,7 @@ |
561 | gl_config, |
562 | mock_egl.fake_egl_context); |
563 | |
564 | - EXPECT_FALSE(db.post_renderables_if_optimizable(list)); |
565 | + EXPECT_FALSE(db.overlay(list)); |
566 | } |
567 | |
568 | TEST_F(MesaDisplayBufferTest, skips_bypass_because_of_incompatible_bypass_buffer) |
569 | @@ -614,6 +614,6 @@ |
570 | gl_config, |
571 | mock_egl.fake_egl_context); |
572 | |
573 | - EXPECT_FALSE(db.post_renderables_if_optimizable(list)); |
574 | + EXPECT_FALSE(db.overlay(list)); |
575 | } |
576 |
PASSED: Continuous integration, rev:3707 /mir-jenkins. ubuntu. com/job/ mir-ci/ 1743/ /mir-jenkins. ubuntu. com/job/ build-mir/ 2183 /mir-jenkins. ubuntu. com/job/ build-0- fetch/2246 /mir-jenkins. ubuntu. com/job/ build-1- sourcepkg/ release= vivid+overlay/ 2237 /mir-jenkins. ubuntu. com/job/ build-1- sourcepkg/ release= xenial+ overlay/ 2237 /mir-jenkins. ubuntu. com/job/ build-1- sourcepkg/ release= yakkety/ 2237 /mir-jenkins. ubuntu. com/job/ build-2- binpkg- mir/arch= amd64,compiler= clang,platform= mesa,release= yakkety/ 2211 /mir-jenkins. ubuntu. com/job/ build-2- binpkg- mir/arch= amd64,compiler= clang,platform= mesa,release= yakkety/ 2211/artifact/ output/ *zip*/output. zip /mir-jenkins. ubuntu. com/job/ build-2- binpkg- mir/arch= amd64,compiler= gcc,platform= mesa,release= xenial+ overlay/ 2211 /mir-jenkins. ubuntu. com/job/ build-2- binpkg- mir/arch= amd64,compiler= gcc,platform= mesa,release= xenial+ overlay/ 2211/artifact/ output/ *zip*/output. zip /mir-jenkins. ubuntu. com/job/ build-2- binpkg- mir/arch= amd64,compiler= gcc,platform= mesa,release= yakkety/ 2211 /mir-jenkins. ubuntu. com/job/ build-2- binpkg- mir/arch= amd64,compiler= gcc,platform= mesa,release= yakkety/ 2211/artifact/ output/ *zip*/output. zip /mir-jenkins. ubuntu. com/job/ build-2- binpkg- mir/arch= i386,compiler= gcc,platform= android, release= vivid+overlay/ 2211 /mir-jenkins. ubuntu. com/job/ build-2- binpkg- mir/arch= i386,compiler= gcc,platform= android, release= vivid+overlay/ 2211/artifact/ output/ *zip*/output. zip /mir-jenkins. ubuntu. com/job/ build-2- binpkg- mir/arch= i386,compiler= gcc,platform= mesa,release= xenial+ overlay/ 2211 /mir-jenkins. ubuntu. com/job/ build-2- binpkg- mir/arch= i386,compiler= gcc,platform= mesa,release= xenial+ overlay/ 2211/artifact/ output/ *zip*/output. zip
https:/
Executed test runs:
SUCCESS: https:/
SUCCESS: https:/
SUCCESS: https:/
SUCCESS: https:/
SUCCESS: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
Click here to trigger a rebuild: /mir-jenkins. ubuntu. com/job/ mir-ci/ 1743/rebuild
https:/