Mir

Merge lp:~vanvugt/mir/fix-1657755 into lp:mir

Proposed by Daniel van Vugt
Status: Superseded
Proposed branch: lp:~vanvugt/mir/fix-1657755
Merge into: lp:mir
Diff against target: 52 lines (+12/-9)
2 files modified
src/platforms/android/server/hwc_device.cpp (+1/-2)
tests/unit-tests/platforms/android/server/test_hwc_device.cpp (+11/-7)
To merge this branch: bzr merge lp:~vanvugt/mir/fix-1657755
Reviewer Review Type Date Requested Status
Mir CI Bot continuous-integration Approve
Mir development team Pending
Review via email: mp+315192@code.launchpad.net

Commit message

Remove the workaround for LP: #1369763 to fix LP: #1657755

As discussed a while back [1], living with LP: #1369763 is probably
the lesser evil. But we should still strive to fix all the bugs.

Client-side vsync should tolerate this fine, as it still contains a
workaround to support running on top of server-side vsync. It's not
guaranteed always optimal latency while LP: #1369763 is unresolved but
will achieve it most of the time.

[1] https://code.launchpad.net/~kdub/mir/fix-1369763/+merge/307945/comments/797700

Description of the change

TODO: Needs device testing still.

Also note the regression test was broken. StubTransformedRenderable would never get overlaid since it is transformed.

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

PASSED: Continuous integration, rev:3964
https://mir-jenkins.ubuntu.com/job/mir-ci/2789/
Executed test runs:
    SUCCESS: https://mir-jenkins.ubuntu.com/job/build-mir/3653
    SUCCESS: https://mir-jenkins.ubuntu.com/job/build-0-fetch/3732
    SUCCESS: https://mir-jenkins.ubuntu.com/job/build-1-sourcepkg/release=vivid+overlay/3722
    SUCCESS: https://mir-jenkins.ubuntu.com/job/build-1-sourcepkg/release=xenial+overlay/3722
    SUCCESS: https://mir-jenkins.ubuntu.com/job/build-1-sourcepkg/release=zesty/3722
    SUCCESS: https://mir-jenkins.ubuntu.com/job/build-2-binpkg-mir/arch=amd64,compiler=clang,platform=mesa,release=zesty/3680
        deb: https://mir-jenkins.ubuntu.com/job/build-2-binpkg-mir/arch=amd64,compiler=clang,platform=mesa,release=zesty/3680/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/3680
        deb: https://mir-jenkins.ubuntu.com/job/build-2-binpkg-mir/arch=amd64,compiler=gcc,platform=mesa,release=xenial+overlay/3680/artifact/output/*zip*/output.zip
    SUCCESS: https://mir-jenkins.ubuntu.com/job/build-2-binpkg-mir/arch=amd64,compiler=gcc,platform=mesa,release=zesty/3680
        deb: https://mir-jenkins.ubuntu.com/job/build-2-binpkg-mir/arch=amd64,compiler=gcc,platform=mesa,release=zesty/3680/artifact/output/*zip*/output.zip
    SUCCESS: https://mir-jenkins.ubuntu.com/job/build-2-binpkg-mir/arch=cross-armhf,compiler=gcc,platform=android,release=vivid+overlay/3680
        deb: https://mir-jenkins.ubuntu.com/job/build-2-binpkg-mir/arch=cross-armhf,compiler=gcc,platform=android,release=vivid+overlay/3680/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/3680
        deb: https://mir-jenkins.ubuntu.com/job/build-2-binpkg-mir/arch=i386,compiler=gcc,platform=android,release=vivid+overlay/3680/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/3680
        deb: https://mir-jenkins.ubuntu.com/job/build-2-binpkg-mir/arch=i386,compiler=gcc,platform=mesa,release=xenial+overlay/3680/artifact/output/*zip*/output.zip

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

review: Approve (continuous-integration)

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'src/platforms/android/server/hwc_device.cpp'
2--- src/platforms/android/server/hwc_device.cpp 2017-01-18 02:29:37 +0000
3+++ src/platforms/android/server/hwc_device.cpp 2017-01-20 05:09:47 +0000
4@@ -56,8 +56,7 @@
5 //TODO: enable planeAlpha for (hwc version >= 1.2), 90 deg rotation
6 static glm::mat4 const identity;
7 if (plane_alpha_is_translucent(*renderable) ||
8- (renderable->transformation() != identity) ||
9- (renderable->swap_interval() == 0)) //See LP: #1369763
10+ renderable->transformation() != identity)
11 {
12 return false;
13 }
14
15=== modified file 'tests/unit-tests/platforms/android/server/test_hwc_device.cpp'
16--- tests/unit-tests/platforms/android/server/test_hwc_device.cpp 2017-01-18 02:29:37 +0000
17+++ tests/unit-tests/platforms/android/server/test_hwc_device.cpp 2017-01-20 05:09:47 +0000
18@@ -24,6 +24,7 @@
19 #include "src/platforms/android/server/hwc_configuration.h"
20 #include "mir/test/doubles/mock_android_native_buffer.h"
21 #include "mir/test/doubles/stub_renderable.h"
22+#include "mir/test/doubles/mock_renderable.h"
23 #include "mir/test/doubles/mock_framebuffer_bundle.h"
24 #include "mir/test/doubles/stub_buffer.h"
25 #include "mir/test/doubles/mock_hwc_device_wrapper.h"
26@@ -599,16 +600,19 @@
27 EXPECT_FALSE(device.compatible_renderlist(renderlist));
28 }
29
30-//LP: #1369763. We could get swapinterval 0 to work with overlays, but we'd need
31-//the vsync signal from hwc to reach the client, so the client can rate-limit its submissions.
32-// Update: We have client-side vsync now so it should be possible to do this...
33-TEST_F(HwcDevice, rejects_list_containing_interval_0)
34+// Regression test for LP: #1657755
35+TEST_F(HwcDevice, accepts_list_containing_interval_0)
36 {
37+ using namespace ::testing;
38+
39 mga::HwcDevice device(mock_device);
40-
41- auto renderable = std::make_shared<mtd::StubTransformedRenderable>();
42+ auto renderable = std::make_shared<NiceMock<mtd::MockRenderable>>();
43+
44+ ON_CALL(*renderable, swap_interval())
45+ .WillByDefault(Return(0));
46+
47 mg::RenderableList renderlist{renderable};
48- EXPECT_FALSE(device.compatible_renderlist(renderlist));
49+ EXPECT_TRUE(device.compatible_renderlist(renderlist));
50 }
51
52 //TODO: we could accept a 90 degree transform

Subscribers

People subscribed via source and target branches