Mir

Merge lp:~vanvugt/mir/overlay-terminology-is-awkward into lp:mir

Proposed by Daniel van Vugt
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
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_renderables_if_optimizable' to something less vague
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.

To post a comment you must log in.
Revision history for this message
Mir CI Bot (mir-ci-bot) wrote :

PASSED: Continuous integration, rev:3707
https://mir-jenkins.ubuntu.com/job/mir-ci/1743/
Executed test runs:
    SUCCESS: https://mir-jenkins.ubuntu.com/job/build-mir/2183
    SUCCESS: https://mir-jenkins.ubuntu.com/job/build-0-fetch/2246
    SUCCESS: https://mir-jenkins.ubuntu.com/job/build-1-sourcepkg/release=vivid+overlay/2237
    SUCCESS: https://mir-jenkins.ubuntu.com/job/build-1-sourcepkg/release=xenial+overlay/2237
    SUCCESS: https://mir-jenkins.ubuntu.com/job/build-1-sourcepkg/release=yakkety/2237
    SUCCESS: https://mir-jenkins.ubuntu.com/job/build-2-binpkg-mir/arch=amd64,compiler=clang,platform=mesa,release=yakkety/2211
        deb: https://mir-jenkins.ubuntu.com/job/build-2-binpkg-mir/arch=amd64,compiler=clang,platform=mesa,release=yakkety/2211/artifact/output/*zip*/output.zip
    SUCCESS: https://mir-jenkins.ubuntu.com/job/build-2-binpkg-mir/arch=amd64,compiler=gcc,platform=mesa,release=xenial+overlay/2211
        deb: https://mir-jenkins.ubuntu.com/job/build-2-binpkg-mir/arch=amd64,compiler=gcc,platform=mesa,release=xenial+overlay/2211/artifact/output/*zip*/output.zip
    SUCCESS: https://mir-jenkins.ubuntu.com/job/build-2-binpkg-mir/arch=amd64,compiler=gcc,platform=mesa,release=yakkety/2211
        deb: https://mir-jenkins.ubuntu.com/job/build-2-binpkg-mir/arch=amd64,compiler=gcc,platform=mesa,release=yakkety/2211/artifact/output/*zip*/output.zip
    SUCCESS: https://mir-jenkins.ubuntu.com/job/build-2-binpkg-mir/arch=i386,compiler=gcc,platform=android,release=vivid+overlay/2211
        deb: https://mir-jenkins.ubuntu.com/job/build-2-binpkg-mir/arch=i386,compiler=gcc,platform=android,release=vivid+overlay/2211/artifact/output/*zip*/output.zip
    SUCCESS: https://mir-jenkins.ubuntu.com/job/build-2-binpkg-mir/arch=i386,compiler=gcc,platform=mesa,release=xenial+overlay/2211
        deb: https://mir-jenkins.ubuntu.com/job/build-2-binpkg-mir/arch=i386,compiler=gcc,platform=mesa,release=xenial+overlay/2211/artifact/output/*zip*/output.zip

Click here to trigger a rebuild:
https://mir-jenkins.ubuntu.com/job/mir-ci/1743/rebuild

review: Approve (continuous-integration)
Revision history for this message
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_display_buffer() mechanism, but that can be for later.

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.

review: Needs Fixing
Revision history for this message
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_buffer->overlay(the_lot))
{
   renderer->render(some)
   display_buffer->overlay(the_rest)
}

Remember "overlay" is a verb more often than it's a noun, so the "set_" prefix is unnecessary.

Revision history for this message
Mir CI Bot (mir-ci-bot) wrote :

PASSED: Continuous integration, rev:3709
https://mir-jenkins.ubuntu.com/job/mir-ci/1748/
Executed test runs:
    SUCCESS: https://mir-jenkins.ubuntu.com/job/build-mir/2190
    SUCCESS: https://mir-jenkins.ubuntu.com/job/build-0-fetch/2253
    SUCCESS: https://mir-jenkins.ubuntu.com/job/build-1-sourcepkg/release=vivid+overlay/2244
    SUCCESS: https://mir-jenkins.ubuntu.com/job/build-1-sourcepkg/release=xenial+overlay/2244
    SUCCESS: https://mir-jenkins.ubuntu.com/job/build-1-sourcepkg/release=yakkety/2244
    SUCCESS: https://mir-jenkins.ubuntu.com/job/build-2-binpkg-mir/arch=amd64,compiler=clang,platform=mesa,release=yakkety/2218
        deb: https://mir-jenkins.ubuntu.com/job/build-2-binpkg-mir/arch=amd64,compiler=clang,platform=mesa,release=yakkety/2218/artifact/output/*zip*/output.zip
    SUCCESS: https://mir-jenkins.ubuntu.com/job/build-2-binpkg-mir/arch=amd64,compiler=gcc,platform=mesa,release=xenial+overlay/2218
        deb: https://mir-jenkins.ubuntu.com/job/build-2-binpkg-mir/arch=amd64,compiler=gcc,platform=mesa,release=xenial+overlay/2218/artifact/output/*zip*/output.zip
    SUCCESS: https://mir-jenkins.ubuntu.com/job/build-2-binpkg-mir/arch=amd64,compiler=gcc,platform=mesa,release=yakkety/2218
        deb: https://mir-jenkins.ubuntu.com/job/build-2-binpkg-mir/arch=amd64,compiler=gcc,platform=mesa,release=yakkety/2218/artifact/output/*zip*/output.zip
    SUCCESS: https://mir-jenkins.ubuntu.com/job/build-2-binpkg-mir/arch=i386,compiler=gcc,platform=android,release=vivid+overlay/2218
        deb: https://mir-jenkins.ubuntu.com/job/build-2-binpkg-mir/arch=i386,compiler=gcc,platform=android,release=vivid+overlay/2218/artifact/output/*zip*/output.zip
    SUCCESS: https://mir-jenkins.ubuntu.com/job/build-2-binpkg-mir/arch=i386,compiler=gcc,platform=mesa,release=xenial+overlay/2218
        deb: https://mir-jenkins.ubuntu.com/job/build-2-binpkg-mir/arch=i386,compiler=gcc,platform=mesa,release=xenial+overlay/2218/artifact/output/*zip*/output.zip

Click here to trigger a rebuild:
https://mir-jenkins.ubuntu.com/job/mir-ci/1748/rebuild

review: Approve (continuous-integration)
Revision history for this message
Daniel van Vugt (vanvugt) wrote :

Or rather in future it would be nice to have:

if (!display_buffer->overlay(the_lot))
{
   renderer->render(some) // minus video and cursor layers
   if (!display_buffer->overlay(the_rest))
       renderer->render(the_rest)
}

Revision history for this message
Mir CI Bot (mir-ci-bot) wrote :

