Merge lp:~robertcarr/mir/emancipate-egl-native-display-from-surface into lp:~mir-team/mir/trunk
- emancipate-egl-native-display-from-surface
- Merge into trunk
Status: | Merged |
---|---|
Approved by: | Robert Carr |
Approved revision: | no longer in the source branch. |
Merged at revision: | 687 |
Proposed branch: | lp:~robertcarr/mir/emancipate-egl-native-display-from-surface |
Merge into: | lp:~mir-team/mir/trunk |
Diff against target: |
402 lines (+49/-46) 22 files modified
examples/demo-inprocess-surface-client/inprocess_egl_client.cpp (+2/-2) include/server/mir/graphics/internal_client.h (+7/-1) include/server/mir/graphics/platform.h (+1/-1) include/test/mir_test_doubles/stub_platform.h (+1/-1) src/server/graphics/android/android_platform.cpp (+2/-3) src/server/graphics/android/android_platform.h (+1/-1) src/server/graphics/android/internal_client.cpp (+10/-5) src/server/graphics/android/internal_client.h (+2/-2) src/server/graphics/gbm/gbm_platform.cpp (+2/-3) src/server/graphics/gbm/gbm_platform.h (+1/-1) src/server/graphics/gbm/internal_client.cpp (+3/-5) src/server/graphics/gbm/internal_client.h (+2/-4) tests/integration-tests/graphics/android/test_internal_client.cpp (+2/-2) tests/integration-tests/graphics/gbm/test_buffer_integration.cpp (+1/-1) tests/integration-tests/test_display_info.cpp (+1/-1) tests/integration-tests/test_drm_auth_magic.cpp (+1/-1) tests/integration-tests/test_surfaceloop.cpp (+2/-2) tests/mir_test_framework/testing_server_options.cpp (+1/-1) tests/unit-tests/frontend/test_session_mediator_gbm.cpp (+1/-1) tests/unit-tests/graphics/android/test_internal_client.cpp (+3/-3) tests/unit-tests/graphics/gbm/test_gbm_platform.cpp (+1/-3) tests/unit-tests/graphics/gbm/test_internal_client.cpp (+2/-2) |
To merge this branch: | bzr merge lp:~robertcarr/mir/emancipate-egl-native-display-from-surface |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
PS Jenkins bot (community) | continuous-integration | Approve | |
Kevin DuBois (community) | Approve | ||
Review via email: mp+163775@code.launchpad.net |
Commit message
Allow access to the internal egl native display without usage of a surface.
Description of the change
Allow access to the internal egl native display without usage of a surface.
PS Jenkins bot (ps-jenkins) wrote : | # |
Kevin DuBois (kdub) wrote : | # |
good, makes more sense
small needs fixing:
doesn't need to be a class member:
148 std::shared_
Kevin DuBois (kdub) wrote : | # |
> good, makes more sense
>
> small needs fixing:
>
> doesn't need to be a class member:
> 148 std::shared_
apologies, it does need to be a class member so that a reference to it is maintained.
PS Jenkins bot (ps-jenkins) wrote : | # |
PASSED: Continuous integration, rev:686
http://
Executed test runs:
SUCCESS: http://
SUCCESS: http://
SUCCESS: http://
deb: http://
SUCCESS: http://
Click here to trigger a rebuild:
http://
PS Jenkins bot (ps-jenkins) wrote : | # |
PASSED: Continuous integration, rev:687
http://
Executed test runs:
SUCCESS: http://
SUCCESS: http://
SUCCESS: http://
deb: http://
SUCCESS: http://
Click here to trigger a rebuild:
http://
Preview Diff
1 | === modified file 'examples/demo-inprocess-surface-client/inprocess_egl_client.cpp' | |||
2 | --- examples/demo-inprocess-surface-client/inprocess_egl_client.cpp 2013-05-13 23:21:30 +0000 | |||
3 | +++ examples/demo-inprocess-surface-client/inprocess_egl_client.cpp 2013-05-14 23:46:25 +0000 | |||
4 | @@ -91,8 +91,8 @@ | |||
5 | 91 | std::bind(std::mem_fn(&me::InprocessEGLClient::handle_event), this, std::placeholders::_1)); | 91 | std::bind(std::mem_fn(&me::InprocessEGLClient::handle_event), this, std::placeholders::_1)); |
6 | 92 | input_thread->start(); | 92 | input_thread->start(); |
7 | 93 | 93 | ||
10 | 94 | auto internal_client = graphics_platform->create_internal_client(surface); | 94 | auto internal_client = graphics_platform->create_internal_client(); |
11 | 95 | me::EGLHelper helper(internal_client->egl_native_display(), internal_client->egl_native_window()); | 95 | me::EGLHelper helper(internal_client->egl_native_display(), internal_client->egl_native_window(surface)); |
12 | 96 | 96 | ||
13 | 97 | auto rc = eglMakeCurrent(helper.the_display(), helper.the_surface(), helper.the_surface(), helper.the_context()); | 97 | auto rc = eglMakeCurrent(helper.the_display(), helper.the_surface(), helper.the_surface(), helper.the_context()); |
14 | 98 | assert(rc == EGL_TRUE); | 98 | assert(rc == EGL_TRUE); |
15 | 99 | 99 | ||
16 | === modified file 'include/server/mir/graphics/internal_client.h' | |||
17 | --- include/server/mir/graphics/internal_client.h 2013-05-07 19:45:01 +0000 | |||
18 | +++ include/server/mir/graphics/internal_client.h 2013-05-14 23:46:25 +0000 | |||
19 | @@ -22,15 +22,21 @@ | |||
20 | 22 | 22 | ||
21 | 23 | #include <EGL/egl.h> | 23 | #include <EGL/egl.h> |
22 | 24 | 24 | ||
23 | 25 | #include <memory> | ||
24 | 26 | |||
25 | 25 | namespace mir | 27 | namespace mir |
26 | 26 | { | 28 | { |
27 | 29 | namespace frontend | ||
28 | 30 | { | ||
29 | 31 | class Surface; | ||
30 | 32 | } | ||
31 | 27 | namespace graphics | 33 | namespace graphics |
32 | 28 | { | 34 | { |
33 | 29 | class InternalClient | 35 | class InternalClient |
34 | 30 | { | 36 | { |
35 | 31 | public: | 37 | public: |
36 | 32 | virtual EGLNativeDisplayType egl_native_display() = 0; | 38 | virtual EGLNativeDisplayType egl_native_display() = 0; |
38 | 33 | virtual EGLNativeWindowType egl_native_window() = 0; | 39 | virtual EGLNativeWindowType egl_native_window(std::shared_ptr<frontend::Surface> const&) = 0; |
39 | 34 | protected: | 40 | protected: |
40 | 35 | InternalClient() = default; | 41 | InternalClient() = default; |
41 | 36 | virtual ~InternalClient() = default; | 42 | virtual ~InternalClient() = default; |
42 | 37 | 43 | ||
43 | === modified file 'include/server/mir/graphics/platform.h' | |||
44 | --- include/server/mir/graphics/platform.h 2013-05-07 19:45:01 +0000 | |||
45 | +++ include/server/mir/graphics/platform.h 2013-05-14 23:46:25 +0000 | |||
46 | @@ -56,7 +56,7 @@ | |||
47 | 56 | std::shared_ptr<BufferInitializer> const& buffer_initializer) = 0; | 56 | std::shared_ptr<BufferInitializer> const& buffer_initializer) = 0; |
48 | 57 | virtual std::shared_ptr<Display> create_display() = 0; | 57 | virtual std::shared_ptr<Display> create_display() = 0; |
49 | 58 | virtual std::shared_ptr<PlatformIPCPackage> get_ipc_package() = 0; | 58 | virtual std::shared_ptr<PlatformIPCPackage> get_ipc_package() = 0; |
51 | 59 | virtual std::shared_ptr<InternalClient> create_internal_client(std::shared_ptr<frontend::Surface> const&) = 0; | 59 | virtual std::shared_ptr<InternalClient> create_internal_client() = 0; |
52 | 60 | }; | 60 | }; |
53 | 61 | 61 | ||
54 | 62 | // Create and return a new graphics platform. | 62 | // Create and return a new graphics platform. |
55 | 63 | 63 | ||
56 | === modified file 'include/test/mir_test_doubles/stub_platform.h' | |||
57 | --- include/test/mir_test_doubles/stub_platform.h 2013-05-07 22:33:03 +0000 | |||
58 | +++ include/test/mir_test_doubles/stub_platform.h 2013-05-14 23:46:25 +0000 | |||
59 | @@ -48,7 +48,7 @@ | |||
60 | 48 | return std::make_shared<graphics::PlatformIPCPackage>(); | 48 | return std::make_shared<graphics::PlatformIPCPackage>(); |
61 | 49 | } | 49 | } |
62 | 50 | 50 | ||
64 | 51 | std::shared_ptr<graphics::InternalClient> create_internal_client(std::shared_ptr<frontend::Surface> const&) | 51 | std::shared_ptr<graphics::InternalClient> create_internal_client() |
65 | 52 | { | 52 | { |
66 | 53 | return std::shared_ptr<graphics::InternalClient>(); | 53 | return std::shared_ptr<graphics::InternalClient>(); |
67 | 54 | } | 54 | } |
68 | 55 | 55 | ||
69 | === modified file 'src/server/graphics/android/android_platform.cpp' | |||
70 | --- src/server/graphics/android/android_platform.cpp 2013-05-07 20:24:11 +0000 | |||
71 | +++ src/server/graphics/android/android_platform.cpp 2013-05-14 23:46:25 +0000 | |||
72 | @@ -61,10 +61,9 @@ | |||
73 | 61 | return std::make_shared<mg::PlatformIPCPackage>(); | 61 | return std::make_shared<mg::PlatformIPCPackage>(); |
74 | 62 | } | 62 | } |
75 | 63 | 63 | ||
78 | 64 | std::shared_ptr<mg::InternalClient> mga::AndroidPlatform::create_internal_client( | 64 | std::shared_ptr<mg::InternalClient> mga::AndroidPlatform::create_internal_client() |
77 | 65 | std::shared_ptr<mf::Surface> const& surface) | ||
79 | 66 | { | 65 | { |
81 | 67 | return std::make_shared<mga::InternalClient>(surface); | 66 | return std::make_shared<mga::InternalClient>(); |
82 | 68 | } | 67 | } |
83 | 69 | 68 | ||
84 | 70 | std::shared_ptr<mg::Platform> mg::create_platform(std::shared_ptr<DisplayReport> const& display_report) | 69 | std::shared_ptr<mg::Platform> mg::create_platform(std::shared_ptr<DisplayReport> const& display_report) |
85 | 71 | 70 | ||
86 | === modified file 'src/server/graphics/android/android_platform.h' | |||
87 | --- src/server/graphics/android/android_platform.h 2013-05-07 19:45:01 +0000 | |||
88 | +++ src/server/graphics/android/android_platform.h 2013-05-14 23:46:25 +0000 | |||
89 | @@ -39,7 +39,7 @@ | |||
90 | 39 | const std::shared_ptr<BufferInitializer>& buffer_initializer); | 39 | const std::shared_ptr<BufferInitializer>& buffer_initializer); |
91 | 40 | std::shared_ptr<Display> create_display(); | 40 | std::shared_ptr<Display> create_display(); |
92 | 41 | std::shared_ptr<PlatformIPCPackage> get_ipc_package(); | 41 | std::shared_ptr<PlatformIPCPackage> get_ipc_package(); |
94 | 42 | std::shared_ptr<InternalClient> create_internal_client(std::shared_ptr<frontend::Surface> const&); | 42 | std::shared_ptr<InternalClient> create_internal_client(); |
95 | 43 | 43 | ||
96 | 44 | private: | 44 | private: |
97 | 45 | std::shared_ptr<DisplayReport> const display_report; | 45 | std::shared_ptr<DisplayReport> const display_report; |
98 | 46 | 46 | ||
99 | === modified file 'src/server/graphics/android/internal_client.cpp' | |||
100 | --- src/server/graphics/android/internal_client.cpp 2013-05-07 20:15:09 +0000 | |||
101 | +++ src/server/graphics/android/internal_client.cpp 2013-05-14 23:46:25 +0000 | |||
102 | @@ -24,11 +24,9 @@ | |||
103 | 24 | namespace mf=mir::frontend; | 24 | namespace mf=mir::frontend; |
104 | 25 | namespace mga=mir::graphics::android; | 25 | namespace mga=mir::graphics::android; |
105 | 26 | 26 | ||
107 | 27 | mga::InternalClient::InternalClient(std::shared_ptr<frontend::Surface> const& surface) | 27 | mga::InternalClient::InternalClient() |
108 | 28 | : client_window(0) | ||
109 | 28 | { | 29 | { |
110 | 29 | auto cache = std::make_shared<mga::InterpreterCache>(); | ||
111 | 30 | auto interpreter = std::make_shared<mga::InternalClientWindow>(surface, cache); | ||
112 | 31 | client_window = std::make_shared<mga::MirNativeWindow>(interpreter); | ||
113 | 32 | } | 30 | } |
114 | 33 | 31 | ||
115 | 34 | EGLNativeDisplayType mga::InternalClient::egl_native_display() | 32 | EGLNativeDisplayType mga::InternalClient::egl_native_display() |
116 | @@ -36,7 +34,14 @@ | |||
117 | 36 | return EGL_DEFAULT_DISPLAY; | 34 | return EGL_DEFAULT_DISPLAY; |
118 | 37 | } | 35 | } |
119 | 38 | 36 | ||
121 | 39 | EGLNativeWindowType mga::InternalClient::egl_native_window() | 37 | EGLNativeWindowType mga::InternalClient::egl_native_window(std::shared_ptr<mf::Surface> const& surface) |
122 | 40 | { | 38 | { |
123 | 39 | if (!client_window) | ||
124 | 40 | { | ||
125 | 41 | auto cache = std::make_shared<mga::InterpreterCache>(); | ||
126 | 42 | auto interpreter = std::make_shared<mga::InternalClientWindow>(surface, cache); | ||
127 | 43 | client_window = std::make_shared<mga::MirNativeWindow>(interpreter); | ||
128 | 44 | } | ||
129 | 45 | |||
130 | 41 | return client_window.get(); | 46 | return client_window.get(); |
131 | 42 | } | 47 | } |
132 | 43 | 48 | ||
133 | === modified file 'src/server/graphics/android/internal_client.h' | |||
134 | --- src/server/graphics/android/internal_client.h 2013-05-07 20:15:09 +0000 | |||
135 | +++ src/server/graphics/android/internal_client.h 2013-05-14 23:46:25 +0000 | |||
136 | @@ -37,9 +37,9 @@ | |||
137 | 37 | class InternalClient : public mir::graphics::InternalClient | 37 | class InternalClient : public mir::graphics::InternalClient |
138 | 38 | { | 38 | { |
139 | 39 | public: | 39 | public: |
141 | 40 | InternalClient(std::shared_ptr<frontend::Surface> const&); | 40 | InternalClient(); |
142 | 41 | EGLNativeDisplayType egl_native_display(); | 41 | EGLNativeDisplayType egl_native_display(); |
144 | 42 | EGLNativeWindowType egl_native_window(); | 42 | EGLNativeWindowType egl_native_window(std::shared_ptr<frontend::Surface> const&); |
145 | 43 | 43 | ||
146 | 44 | private: | 44 | private: |
147 | 45 | std::shared_ptr<MirNativeWindow> client_window; | 45 | std::shared_ptr<MirNativeWindow> client_window; |
148 | 46 | 46 | ||
149 | === modified file 'src/server/graphics/gbm/gbm_platform.cpp' | |||
150 | --- src/server/graphics/gbm/gbm_platform.cpp 2013-05-08 18:57:03 +0000 | |||
151 | +++ src/server/graphics/gbm/gbm_platform.cpp 2013-05-14 23:46:25 +0000 | |||
152 | @@ -118,13 +118,12 @@ | |||
153 | 118 | drm.auth_magic(magic); | 118 | drm.auth_magic(magic); |
154 | 119 | } | 119 | } |
155 | 120 | 120 | ||
158 | 121 | std::shared_ptr<mg::InternalClient> mgg::GBMPlatform::create_internal_client( | 121 | std::shared_ptr<mg::InternalClient> mgg::GBMPlatform::create_internal_client() |
157 | 122 | std::shared_ptr<frontend::Surface> const& surface) | ||
159 | 123 | { | 122 | { |
160 | 124 | if (!internal_native_display) | 123 | if (!internal_native_display) |
161 | 125 | internal_native_display = std::make_shared<mgg::InternalNativeDisplay>(get_ipc_package()); | 124 | internal_native_display = std::make_shared<mgg::InternalNativeDisplay>(get_ipc_package()); |
162 | 126 | internal_display_clients_present = true; | 125 | internal_display_clients_present = true; |
164 | 127 | return std::make_shared<mgg::InternalClient>(internal_native_display, surface); | 126 | return std::make_shared<mgg::InternalClient>(internal_native_display); |
165 | 128 | } | 127 | } |
166 | 129 | 128 | ||
167 | 130 | std::shared_ptr<mg::Platform> mg::create_platform(std::shared_ptr<DisplayReport> const& report) | 129 | std::shared_ptr<mg::Platform> mg::create_platform(std::shared_ptr<DisplayReport> const& report) |
168 | 131 | 130 | ||
169 | === modified file 'src/server/graphics/gbm/gbm_platform.h' | |||
170 | --- src/server/graphics/gbm/gbm_platform.h 2013-05-08 18:57:03 +0000 | |||
171 | +++ src/server/graphics/gbm/gbm_platform.h 2013-05-14 23:46:25 +0000 | |||
172 | @@ -48,7 +48,7 @@ | |||
173 | 48 | const std::shared_ptr<BufferInitializer>& buffer_initializer); | 48 | const std::shared_ptr<BufferInitializer>& buffer_initializer); |
174 | 49 | std::shared_ptr<Display> create_display(); | 49 | std::shared_ptr<Display> create_display(); |
175 | 50 | std::shared_ptr<PlatformIPCPackage> get_ipc_package(); | 50 | std::shared_ptr<PlatformIPCPackage> get_ipc_package(); |
177 | 51 | std::shared_ptr<InternalClient> create_internal_client(std::shared_ptr<frontend::Surface> const&); | 51 | std::shared_ptr<InternalClient> create_internal_client(); |
178 | 52 | 52 | ||
179 | 53 | /* From DRMAuthenticator */ | 53 | /* From DRMAuthenticator */ |
180 | 54 | void drm_auth_magic(drm_magic_t magic); | 54 | void drm_auth_magic(drm_magic_t magic); |
181 | 55 | 55 | ||
182 | === modified file 'src/server/graphics/gbm/internal_client.cpp' | |||
183 | --- src/server/graphics/gbm/internal_client.cpp 2013-05-09 18:46:57 +0000 | |||
184 | +++ src/server/graphics/gbm/internal_client.cpp 2013-05-14 23:46:25 +0000 | |||
185 | @@ -22,10 +22,8 @@ | |||
186 | 22 | namespace mgg=mir::graphics::gbm; | 22 | namespace mgg=mir::graphics::gbm; |
187 | 23 | namespace mf=mir::frontend; | 23 | namespace mf=mir::frontend; |
188 | 24 | 24 | ||
193 | 25 | mgg::InternalClient::InternalClient(std::shared_ptr<MirMesaEGLNativeDisplay> const& native_display, | 25 | mgg::InternalClient::InternalClient(std::shared_ptr<MirMesaEGLNativeDisplay> const& native_display) |
194 | 26 | std::shared_ptr<mf::Surface> const& surface) | 26 | : native_display(native_display) |
191 | 27 | : native_display(native_display), | ||
192 | 28 | surface(surface) | ||
195 | 29 | { | 27 | { |
196 | 30 | } | 28 | } |
197 | 31 | 29 | ||
198 | @@ -34,7 +32,7 @@ | |||
199 | 34 | return reinterpret_cast<EGLNativeDisplayType>(native_display.get()); | 32 | return reinterpret_cast<EGLNativeDisplayType>(native_display.get()); |
200 | 35 | } | 33 | } |
201 | 36 | 34 | ||
203 | 37 | EGLNativeWindowType mgg::InternalClient::egl_native_window() | 35 | EGLNativeWindowType mgg::InternalClient::egl_native_window(std::shared_ptr<mf::Surface> const& surface) |
204 | 38 | { | 36 | { |
205 | 39 | return reinterpret_cast<EGLNativeWindowType>(surface.get()); | 37 | return reinterpret_cast<EGLNativeWindowType>(surface.get()); |
206 | 40 | } | 38 | } |
207 | 41 | 39 | ||
208 | === modified file 'src/server/graphics/gbm/internal_client.h' | |||
209 | --- src/server/graphics/gbm/internal_client.h 2013-05-08 18:57:03 +0000 | |||
210 | +++ src/server/graphics/gbm/internal_client.h 2013-05-14 23:46:25 +0000 | |||
211 | @@ -38,14 +38,12 @@ | |||
212 | 38 | class InternalClient : public mir::graphics::InternalClient | 38 | class InternalClient : public mir::graphics::InternalClient |
213 | 39 | { | 39 | { |
214 | 40 | public: | 40 | public: |
217 | 41 | InternalClient(std::shared_ptr<MirMesaEGLNativeDisplay> const&, | 41 | InternalClient(std::shared_ptr<MirMesaEGLNativeDisplay> const&); |
216 | 42 | std::shared_ptr<frontend::Surface> const&); | ||
218 | 43 | EGLNativeDisplayType egl_native_display(); | 42 | EGLNativeDisplayType egl_native_display(); |
220 | 44 | EGLNativeWindowType egl_native_window(); | 43 | EGLNativeWindowType egl_native_window(std::shared_ptr<frontend::Surface> const&); |
221 | 45 | 44 | ||
222 | 46 | private: | 45 | private: |
223 | 47 | std::shared_ptr<MirMesaEGLNativeDisplay> const native_display; | 46 | std::shared_ptr<MirMesaEGLNativeDisplay> const native_display; |
224 | 48 | std::shared_ptr<frontend::Surface> const surface; | ||
225 | 49 | }; | 47 | }; |
226 | 50 | 48 | ||
227 | 51 | } | 49 | } |
228 | 52 | 50 | ||
229 | === modified file 'tests/integration-tests/graphics/android/test_internal_client.cpp' | |||
230 | --- tests/integration-tests/graphics/android/test_internal_client.cpp 2013-05-07 19:45:01 +0000 | |||
231 | +++ tests/integration-tests/graphics/android/test_internal_client.cpp 2013-05-14 23:46:25 +0000 | |||
232 | @@ -93,7 +93,7 @@ | |||
233 | 93 | 93 | ||
234 | 94 | auto report = std::shared_ptr<mg::NullDisplayReport>(); | 94 | auto report = std::shared_ptr<mg::NullDisplayReport>(); |
235 | 95 | auto platform = mg::create_platform(report); | 95 | auto platform = mg::create_platform(report); |
237 | 96 | auto internal_client = platform->create_internal_client(mir_surface); | 96 | auto internal_client = platform->create_internal_client(); |
238 | 97 | 97 | ||
239 | 98 | int major, minor, n; | 98 | int major, minor, n; |
240 | 99 | EGLContext egl_context; | 99 | EGLContext egl_context; |
241 | @@ -116,7 +116,7 @@ | |||
242 | 116 | rc = eglChooseConfig(egl_display, attribs, &egl_config, 1, &n); | 116 | rc = eglChooseConfig(egl_display, attribs, &egl_config, 1, &n); |
243 | 117 | EXPECT_EQ(EGL_TRUE, rc); | 117 | EXPECT_EQ(EGL_TRUE, rc); |
244 | 118 | 118 | ||
246 | 119 | egl_surface = eglCreateWindowSurface(egl_display, egl_config, internal_client->egl_native_window(), NULL); | 119 | egl_surface = eglCreateWindowSurface(egl_display, egl_config, internal_client->egl_native_window(mir_surface), NULL); |
247 | 120 | EXPECT_NE(EGL_NO_SURFACE, egl_surface); | 120 | EXPECT_NE(EGL_NO_SURFACE, egl_surface); |
248 | 121 | 121 | ||
249 | 122 | egl_context = eglCreateContext(egl_display, egl_config, EGL_NO_CONTEXT, context_attribs); | 122 | egl_context = eglCreateContext(egl_display, egl_config, EGL_NO_CONTEXT, context_attribs); |
250 | 123 | 123 | ||
251 | === modified file 'tests/integration-tests/graphics/gbm/test_buffer_integration.cpp' | |||
252 | --- tests/integration-tests/graphics/gbm/test_buffer_integration.cpp 2013-05-07 22:33:03 +0000 | |||
253 | +++ tests/integration-tests/graphics/gbm/test_buffer_integration.cpp 2013-05-14 23:46:25 +0000 | |||
254 | @@ -100,7 +100,7 @@ | |||
255 | 100 | return std::shared_ptr<mg::PlatformIPCPackage>(); | 100 | return std::shared_ptr<mg::PlatformIPCPackage>(); |
256 | 101 | } | 101 | } |
257 | 102 | 102 | ||
259 | 103 | std::shared_ptr<mg::InternalClient> create_internal_client(std::shared_ptr<mir::frontend::Surface> const&) | 103 | std::shared_ptr<mg::InternalClient> create_internal_client() |
260 | 104 | { | 104 | { |
261 | 105 | return std::shared_ptr<mg::InternalClient>(); | 105 | return std::shared_ptr<mg::InternalClient>(); |
262 | 106 | } | 106 | } |
263 | 107 | 107 | ||
264 | === modified file 'tests/integration-tests/test_display_info.cpp' | |||
265 | --- tests/integration-tests/test_display_info.cpp 2013-05-07 19:45:01 +0000 | |||
266 | +++ tests/integration-tests/test_display_info.cpp 2013-05-14 23:46:25 +0000 | |||
267 | @@ -105,7 +105,7 @@ | |||
268 | 105 | return std::make_shared<mg::PlatformIPCPackage>(); | 105 | return std::make_shared<mg::PlatformIPCPackage>(); |
269 | 106 | } | 106 | } |
270 | 107 | 107 | ||
272 | 108 | std::shared_ptr<mg::InternalClient> create_internal_client(std::shared_ptr<mf::Surface> const&) | 108 | std::shared_ptr<mg::InternalClient> create_internal_client() |
273 | 109 | { | 109 | { |
274 | 110 | return std::shared_ptr<mg::InternalClient>(); | 110 | return std::shared_ptr<mg::InternalClient>(); |
275 | 111 | } | 111 | } |
276 | 112 | 112 | ||
277 | === modified file 'tests/integration-tests/test_drm_auth_magic.cpp' | |||
278 | --- tests/integration-tests/test_drm_auth_magic.cpp 2013-05-07 22:33:03 +0000 | |||
279 | +++ tests/integration-tests/test_drm_auth_magic.cpp 2013-05-14 23:46:25 +0000 | |||
280 | @@ -80,7 +80,7 @@ | |||
281 | 80 | return std::make_shared<mg::PlatformIPCPackage>(); | 80 | return std::make_shared<mg::PlatformIPCPackage>(); |
282 | 81 | } | 81 | } |
283 | 82 | 82 | ||
285 | 83 | std::shared_ptr<mg::InternalClient> create_internal_client(std::shared_ptr<mir::frontend::Surface> const&) | 83 | std::shared_ptr<mg::InternalClient> create_internal_client() |
286 | 84 | { | 84 | { |
287 | 85 | return std::shared_ptr<mg::InternalClient>(); | 85 | return std::shared_ptr<mg::InternalClient>(); |
288 | 86 | } | 86 | } |
289 | 87 | 87 | ||
290 | === modified file 'tests/integration-tests/test_surfaceloop.cpp' | |||
291 | --- tests/integration-tests/test_surfaceloop.cpp 2013-05-07 19:45:01 +0000 | |||
292 | +++ tests/integration-tests/test_surfaceloop.cpp 2013-05-14 23:46:25 +0000 | |||
293 | @@ -356,7 +356,7 @@ | |||
294 | 356 | return std::make_shared<mg::PlatformIPCPackage>(); | 356 | return std::make_shared<mg::PlatformIPCPackage>(); |
295 | 357 | } | 357 | } |
296 | 358 | 358 | ||
298 | 359 | std::shared_ptr<mg::InternalClient> create_internal_client(std::shared_ptr<mf::Surface> const&) | 359 | std::shared_ptr<mg::InternalClient> create_internal_client() |
299 | 360 | { | 360 | { |
300 | 361 | return std::shared_ptr<mg::InternalClient>(); | 361 | return std::shared_ptr<mg::InternalClient>(); |
301 | 362 | } | 362 | } |
302 | @@ -488,7 +488,7 @@ | |||
303 | 488 | return std::make_shared<mg::PlatformIPCPackage>(); | 488 | return std::make_shared<mg::PlatformIPCPackage>(); |
304 | 489 | } | 489 | } |
305 | 490 | 490 | ||
307 | 491 | std::shared_ptr<mg::InternalClient> create_internal_client(std::shared_ptr<mf::Surface> const&) | 491 | std::shared_ptr<mg::InternalClient> create_internal_client() |
308 | 492 | { | 492 | { |
309 | 493 | return std::shared_ptr<mg::InternalClient>(); | 493 | return std::shared_ptr<mg::InternalClient>(); |
310 | 494 | } | 494 | } |
311 | 495 | 495 | ||
312 | === modified file 'tests/mir_test_framework/testing_server_options.cpp' | |||
313 | --- tests/mir_test_framework/testing_server_options.cpp 2013-05-07 19:45:01 +0000 | |||
314 | +++ tests/mir_test_framework/testing_server_options.cpp 2013-05-14 23:46:25 +0000 | |||
315 | @@ -119,7 +119,7 @@ | |||
316 | 119 | return std::make_shared<mg::PlatformIPCPackage>(); | 119 | return std::make_shared<mg::PlatformIPCPackage>(); |
317 | 120 | } | 120 | } |
318 | 121 | 121 | ||
320 | 122 | std::shared_ptr<mg::InternalClient> create_internal_client(std::shared_ptr<mf::Surface> const&) | 122 | std::shared_ptr<mg::InternalClient> create_internal_client() |
321 | 123 | { | 123 | { |
322 | 124 | return std::shared_ptr<mg::InternalClient>(); | 124 | return std::shared_ptr<mg::InternalClient>(); |
323 | 125 | } | 125 | } |
324 | 126 | 126 | ||
325 | === modified file 'tests/unit-tests/frontend/test_session_mediator_gbm.cpp' | |||
326 | --- tests/unit-tests/frontend/test_session_mediator_gbm.cpp 2013-05-07 22:33:03 +0000 | |||
327 | +++ tests/unit-tests/frontend/test_session_mediator_gbm.cpp 2013-05-14 23:46:25 +0000 | |||
328 | @@ -83,7 +83,7 @@ | |||
329 | 83 | return std::make_shared<mg::PlatformIPCPackage>(); | 83 | return std::make_shared<mg::PlatformIPCPackage>(); |
330 | 84 | } | 84 | } |
331 | 85 | 85 | ||
333 | 86 | std::shared_ptr<mg::InternalClient> create_internal_client(std::shared_ptr<mf::Surface> const&) | 86 | std::shared_ptr<mg::InternalClient> create_internal_client() |
334 | 87 | { | 87 | { |
335 | 88 | return std::shared_ptr<mg::InternalClient>(); | 88 | return std::shared_ptr<mg::InternalClient>(); |
336 | 89 | } | 89 | } |
337 | 90 | 90 | ||
338 | === modified file 'tests/unit-tests/graphics/android/test_internal_client.cpp' | |||
339 | --- tests/unit-tests/graphics/android/test_internal_client.cpp 2013-05-07 20:07:10 +0000 | |||
340 | +++ tests/unit-tests/graphics/android/test_internal_client.cpp 2013-05-14 23:46:25 +0000 | |||
341 | @@ -68,15 +68,15 @@ | |||
342 | 68 | TEST(InternalClient, native_display) | 68 | TEST(InternalClient, native_display) |
343 | 69 | { | 69 | { |
344 | 70 | auto surface = std::make_shared<StubSurface>(); | 70 | auto surface = std::make_shared<StubSurface>(); |
346 | 71 | mga::InternalClient client(surface); | 71 | mga::InternalClient client; |
347 | 72 | EXPECT_EQ(EGL_DEFAULT_DISPLAY, client.egl_native_display()); | 72 | EXPECT_EQ(EGL_DEFAULT_DISPLAY, client.egl_native_display()); |
348 | 73 | } | 73 | } |
349 | 74 | 74 | ||
350 | 75 | TEST(InternalClient, native_window) | 75 | TEST(InternalClient, native_window) |
351 | 76 | { | 76 | { |
352 | 77 | auto surface = std::make_shared<StubSurface>(); | 77 | auto surface = std::make_shared<StubSurface>(); |
355 | 78 | mga::InternalClient client(surface); | 78 | mga::InternalClient client; |
356 | 79 | ANativeWindow* native_window = static_cast<ANativeWindow*>(client.egl_native_window()); | 79 | ANativeWindow* native_window = static_cast<ANativeWindow*>(client.egl_native_window(surface)); |
357 | 80 | 80 | ||
358 | 81 | /* check for basic window sanity */ | 81 | /* check for basic window sanity */ |
359 | 82 | ASSERT_NE(nullptr, native_window); | 82 | ASSERT_NE(nullptr, native_window); |
360 | 83 | 83 | ||
361 | === modified file 'tests/unit-tests/graphics/gbm/test_gbm_platform.cpp' | |||
362 | --- tests/unit-tests/graphics/gbm/test_gbm_platform.cpp 2013-05-08 18:57:03 +0000 | |||
363 | +++ tests/unit-tests/graphics/gbm/test_gbm_platform.cpp 2013-05-14 23:46:25 +0000 | |||
364 | @@ -21,7 +21,6 @@ | |||
365 | 21 | #include "src/server/graphics/gbm/gbm_platform.h" | 21 | #include "src/server/graphics/gbm/gbm_platform.h" |
366 | 22 | #include "src/server/graphics/gbm/internal_client.h" | 22 | #include "src/server/graphics/gbm/internal_client.h" |
367 | 23 | #include "mir_test_doubles/null_virtual_terminal.h" | 23 | #include "mir_test_doubles/null_virtual_terminal.h" |
368 | 24 | #include "mir_test_doubles/stub_surface.h" | ||
369 | 25 | 24 | ||
370 | 26 | #include "mir/graphics/null_display_report.h" | 25 | #include "mir/graphics/null_display_report.h" |
371 | 27 | 26 | ||
372 | @@ -148,12 +147,11 @@ | |||
373 | 148 | */ | 147 | */ |
374 | 149 | TEST_F(GBMGraphicsPlatform, platform_provides_validation_of_display_for_internal_clients) | 148 | TEST_F(GBMGraphicsPlatform, platform_provides_validation_of_display_for_internal_clients) |
375 | 150 | { | 149 | { |
376 | 151 | auto stub_surface = std::make_shared<mtd::StubSurface>(); | ||
377 | 152 | MirMesaEGLNativeDisplay* native_display = nullptr; | 150 | MirMesaEGLNativeDisplay* native_display = nullptr; |
378 | 153 | EXPECT_EQ(0, mir_server_internal_display_is_valid(native_display)); | 151 | EXPECT_EQ(0, mir_server_internal_display_is_valid(native_display)); |
379 | 154 | { | 152 | { |
380 | 155 | auto platform = create_platform(); | 153 | auto platform = create_platform(); |
382 | 156 | auto client = platform->create_internal_client(stub_surface); | 154 | auto client = platform->create_internal_client(); |
383 | 157 | native_display = reinterpret_cast<MirMesaEGLNativeDisplay*>(client->egl_native_display()); | 155 | native_display = reinterpret_cast<MirMesaEGLNativeDisplay*>(client->egl_native_display()); |
384 | 158 | EXPECT_EQ(1, mir_server_internal_display_is_valid(native_display)); | 156 | EXPECT_EQ(1, mir_server_internal_display_is_valid(native_display)); |
385 | 159 | } | 157 | } |
386 | 160 | 158 | ||
387 | === modified file 'tests/unit-tests/graphics/gbm/test_internal_client.cpp' | |||
388 | --- tests/unit-tests/graphics/gbm/test_internal_client.cpp 2013-05-08 18:57:03 +0000 | |||
389 | +++ tests/unit-tests/graphics/gbm/test_internal_client.cpp 2013-05-14 23:46:25 +0000 | |||
390 | @@ -33,10 +33,10 @@ | |||
391 | 33 | { | 33 | { |
392 | 34 | auto stub_window = std::make_shared<mtd::StubSurface>(); | 34 | auto stub_window = std::make_shared<mtd::StubSurface>(); |
393 | 35 | auto stub_display = std::make_shared<MirMesaEGLNativeDisplay>(); | 35 | auto stub_display = std::make_shared<MirMesaEGLNativeDisplay>(); |
395 | 36 | mgg::InternalClient client(stub_display, stub_window); | 36 | mgg::InternalClient client(stub_display); |
396 | 37 | 37 | ||
397 | 38 | auto native_display = client.egl_native_display(); | 38 | auto native_display = client.egl_native_display(); |
399 | 39 | auto native_window = client.egl_native_window(); | 39 | auto native_window = client.egl_native_window(stub_window); |
400 | 40 | 40 | ||
401 | 41 | EXPECT_EQ(reinterpret_cast<EGLNativeDisplayType>(stub_display.get()), native_display); | 41 | EXPECT_EQ(reinterpret_cast<EGLNativeDisplayType>(stub_display.get()), native_display); |
402 | 42 | EXPECT_EQ(reinterpret_cast<EGLNativeWindowType>(stub_window.get()), native_window); | 42 | EXPECT_EQ(reinterpret_cast<EGLNativeWindowType>(stub_window.get()), native_window); |
PASSED: Continuous integration, rev:685 jenkins. qa.ubuntu. com/job/ mir-ci/ 584/ jenkins. qa.ubuntu. com/job/ mir-android- raring- i386-build/ 689 jenkins. qa.ubuntu. com/job/ mir-clang- raring- amd64-build/ 572 jenkins. qa.ubuntu. com/job/ mir-raring- amd64-ci/ 68 jenkins. qa.ubuntu. com/job/ mir-raring- amd64-ci/ 68/artifact/ work/output/ *zip*/output. zip jenkins. qa.ubuntu. com/job/ mir-vm- ci-build/ ./distribution= precise, flavor= amd64/313
http://
Executed test runs:
SUCCESS: http://
SUCCESS: http://
SUCCESS: http://
deb: http://
SUCCESS: http://
Click here to trigger a rebuild: s-jenkins: 8080/job/ mir-ci/ 584/rebuild
http://