FAILED: Continuous integration, rev:3710
https://mir-jenkins.ubuntu.com/job/mir-ci/1750/
Executed test runs:
    FAILURE: https://mir-jenkins.ubuntu.com/job/build-mir/2193/console
    SUCCESS: https://mir-jenkins.ubuntu.com/job/build-0-fetch/2256
    SUCCESS: https://mir-jenkins.ubuntu.com/job/build-1-sourcepkg/release=vivid+overlay/2247
    SUCCESS: https://mir-jenkins.ubuntu.com/job/build-1-sourcepkg/release=xenial+overlay/2247
    SUCCESS: https://mir-jenkins.ubuntu.com/job/build-1-sourcepkg/release=yakkety/2247
    SUCCESS: https://mir-jenkins.ubuntu.com/job/build-2-binpkg-mir/arch=amd64,compiler=clang,platform=mesa,release=yakkety/2221
        deb: https://mir-jenkins.ubuntu.com/job/build-2-binpkg-mir/arch=amd64,compiler=clang,platform=mesa,release=yakkety/2221/artifact/output/*zip*/output.zip
    FAILURE: https://mir-jenkins.ubuntu.com/job/build-2-binpkg-mir/arch=amd64,compiler=gcc,platform=mesa,release=xenial+overlay/2221/console
    SUCCESS: https://mir-jenkins.ubuntu.com/job/build-2-binpkg-mir/arch=amd64,compiler=gcc,platform=mesa,release=yakkety/2221
        deb: https://mir-jenkins.ubuntu.com/job/build-2-binpkg-mir/arch=amd64,compiler=gcc,platform=mesa,release=yakkety/2221/artifact/output/*zip*/output.zip
    SUCCESS: https://mir-jenkins.ubuntu.com/job/build-2-binpkg-mir/arch=i386,compiler=gcc,platform=android,release=vivid+overlay/2221
        deb: https://mir-jenkins.ubuntu.com/job/build-2-binpkg-mir/arch=i386,compiler=gcc,platform=android,release=vivid+overlay/2221/artifact/output/*zip*/output.zip
    SUCCESS: https://mir-jenkins.ubuntu.com/job/build-2-binpkg-mir/arch=i386,compiler=gcc,platform=mesa,release=xenial+overlay/2221
        deb: https://mir-jenkins.ubuntu.com/job/build-2-binpkg-mir/arch=i386,compiler=gcc,platform=mesa,release=xenial+overlay/2221/artifact/output/*zip*/output.zip

Click here to trigger a rebuild:
https://mir-jenkins.ubuntu.com/job/mir-ci/1750/rebuild

review: Needs Fixing (continuous-integration)
Revision history for this message
Daniel van Vugt (vanvugt) wrote :
Revision history for this message
Mir CI Bot (mir-ci-bot) wrote :

FAILED: Continuous integration, rev:3711
https://mir-jenkins.ubuntu.com/job/mir-ci/1752/
Executed test runs:
    FAILURE: https://mir-jenkins.ubuntu.com/job/build-mir/2196/console
    SUCCESS: https://mir-jenkins.ubuntu.com/job/build-0-fetch/2259
    SUCCESS: https://mir-jenkins.ubuntu.com/job/build-1-sourcepkg/release=vivid+overlay/2250
    SUCCESS: https://mir-jenkins.ubuntu.com/job/build-1-sourcepkg/release=xenial+overlay/2250
    SUCCESS: https://mir-jenkins.ubuntu.com/job/build-1-sourcepkg/release=yakkety/2250
    SUCCESS: https://mir-jenkins.ubuntu.com/job/build-2-binpkg-mir/arch=amd64,compiler=clang,platform=mesa,release=yakkety/2224
        deb: https://mir-jenkins.ubuntu.com/job/build-2-binpkg-mir/arch=amd64,compiler=clang,platform=mesa,release=yakkety/2224/artifact/output/*zip*/output.zip
    FAILURE: https://mir-jenkins.ubuntu.com/job/build-2-binpkg-mir/arch=amd64,compiler=gcc,platform=mesa,release=xenial+overlay/2224/console
    SUCCESS: https://mir-jenkins.ubuntu.com/job/build-2-binpkg-mir/arch=amd64,compiler=gcc,platform=mesa,release=yakkety/2224
        deb: https://mir-jenkins.ubuntu.com/job/build-2-binpkg-mir/arch=amd64,compiler=gcc,platform=mesa,release=yakkety/2224/artifact/output/*zip*/output.zip
    SUCCESS: https://mir-jenkins.ubuntu.com/job/build-2-binpkg-mir/arch=i386,compiler=gcc,platform=android,release=vivid+overlay/2224
        deb: https://mir-jenkins.ubuntu.com/job/build-2-binpkg-mir/arch=i386,compiler=gcc,platform=android,release=vivid+overlay/2224/artifact/output/*zip*/output.zip
    SUCCESS: https://mir-jenkins.ubuntu.com/job/build-2-binpkg-mir/arch=i386,compiler=gcc,platform=mesa,release=xenial+overlay/2224
        deb: https://mir-jenkins.ubuntu.com/job/build-2-binpkg-mir/arch=i386,compiler=gcc,platform=mesa,release=xenial+overlay/2224/artifact/output/*zip*/output.zip

Click here to trigger a rebuild:
https://mir-jenkins.ubuntu.com/job/mir-ci/1752/rebuild

review: Needs Fixing (continuous-integration)
Revision history for this message
Daniel van Vugt (vanvugt) wrote :

^^^
Bug 1624188 back again this week. It had been gone for months/weeks...

Revision history for this message
Mir CI Bot (mir-ci-bot) wrote :

PASSED: Continuous integration, rev:3712
https://mir-jenkins.ubuntu.com/job/mir-ci/1753/
Executed test runs:
    SUCCESS: https://mir-jenkins.ubuntu.com/job/build-mir/2198
    SUCCESS: https://mir-jenkins.ubuntu.com/job/build-0-fetch/2261
    SUCCESS: https://mir-jenkins.ubuntu.com/job/build-1-sourcepkg/release=vivid+overlay/2252
    SUCCESS: https://mir-jenkins.ubuntu.com/job/build-1-sourcepkg/release=xenial+overlay/2252
    SUCCESS: https://mir-jenkins.ubuntu.com/job/build-1-sourcepkg/release=yakkety/2252
    SUCCESS: https://mir-jenkins.ubuntu.com/job/build-2-binpkg-mir/arch=amd64,compiler=clang,platform=mesa,release=yakkety/2226
        deb: https://mir-jenkins.ubuntu.com/job/build-2-binpkg-mir/arch=amd64,compiler=clang,platform=mesa,release=yakkety/2226/artifact/output/*zip*/output.zip
    SUCCESS: https://mir-jenkins.ubuntu.com/job/build-2-binpkg-mir/arch=amd64,compiler=gcc,platform=mesa,release=xenial+overlay/2226
        deb: https://mir-jenkins.ubuntu.com/job/build-2-binpkg-mir/arch=amd64,compiler=gcc,platform=mesa,release=xenial+overlay/2226/artifact/output/*zip*/output.zip
    SUCCESS: https://mir-jenkins.ubuntu.com/job/build-2-binpkg-mir/arch=amd64,compiler=gcc,platform=mesa,release=yakkety/2226
        deb: https://mir-jenkins.ubuntu.com/job/build-2-binpkg-mir/arch=amd64,compiler=gcc,platform=mesa,release=yakkety/2226/artifact/output/*zip*/output.zip
    SUCCESS: https://mir-jenkins.ubuntu.com/job/build-2-binpkg-mir/arch=i386,compiler=gcc,platform=android,release=vivid+overlay/2226
        deb: https://mir-jenkins.ubuntu.com/job/build-2-binpkg-mir/arch=i386,compiler=gcc,platform=android,release=vivid+overlay/2226/artifact/output/*zip*/output.zip
    SUCCESS: https://mir-jenkins.ubuntu.com/job/build-2-binpkg-mir/arch=i386,compiler=gcc,platform=mesa,release=xenial+overlay/2226
        deb: https://mir-jenkins.ubuntu.com/job/build-2-binpkg-mir/arch=i386,compiler=gcc,platform=mesa,release=xenial+overlay/2226/artifact/output/*zip*/output.zip

Click here to trigger a rebuild:
https://mir-jenkins.ubuntu.com/job/mir-ci/1753/rebuild

review: Approve (continuous-integration)
Revision history for this message
Kevin DuBois (kdub) wrote :

I'm alright with just overlay(), lgtm.

review: Approve
Revision history for this message
Cemil Azizoglu (cemil-azizoglu) wrote :

lgtmt

review: Approve
Revision history for this message
Mir CI Bot (mir-ci-bot) wrote :

FAILED: Autolanding.
More details in the following jenkins job:
https://mir-jenkins.ubuntu.com/job/mir-autolanding/600/
Executed test runs:
    SUCCESS: https://mir-jenkins.ubuntu.com/job/build-mir/2201
    FAILURE: https://mir-jenkins.ubuntu.com/job/generic-land-mp/639/console
    None: https://mir-jenkins.ubuntu.com/job/generic-land-mp/640/console
    SUCCESS: https://mir-jenkins.ubuntu.com/job/build-0-fetch/2264
    SUCCESS: https://mir-jenkins.ubuntu.com/job/build-1-sourcepkg/release=vivid+overlay/2255
    SUCCESS: https://mir-jenkins.ubuntu.com/job/build-1-sourcepkg/release=xenial+overlay/2255
    SUCCESS: https://mir-jenkins.ubuntu.com/job/build-1-sourcepkg/release=yakkety/2255
    SUCCESS: https://mir-jenkins.ubuntu.com/job/build-2-binpkg-mir/arch=amd64,compiler=clang,platform=mesa,release=yakkety/2229
        deb: https://mir-jenkins.ubuntu.com/job/build-2-binpkg-mir/arch=amd64,compiler=clang,platform=mesa,release=yakkety/2229/artifact/output/*zip*/output.zip
    SUCCESS: https://mir-jenkins.ubuntu.com/job/build-2-binpkg-mir/arch=amd64,compiler=gcc,platform=mesa,release=xenial+overlay/2229
        deb: https://mir-jenkins.ubuntu.com/job/build-2-binpkg-mir/arch=amd64,compiler=gcc,platform=mesa,release=xenial+overlay/2229/artifact/output/*zip*/output.zip
    SUCCESS: https://mir-jenkins.ubuntu.com/job/build-2-binpkg-mir/arch=amd64,compiler=gcc,platform=mesa,release=yakkety/2229
        deb: https://mir-jenkins.ubuntu.com/job/build-2-binpkg-mir/arch=amd64,compiler=gcc,platform=mesa,release=yakkety/2229/artifact/output/*zip*/output.zip
    SUCCESS: https://mir-jenkins.ubuntu.com/job/build-2-binpkg-mir/arch=i386,compiler=gcc,platform=android,release=vivid+overlay/2229
        deb: https://mir-jenkins.ubuntu.com/job/build-2-binpkg-mir/arch=i386,compiler=gcc,platform=android,release=vivid+overlay/2229/artifact/output/*zip*/output.zip
    SUCCESS: https://mir-jenkins.ubuntu.com/job/build-2-binpkg-mir/arch=i386,compiler=gcc,platform=mesa,release=xenial+overlay/2229
        deb: https://mir-jenkins.ubuntu.com/job/build-2-binpkg-mir/arch=i386,compiler=gcc,platform=mesa,release=xenial+overlay/2229/artifact/output/*zip*/output.zip

review: Needs Fixing (continuous-integration)

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== modified file 'examples/server_example_adorning_compositor.cpp'
--- examples/server_example_adorning_compositor.cpp 2016-06-02 05:33:50 +0000
+++ examples/server_example_adorning_compositor.cpp 2016-09-19 09:16:51 +0000
@@ -183,7 +183,7 @@
183 remove_occlusions_from(scene_sequence, db.view_area());183 remove_occlusions_from(scene_sequence, db.view_area());
184184
185 //note: If what should be drawn is expressible as a SceneElementSequence,185 //note: If what should be drawn is expressible as a SceneElementSequence,
186 // mg::DisplayBuffer::post_renderables_if_optimizable() should be used,186 // mg::DisplayBuffer::overlay() should be used,
187 // to give the the display hardware a chance at an optimized render of187 // to give the the display hardware a chance at an optimized render of
188 // the scene. In this example though, we want some custom elements, so188 // the scene. In this example though, we want some custom elements, so
189 // we'll always use GLES.189 // we'll always use GLES.
190190
=== modified file 'include/platform/mir/graphics/display_buffer.h'
--- include/platform/mir/graphics/display_buffer.h 2016-05-03 06:55:25 +0000
+++ include/platform/mir/graphics/display_buffer.h 2016-09-19 09:16:51 +0000
@@ -58,16 +58,14 @@
58 * The renderables that should appear on the screen if the hardware58 * The renderables that should appear on the screen if the hardware
59 * is capable of optmizing that list somehow. If what you want59 * is capable of optmizing that list somehow. If what you want
60 * displayed on the screen cannot be represented by a RenderableList,60 * displayed on the screen cannot be represented by a RenderableList,
61 * then you should draw using OpenGL and use post_update()61 * then you should render using a graphics library like OpenGL.
62 * \returns62 * \returns
63 * true if the hardware can optimize the rendering of the list.63 * True if the hardware can (and has) fully composite/overlay the list;
64 * When this call completes, the renderlist will have been posted64 * False if the hardware platform cannot composite the list, and the
65 * to the screen.65 * caller should then render the list another way using a graphics
66 * false if the hardware platform cannot optimize the list. The screen66 * library such as OpenGL.
67 * will not be updated. The caller should render the list another way,
68 * and post using post_update()
69 **/67 **/
70 virtual bool post_renderables_if_optimizable(RenderableList const& renderlist) = 0;68 virtual bool overlay(RenderableList const& renderlist) = 0;
7169
72 /** Returns the orientation of the display buffer relative to how the70 /** Returns the orientation of the display buffer relative to how the
73 * user should see it (the orientation of the output).71 * user should see it (the orientation of the output).
7472
=== modified file 'include/test/mir/test/doubles/null_display_buffer.h'
--- include/test/mir/test/doubles/null_display_buffer.h 2016-05-03 06:55:25 +0000
+++ include/test/mir/test/doubles/null_display_buffer.h 2016-09-19 09:16:51 +0000
@@ -32,7 +32,7 @@
32{32{
33public:33public:
34 geometry::Rectangle view_area() const override { return geometry::Rectangle(); }34 geometry::Rectangle view_area() const override { return geometry::Rectangle(); }
35 bool post_renderables_if_optimizable(graphics::RenderableList const&) override { return false; }35 bool overlay(graphics::RenderableList const&) override { return false; }
36 MirOrientation orientation() const override { return mir_orientation_normal; }36 MirOrientation orientation() const override { return mir_orientation_normal; }
37 MirMirrorMode mirror_mode() const override { return mir_mirror_mode_none; }37 MirMirrorMode mirror_mode() const override { return mir_mirror_mode_none; }
38 NativeDisplayBuffer* native_display_buffer() override { return this; }38 NativeDisplayBuffer* native_display_buffer() override { return this; }
3939
=== modified file 'playground/demo-shell/demo_compositor.cpp'
--- playground/demo-shell/demo_compositor.cpp 2016-05-03 06:55:25 +0000
+++ playground/demo-shell/demo_compositor.cpp 2016-09-19 09:16:51 +0000
@@ -118,7 +118,7 @@
118118
119 if (!nonrenderlist_elements &&119 if (!nonrenderlist_elements &&
120 viewport == display_buffer.view_area() && // no bypass while zoomed120 viewport == display_buffer.view_area() && // no bypass while zoomed
121 display_buffer.post_renderables_if_optimizable(renderable_list))121 display_buffer.overlay(renderable_list))
122 {122 {
123 report->renderables_in_frame(this, renderable_list);123 report->renderables_in_frame(this, renderable_list);
124 renderer.suspend();124 renderer.suspend();
125125
=== modified file 'src/platform/symbols.map'
--- src/platform/symbols.map 2016-09-02 16:51:10 +0000
+++ src/platform/symbols.map 2016-09-19 09:16:51 +0000
@@ -26,7 +26,7 @@
26 mir::graphics::DisplayBuffer::native_display_buffer*;26 mir::graphics::DisplayBuffer::native_display_buffer*;
27 mir::graphics::DisplayBuffer::operator*;27 mir::graphics::DisplayBuffer::operator*;
28 mir::graphics::DisplayBuffer::orientation*;28 mir::graphics::DisplayBuffer::orientation*;
29 mir::graphics::DisplayBuffer::post_renderables_if_optimizable*;29 mir::graphics::DisplayBuffer::overlay*;
30 mir::graphics::DisplayBuffer::view_area*;30 mir::graphics::DisplayBuffer::view_area*;
31 mir::graphics::Display::configuration*;31 mir::graphics::Display::configuration*;
32 mir::graphics::DisplayConfiguration::DisplayConfiguration*;32 mir::graphics::DisplayConfiguration::DisplayConfiguration*;
3333
=== modified file 'src/platforms/android/server/display_buffer.cpp'
--- src/platforms/android/server/display_buffer.cpp 2016-05-03 06:55:25 +0000
+++ src/platforms/android/server/display_buffer.cpp 2016-09-19 09:16:51 +0000
@@ -79,7 +79,7 @@
79 gl_context.release_current();79 gl_context.release_current();
80}80}
8181
82bool mga::DisplayBuffer::post_renderables_if_optimizable(RenderableList const& renderlist)82bool mga::DisplayBuffer::overlay(RenderableList const& renderlist)
83{83{
84 if (!overlay_enabled ||84 if (!overlay_enabled ||
85 !display_device->compatible_renderlist(renderlist) ||85 !display_device->compatible_renderlist(renderlist) ||
8686
=== modified file 'src/platforms/android/server/display_buffer.h'
--- src/platforms/android/server/display_buffer.h 2016-05-03 06:55:25 +0000
+++ src/platforms/android/server/display_buffer.h 2016-09-19 09:16:51 +0000
@@ -63,7 +63,7 @@
63 void make_current() override;63 void make_current() override;
64 void release_current() override;64 void release_current() override;
65 void swap_buffers() override;65 void swap_buffers() override;
66 bool post_renderables_if_optimizable(RenderableList const& renderlist) override;66 bool overlay(RenderableList const& renderlist) override;
67 void bind() override;67 void bind() override;
6868
69 MirOrientation orientation() const override;69 MirOrientation orientation() const override;
7070
=== modified file 'src/platforms/android/utils/render_overlays.cpp'
--- src/platforms/android/utils/render_overlays.cpp 2016-08-16 19:34:28 +0000
+++ src/platforms/android/utils/render_overlays.cpp 2016-09-19 09:16:51 +0000
@@ -214,7 +214,7 @@
214 {214 {
215 // TODO: Is make_current() really needed here?215 // TODO: Is make_current() really needed here?
216 me::as_render_target(buffer)->make_current();216 me::as_render_target(buffer)->make_current();
217 buffer.post_renderables_if_optimizable(renderlist);217 buffer.overlay(renderlist);
218 });218 });
219 group.post();219 group.post();
220 });220 });
221221
=== modified file 'src/platforms/android/utils/test_android_hardware_sanity.cpp'
--- src/platforms/android/utils/test_android_hardware_sanity.cpp 2016-08-22 14:34:05 +0000
+++ src/platforms/android/utils/test_android_hardware_sanity.cpp 2016-09-19 09:16:51 +0000
@@ -281,7 +281,7 @@
281 std::make_shared<BasicRenderable>(buffer)281 std::make_shared<BasicRenderable>(buffer)
282 };282 };
283283
284 db.post_renderables_if_optimizable(list);284 db.overlay(list);
285 });285 });
286 group.post();286 group.post();
287 });287 });
288288
=== modified file 'src/platforms/eglstream-kms/server/display.cpp'
--- src/platforms/eglstream-kms/server/display.cpp 2016-08-01 09:37:45 +0000
+++ src/platforms/eglstream-kms/server/display.cpp 2016-09-19 09:16:51 +0000
@@ -195,7 +195,7 @@
195 return view_area_;195 return view_area_;
196 }196 }
197197
198 bool post_renderables_if_optimizable(const mir::graphics::RenderableList& /*renderlist*/) override198 bool overlay(const mir::graphics::RenderableList& /*renderlist*/) override
199 {199 {
200 return false;200 return false;
201 }201 }
202202
=== modified file 'src/platforms/mesa/server/kms/display_buffer.cpp'
--- src/platforms/mesa/server/kms/display_buffer.cpp 2016-09-16 15:18:36 +0000
+++ src/platforms/mesa/server/kms/display_buffer.cpp 2016-09-19 09:16:51 +0000
@@ -198,7 +198,7 @@
198 area = a;198 area = a;
199}199}
200200
201bool mgm::DisplayBuffer::post_renderables_if_optimizable(RenderableList const& renderable_list)201bool mgm::DisplayBuffer::overlay(RenderableList const& renderable_list)
202{202{
203 if ((rotation == mir_orientation_normal) &&203 if ((rotation == mir_orientation_normal) &&
204 (bypass_option == mgm::BypassOption::allowed))204 (bypass_option == mgm::BypassOption::allowed))
205205
=== modified file 'src/platforms/mesa/server/kms/display_buffer.h'
--- src/platforms/mesa/server/kms/display_buffer.h 2016-05-03 06:55:25 +0000
+++ src/platforms/mesa/server/kms/display_buffer.h 2016-09-19 09:16:51 +0000
@@ -66,7 +66,7 @@
66 void make_current() override;66 void make_current() override;
67 void release_current() override;67 void release_current() override;
68 void swap_buffers() override;68 void swap_buffers() override;
69 bool post_renderables_if_optimizable(RenderableList const& renderlist) override;69 bool overlay(RenderableList const& renderlist) override;
70 void bind() override;70 void bind() override;
7171
72 void for_each_display_buffer(72 void for_each_display_buffer(
7373
=== modified file 'src/platforms/mesa/server/x11/graphics/display_buffer.cpp'
--- src/platforms/mesa/server/x11/graphics/display_buffer.cpp 2016-09-09 08:04:25 +0000
+++ src/platforms/mesa/server/x11/graphics/display_buffer.cpp 2016-09-19 09:16:51 +0000
@@ -66,7 +66,7 @@
66 BOOST_THROW_EXCEPTION(mg::egl_error("Cannot make uncurrent"));66 BOOST_THROW_EXCEPTION(mg::egl_error("Cannot make uncurrent"));
67}67}
6868
69bool mgx::DisplayBuffer::post_renderables_if_optimizable(RenderableList const& /*renderlist*/)69bool mgx::DisplayBuffer::overlay(RenderableList const& /*renderlist*/)
70{70{
71 return false;71 return false;
72}72}
7373
=== modified file 'src/platforms/mesa/server/x11/graphics/display_buffer.h'
--- src/platforms/mesa/server/x11/graphics/display_buffer.h 2016-09-07 03:37:03 +0000
+++ src/platforms/mesa/server/x11/graphics/display_buffer.h 2016-09-19 09:16:51 +0000
@@ -53,7 +53,7 @@
53 void release_current() override;53 void release_current() override;
54 void swap_buffers() override;54 void swap_buffers() override;
55 void bind() override;55 void bind() override;
56 bool post_renderables_if_optimizable(RenderableList const& renderlist) override;56 bool overlay(RenderableList const& renderlist) override;
57 void set_orientation(MirOrientation const new_orientation);57 void set_orientation(MirOrientation const new_orientation);
5858
59 MirOrientation orientation() const override;59 MirOrientation orientation() const override;
6060
=== modified file 'src/server/compositor/default_display_buffer_compositor.cpp'
--- src/server/compositor/default_display_buffer_compositor.cpp 2016-08-26 19:01:27 +0000
+++ src/server/compositor/default_display_buffer_compositor.cpp 2016-09-19 09:16:51 +0000
@@ -72,7 +72,7 @@
72 */72 */
73 scene_elements.clear(); // Those in use are still in renderable_list73 scene_elements.clear(); // Those in use are still in renderable_list
7474
75 if (display_buffer.post_renderables_if_optimizable(renderable_list))75 if (display_buffer.overlay(renderable_list))
76 {76 {
77 report->renderables_in_frame(this, renderable_list);77 report->renderables_in_frame(this, renderable_list);
78 renderer->suspend();78 renderer->suspend();
7979
=== modified file 'src/server/compositor/screencast_display_buffer.cpp'
--- src/server/compositor/screencast_display_buffer.cpp 2016-07-28 09:10:43 +0000
+++ src/server/compositor/screencast_display_buffer.cpp 2016-09-19 09:16:51 +0000
@@ -153,7 +153,7 @@
153 gl_context->release_current();153 gl_context->release_current();
154}154}
155155
156bool mc::ScreencastDisplayBuffer::post_renderables_if_optimizable(mg::RenderableList const&)156bool mc::ScreencastDisplayBuffer::overlay(mg::RenderableList const&)
157{157{
158 return false;158 return false;
159}159}
160160
=== modified file 'src/server/compositor/screencast_display_buffer.h'
--- src/server/compositor/screencast_display_buffer.h 2016-07-28 09:10:43 +0000
+++ src/server/compositor/screencast_display_buffer.h 2016-09-19 09:16:51 +0000
@@ -108,7 +108,7 @@
108108
109 void release_current() override;109 void release_current() override;
110110
111 bool post_renderables_if_optimizable(graphics::RenderableList const&) override;111 bool overlay(graphics::RenderableList const&) override;
112112
113 void swap_buffers() override;113 void swap_buffers() override;
114114
115115
=== modified file 'src/server/graphics/nested/display_buffer.cpp'
--- src/server/graphics/nested/display_buffer.cpp 2016-08-25 13:34:29 +0000
+++ src/server/graphics/nested/display_buffer.cpp 2016-09-19 09:16:51 +0000
@@ -97,7 +97,7 @@
97{97{
98}98}
9999
100bool mgn::detail::DisplayBuffer::post_renderables_if_optimizable(RenderableList const&)100bool mgn::detail::DisplayBuffer::overlay(RenderableList const&)
101{101{
102 return false;102 return false;
103}103}
104104
=== modified file 'src/server/graphics/nested/display_buffer.h'
--- src/server/graphics/nested/display_buffer.h 2016-08-25 12:58:00 +0000
+++ src/server/graphics/nested/display_buffer.h 2016-09-19 09:16:51 +0000
@@ -58,7 +58,7 @@
58 MirOrientation orientation() const override;58 MirOrientation orientation() const override;
59 MirMirrorMode mirror_mode() const override;59 MirMirrorMode mirror_mode() const override;
6060
61 bool post_renderables_if_optimizable(RenderableList const& renderlist) override;61 bool overlay(RenderableList const& renderlist) override;
6262
63 NativeDisplayBuffer* native_display_buffer() override;63 NativeDisplayBuffer* native_display_buffer() override;
6464
6565
=== modified file 'tests/acceptance-tests/test_latency.cpp'
--- tests/acceptance-tests/test_latency.cpp 2016-08-26 16:52:19 +0000
+++ tests/acceptance-tests/test_latency.cpp 2016-09-19 09:16:51 +0000
@@ -129,7 +129,7 @@
129 return {{0,0}, {1920, 1080}};129 return {{0,0}, {1920, 1080}};
130 }130 }
131131
132 bool post_renderables_if_optimizable(mg::RenderableList const& renderables) override132 bool overlay(mg::RenderableList const& renderables) override
133 {133 {
134 //the surface will be the frontmost of the renderables134 //the surface will be the frontmost of the renderables
135 if (!renderables.empty())135 if (!renderables.empty())
136136
=== modified file 'tests/include/mir/test/doubles/mock_display_buffer.h'
--- tests/include/mir/test/doubles/mock_display_buffer.h 2016-05-03 06:55:25 +0000
+++ tests/include/mir/test/doubles/mock_display_buffer.h 2016-09-19 09:16:51 +0000
@@ -43,7 +43,7 @@
43 .WillByDefault(Return(this));43 .WillByDefault(Return(this));
44 }44 }
45 MOCK_CONST_METHOD0(view_area, geometry::Rectangle());45 MOCK_CONST_METHOD0(view_area, geometry::Rectangle());
46 MOCK_METHOD1(post_renderables_if_optimizable, bool(graphics::RenderableList const&));46 MOCK_METHOD1(overlay, bool(graphics::RenderableList const&));
47 MOCK_CONST_METHOD0(orientation, MirOrientation());47 MOCK_CONST_METHOD0(orientation, MirOrientation());
48 MOCK_CONST_METHOD0(mirror_mode, MirMirrorMode());48 MOCK_CONST_METHOD0(mirror_mode, MirMirrorMode());
49 MOCK_METHOD0(native_display_buffer, graphics::NativeDisplayBuffer*());49 MOCK_METHOD0(native_display_buffer, graphics::NativeDisplayBuffer*());
5050
=== modified file 'tests/mir_test_framework/headless_display_buffer_compositor_factory.cpp'
--- tests/mir_test_framework/headless_display_buffer_compositor_factory.cpp 2016-09-16 15:18:36 +0000
+++ tests/mir_test_framework/headless_display_buffer_compositor_factory.cpp 2016-09-19 09:16:51 +0000
@@ -72,7 +72,7 @@
72 void composite(mir::compositor::SceneElementSequence&& seq) override72 void composite(mir::compositor::SceneElementSequence&& seq) override
73 {73 {
74 auto renderlist = filter(seq, db.view_area());74 auto renderlist = filter(seq, db.view_area());
75 if (db.post_renderables_if_optimizable(renderlist))75 if (db.overlay(renderlist))
76 return;76 return;
7777
78 // Invoke GL renderer specific functions if the DisplayBuffer supports them78 // Invoke GL renderer specific functions if the DisplayBuffer supports them
7979
=== modified file 'tests/unit-tests/compositor/test_default_display_buffer_compositor.cpp'
--- tests/unit-tests/compositor/test_default_display_buffer_compositor.cpp 2016-08-01 14:43:19 +0000
+++ tests/unit-tests/compositor/test_default_display_buffer_compositor.cpp 2016-09-19 09:16:51 +0000
@@ -104,7 +104,7 @@
104 .WillByDefault(Return(mir_mirror_mode_none));104 .WillByDefault(Return(mir_mirror_mode_none));
105 ON_CALL(display_buffer, view_area())105 ON_CALL(display_buffer, view_area())
106 .WillByDefault(Return(screen));106 .WillByDefault(Return(screen));
107 ON_CALL(display_buffer, post_renderables_if_optimizable(_))107 ON_CALL(display_buffer, overlay(_))
108 .WillByDefault(Return(false));108 .WillByDefault(Return(false));
109 }109 }
110110
@@ -140,7 +140,7 @@
140 Sequence seq;140 Sequence seq;
141 EXPECT_CALL(*report, began_frame(_))141 EXPECT_CALL(*report, began_frame(_))
142 .InSequence(seq);142 .InSequence(seq);
143 EXPECT_CALL(display_buffer, post_renderables_if_optimizable(_))143 EXPECT_CALL(display_buffer, overlay(_))
144 .InSequence(seq)144 .InSequence(seq)
145 .WillOnce(Return(true));145 .WillOnce(Return(true));
146 EXPECT_CALL(*report, renderables_in_frame(_,_))146 EXPECT_CALL(*report, renderables_in_frame(_,_))
@@ -170,7 +170,7 @@
170 Sequence seq;170 Sequence seq;
171 EXPECT_CALL(*report, began_frame(_))171 EXPECT_CALL(*report, began_frame(_))
172 .InSequence(seq);172 .InSequence(seq);
173 EXPECT_CALL(display_buffer, post_renderables_if_optimizable(_))173 EXPECT_CALL(display_buffer, overlay(_))
174 .InSequence(seq)174 .InSequence(seq)
175 .WillOnce(Return(false));175 .WillOnce(Return(false));
176 EXPECT_CALL(*report, renderables_in_frame(_,_))176 EXPECT_CALL(*report, renderables_in_frame(_,_))
@@ -227,7 +227,7 @@
227 .WillByDefault(Return(mir_mirror_mode_none));227 .WillByDefault(Return(mir_mirror_mode_none));
228228
229 Sequence seq;229 Sequence seq;
230 EXPECT_CALL(display_buffer, post_renderables_if_optimizable(_))230 EXPECT_CALL(display_buffer, overlay(_))
231 .InSequence(seq)231 .InSequence(seq)
232 .WillOnce(Return(false));232 .WillOnce(Return(false));
233233
@@ -238,12 +238,12 @@
238 EXPECT_CALL(mock_renderer, render(IsEmpty()))238 EXPECT_CALL(mock_renderer, render(IsEmpty()))
239 .InSequence(seq);239 .InSequence(seq);
240240
241 EXPECT_CALL(display_buffer, post_renderables_if_optimizable(_))241 EXPECT_CALL(display_buffer, overlay(_))
242 .InSequence(seq)242 .InSequence(seq)
243 .WillOnce(Return(true));243 .WillOnce(Return(true));
244 //we should be testing that post_buffer is called, not just that244 //we should be testing that post_buffer is called, not just that
245 //we check the bits on the compositor buffer245 //we check the bits on the compositor buffer
246 EXPECT_CALL(display_buffer, post_renderables_if_optimizable(_))246 EXPECT_CALL(display_buffer, overlay(_))
247 .InSequence(seq)247 .InSequence(seq)
248 .WillOnce(Return(false));248 .WillOnce(Return(false));
249 EXPECT_CALL(display_buffer, orientation())249 EXPECT_CALL(display_buffer, orientation())
@@ -274,7 +274,7 @@
274 .WillOnce(Return(mir_orientation_normal));274 .WillOnce(Return(mir_orientation_normal));
275 EXPECT_CALL(display_buffer, mirror_mode())275 EXPECT_CALL(display_buffer, mirror_mode())
276 .WillOnce(Return(mir_mirror_mode_none));276 .WillOnce(Return(mir_mirror_mode_none));
277 EXPECT_CALL(display_buffer, post_renderables_if_optimizable(_))277 EXPECT_CALL(display_buffer, overlay(_))
278 .WillRepeatedly(Return(false));278 .WillRepeatedly(Return(false));
279279
280 auto window0 = std::make_shared<mtd::FakeRenderable>(geom::Rectangle{{99,99},{2,2}});280 auto window0 = std::make_shared<mtd::FakeRenderable>(geom::Rectangle{{99,99},{2,2}});
281281
=== modified file 'tests/unit-tests/compositor/test_screencast_display_buffer.cpp'
--- tests/unit-tests/compositor/test_screencast_display_buffer.cpp 2016-04-22 02:39:57 +0000
+++ tests/unit-tests/compositor/test_screencast_display_buffer.cpp 2016-09-19 09:16:51 +0000
@@ -169,7 +169,7 @@
169 default_mirror_mode, free_queue,169 default_mirror_mode, free_queue,
170 ready_queue, stub_display};170 ready_queue, stub_display};
171171
172 EXPECT_FALSE(db.post_renderables_if_optimizable(renderables));172 EXPECT_FALSE(db.overlay(renderables));
173}173}
174174
175TEST_F(ScreencastDisplayBufferTest, does_not_throw_on_multiple_make_current_calls)175TEST_F(ScreencastDisplayBufferTest, does_not_throw_on_multiple_make_current_calls)
176176
=== modified file 'tests/unit-tests/platforms/android/server/test_display.cpp'
--- tests/unit-tests/platforms/android/server/test_display.cpp 2016-08-24 02:09:08 +0000
+++ tests/unit-tests/platforms/android/server/test_display.cpp 2016-09-19 09:16:51 +0000
@@ -1033,7 +1033,7 @@
10331033
1034 display.for_each_display_sync_group([](mg::DisplaySyncGroup& group) {1034 display.for_each_display_sync_group([](mg::DisplaySyncGroup& group) {
1035 group.for_each_display_buffer([](mg::DisplayBuffer& db) {1035 group.for_each_display_buffer([](mg::DisplayBuffer& db) {
1036 EXPECT_FALSE(db.post_renderables_if_optimizable({std::make_shared<mtd::StubRenderable>()}));1036 EXPECT_FALSE(db.overlay({std::make_shared<mtd::StubRenderable>()}));
1037 });1037 });
1038 });1038 });
1039}1039}
10401040
=== modified file 'tests/unit-tests/platforms/android/server/test_display_buffer.cpp'
--- tests/unit-tests/platforms/android/server/test_display_buffer.cpp 2016-08-24 02:09:08 +0000
+++ tests/unit-tests/platforms/android/server/test_display_buffer.cpp 2016-09-19 09:16:51 +0000
@@ -105,8 +105,8 @@
105 .WillOnce(Return(true))105 .WillOnce(Return(true))
106 .WillOnce(Return(false));106 .WillOnce(Return(false));
107107
108 EXPECT_TRUE(db.post_renderables_if_optimizable(renderlist)); 108 EXPECT_TRUE(db.overlay(renderlist));
109 EXPECT_FALSE(db.post_renderables_if_optimizable(renderlist)); 109 EXPECT_FALSE(db.overlay(renderlist));
110}110}
111111
112TEST_F(DisplayBuffer, defaults_to_normal_orientation)112TEST_F(DisplayBuffer, defaults_to_normal_orientation)
@@ -287,7 +287,7 @@
287 top_left,287 top_left,
288 mga::OverlayOptimization::disabled);288 mga::OverlayOptimization::disabled);
289289
290 EXPECT_FALSE(db.post_renderables_if_optimizable(renderlist)); 290 EXPECT_FALSE(db.overlay(renderlist));
291}291}
292292
293TEST_F(DisplayBuffer, rejects_commit_if_list_doesnt_need_commit)293TEST_F(DisplayBuffer, rejects_commit_if_list_doesnt_need_commit)
@@ -313,19 +313,19 @@
313 };313 };
314314
315 mg::RenderableList renderlist{buffer1, buffer2};315 mg::RenderableList renderlist{buffer1, buffer2};
316 EXPECT_TRUE(db.post_renderables_if_optimizable(renderlist));316 EXPECT_TRUE(db.overlay(renderlist));
317 set_to_overlays(db.contents().list);317 set_to_overlays(db.contents().list);
318 EXPECT_FALSE(db.post_renderables_if_optimizable(renderlist)); 318 EXPECT_FALSE(db.overlay(renderlist));
319319
320 renderlist = mg::RenderableList{buffer2, buffer1}; //ordering changed320 renderlist = mg::RenderableList{buffer2, buffer1}; //ordering changed
321 EXPECT_TRUE(db.post_renderables_if_optimizable(renderlist)); 321 EXPECT_TRUE(db.overlay(renderlist));
322 set_to_overlays(db.contents().list);322 set_to_overlays(db.contents().list);
323 EXPECT_FALSE(db.post_renderables_if_optimizable(renderlist)); 323 EXPECT_FALSE(db.overlay(renderlist));
324324
325 renderlist = mg::RenderableList{buffer3, buffer1}; //buffer changed325 renderlist = mg::RenderableList{buffer3, buffer1}; //buffer changed
326 EXPECT_TRUE(db.post_renderables_if_optimizable(renderlist)); 326 EXPECT_TRUE(db.overlay(renderlist));
327 set_to_overlays(db.contents().list);327 set_to_overlays(db.contents().list);
328 EXPECT_FALSE(db.post_renderables_if_optimizable(renderlist)); 328 EXPECT_FALSE(db.overlay(renderlist));
329}329}
330330
331TEST_F(DisplayBuffer, reports_position_correctly)331TEST_F(DisplayBuffer, reports_position_correctly)
@@ -351,7 +351,7 @@
351 std::make_shared<mtd::StubBuffer>(std::make_shared<mtd::StubAndroidNativeBuffer>()))};351 std::make_shared<mtd::StubBuffer>(std::make_shared<mtd::StubAndroidNativeBuffer>()))};
352352
353 db.configure(mir_power_mode_on, mir_orientation_inverted, geom::Displacement{0,0});353 db.configure(mir_power_mode_on, mir_orientation_inverted, geom::Displacement{0,0});
354 EXPECT_FALSE(db.post_renderables_if_optimizable(renderlist));354 EXPECT_FALSE(db.overlay(renderlist));
355 db.configure(mir_power_mode_on, mir_orientation_normal, geom::Displacement{0,0});355 db.configure(mir_power_mode_on, mir_orientation_normal, geom::Displacement{0,0});
356 EXPECT_TRUE(db.post_renderables_if_optimizable(renderlist));356 EXPECT_TRUE(db.overlay(renderlist));
357}357}
358358
=== modified file 'tests/unit-tests/platforms/android/server/test_display_group.cpp'
--- tests/unit-tests/platforms/android/server/test_display_group.cpp 2016-08-24 02:09:08 +0000
+++ tests/unit-tests/platforms/android/server/test_display_group.cpp 2016-09-19 09:16:51 +0000
@@ -35,7 +35,7 @@
35struct StubConfigurableDB : mga::ConfigurableDisplayBuffer, mg::NativeDisplayBuffer35struct StubConfigurableDB : mga::ConfigurableDisplayBuffer, mg::NativeDisplayBuffer
36{36{
37 mir::geometry::Rectangle view_area() const override { return {}; }37 mir::geometry::Rectangle view_area() const override { return {}; }
38 bool post_renderables_if_optimizable(mg::RenderableList const&) override { return false; }38 bool overlay(mg::RenderableList const&) override { return false; }
39 MirOrientation orientation() const override { return mir_orientation_normal; }39 MirOrientation orientation() const override { return mir_orientation_normal; }
40 MirMirrorMode mirror_mode() const override { return mir_mirror_mode_none; }40 MirMirrorMode mirror_mode() const override { return mir_mirror_mode_none; }
41 mg::NativeDisplayBuffer* native_display_buffer() override { return this; }41 mg::NativeDisplayBuffer* native_display_buffer() override { return this; }
4242
=== modified file 'tests/unit-tests/platforms/mesa/kms/test_display_buffer.cpp'
--- tests/unit-tests/platforms/mesa/kms/test_display_buffer.cpp 2016-09-16 15:18:36 +0000
+++ tests/unit-tests/platforms/mesa/kms/test_display_buffer.cpp 2016-09-19 09:16:51 +0000
@@ -164,7 +164,7 @@
164164
165 auto original_count = mock_bypassable_buffer.use_count();165 auto original_count = mock_bypassable_buffer.use_count();
166166
167 EXPECT_TRUE(db.post_renderables_if_optimizable(bypassable_list));167 EXPECT_TRUE(db.overlay(bypassable_list));
168 EXPECT_EQ(original_count+1, mock_bypassable_buffer.use_count());168 EXPECT_EQ(original_count+1, mock_bypassable_buffer.use_count());
169169
170 // Switch back to normal compositing170 // Switch back to normal compositing
@@ -192,7 +192,7 @@
192192
193 for (int frame = 0; frame < 5; ++frame)193 for (int frame = 0; frame < 5; ++frame)
194 {194 {
195 ASSERT_TRUE(db.post_renderables_if_optimizable(bypassable_list));195 ASSERT_TRUE(db.overlay(bypassable_list));
196 db.post();196 db.post();
197197
198 // Cast to a simple int type so that test failures are readable198 // Cast to a simple int type so that test failures are readable
@@ -222,7 +222,7 @@
222222
223 for (int frame = 0; frame < 5; ++frame)223 for (int frame = 0; frame < 5; ++frame)
224 {224 {
225 ASSERT_FALSE(db.post_renderables_if_optimizable(non_bypassable_list));225 ASSERT_FALSE(db.overlay(non_bypassable_list));
226 db.post();226 db.post();
227227
228 // Cast to a simple int type so that test failures are readable228 // Cast to a simple int type so that test failures are readable
@@ -246,7 +246,7 @@
246246
247 auto original_count = mock_bypassable_buffer.use_count();247 auto original_count = mock_bypassable_buffer.use_count();
248248
249 EXPECT_TRUE(db.post_renderables_if_optimizable(bypassable_list));249 EXPECT_TRUE(db.overlay(bypassable_list));
250 EXPECT_EQ(original_count+1, mock_bypassable_buffer.use_count());250 EXPECT_EQ(original_count+1, mock_bypassable_buffer.use_count());
251251
252 db.post();252 db.post();
@@ -269,7 +269,7 @@
269 gl_config,269 gl_config,
270 mock_egl.fake_egl_context);270 mock_egl.fake_egl_context);
271271
272 EXPECT_TRUE(db.post_renderables_if_optimizable(bypassable_list));272 EXPECT_TRUE(db.overlay(bypassable_list));
273}273}
274274
275TEST_F(MesaDisplayBufferTest, failed_bypass_falls_back_gracefully)275TEST_F(MesaDisplayBufferTest, failed_bypass_falls_back_gracefully)
@@ -291,9 +291,9 @@
291 gl_config,291 gl_config,
292 mock_egl.fake_egl_context);292 mock_egl.fake_egl_context);
293293
294 EXPECT_FALSE(db.post_renderables_if_optimizable(bypassable_list));294 EXPECT_FALSE(db.overlay(bypassable_list));
295 // And then we recover. DRM finds enough resources to AddFB ...295 // And then we recover. DRM finds enough resources to AddFB ...
296 EXPECT_TRUE(db.post_renderables_if_optimizable(bypassable_list));296 EXPECT_TRUE(db.overlay(bypassable_list));
297}297}
298298
299TEST_F(MesaDisplayBufferTest, skips_bypass_because_of_lagging_resize)299TEST_F(MesaDisplayBufferTest, skips_bypass_because_of_lagging_resize)
@@ -320,7 +320,7 @@
320 gl_config,320 gl_config,
321 mock_egl.fake_egl_context);321 mock_egl.fake_egl_context);
322322
323 EXPECT_FALSE(db.post_renderables_if_optimizable(list));323 EXPECT_FALSE(db.overlay(list));
324}324}
325325
326TEST_F(MesaDisplayBufferTest, rotated_cannot_bypass)326TEST_F(MesaDisplayBufferTest, rotated_cannot_bypass)
@@ -337,7 +337,7 @@
337 gl_config,337 gl_config,
338 mock_egl.fake_egl_context);338 mock_egl.fake_egl_context);
339339
340 EXPECT_FALSE(db.post_renderables_if_optimizable(bypassable_list));340 EXPECT_FALSE(db.overlay(bypassable_list));
341}341}
342342
343TEST_F(MesaDisplayBufferTest, fullscreen_software_buffer_cannot_bypass)343TEST_F(MesaDisplayBufferTest, fullscreen_software_buffer_cannot_bypass)
@@ -359,7 +359,7 @@
359 gl_config,359 gl_config,
360 mock_egl.fake_egl_context);360 mock_egl.fake_egl_context);
361361
362 EXPECT_FALSE(db.post_renderables_if_optimizable(list));362 EXPECT_FALSE(db.overlay(list));
363}363}
364364
365TEST_F(MesaDisplayBufferTest, fullscreen_software_buffer_not_used_as_gbm_bo)365TEST_F(MesaDisplayBufferTest, fullscreen_software_buffer_not_used_as_gbm_bo)
@@ -384,7 +384,7 @@
384 // If you find yourself using gbm_ functions on a Shm buffer then you're384 // If you find yourself using gbm_ functions on a Shm buffer then you're
385 // asking for a crash (LP: #1493721) ...385 // asking for a crash (LP: #1493721) ...
386 EXPECT_CALL(mock_gbm, gbm_bo_get_user_data(_)).Times(0);386 EXPECT_CALL(mock_gbm, gbm_bo_get_user_data(_)).Times(0);
387 db.post_renderables_if_optimizable(list);387 db.overlay(list);
388}388}
389389
390TEST_F(MesaDisplayBufferTest, orientation_not_implemented_internally)390TEST_F(MesaDisplayBufferTest, orientation_not_implemented_internally)
@@ -585,7 +585,7 @@
585 gl_config,585 gl_config,
586 mock_egl.fake_egl_context);586 mock_egl.fake_egl_context);
587587
588 EXPECT_FALSE(db.post_renderables_if_optimizable(list));588 EXPECT_FALSE(db.overlay(list));
589}589}
590590
591TEST_F(MesaDisplayBufferTest, skips_bypass_because_of_incompatible_bypass_buffer)591TEST_F(MesaDisplayBufferTest, skips_bypass_because_of_incompatible_bypass_buffer)
@@ -614,6 +614,6 @@
614 gl_config,614 gl_config,
615 mock_egl.fake_egl_context);615 mock_egl.fake_egl_context);
616616
617 EXPECT_FALSE(db.post_renderables_if_optimizable(list));617 EXPECT_FALSE(db.overlay(list));
618}618}
619619

Subscribers

People subscribed via source and target branches