Merge lp:~robertcarr/platform-api/update-mir-deprecation into lp:platform-api

Proposed by Robert Carr on 2014-03-27
Status: Needs review
Proposed branch: lp:~robertcarr/platform-api/update-mir-deprecation
Merge into: lp:platform-api
Diff against target: 29 lines (+9/-3)
1 file modified
src/ubuntu/mirclient/window_mirclient.cpp (+9/-3)
To merge this branch: bzr merge lp:~robertcarr/platform-api/update-mir-deprecation
Reviewer Review Type Date Requested Status
Alberto Aguirre (community) Needs Fixing on 2014-11-06
Gerry Boland (community) 2014-03-27 Needs Information on 2014-11-06
PS Jenkins bot continuous-integration Approve on 2014-03-27
Review via email: mp+213142@code.launchpad.net

Commit message

Update to avoid use of a deprecated mir function (mir_connection_get_display_info). (LP: #1369425)

Description of the change

Just noticed this while building stuff. Update to avoid use of a deprecated mir function.

To post a comment you must log in.
Gerry Boland (gerboland) wrote :

This still relevant?

review: Needs Information
Alberto Aguirre (albaguirre) wrote :

Yeah still relevant, deprecated api is still used except now in one more place:

src/ubuntu/application/common/mirclient/ubuntu_application_api_mirclient.cpp
173: mir_connection_get_display_info(instance->connection(), display);

review: Needs Fixing

Unmerged revisions

205. By Robert Carr on 2014-03-27

Update deprecated mir API usage

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'src/ubuntu/mirclient/window_mirclient.cpp'
2--- src/ubuntu/mirclient/window_mirclient.cpp 2013-10-14 21:22:49 +0000
3+++ src/ubuntu/mirclient/window_mirclient.cpp 2014-03-27 20:26:05 +0000
4@@ -23,6 +23,8 @@
5
6 #include "mircommon/event_helpers_mir.h"
7
8+#include <assert.h>
9+
10 namespace uamc = ubuntu::application::mir::client;
11 namespace uaum = ubuntu::application::ui::mir;
12
13@@ -69,9 +71,13 @@
14 static MirPixelFormat
15 mir_choose_default_pixel_format(MirConnection *connection)
16 {
17- MirDisplayInfo info;
18- mir_connection_get_display_info(connection, &info);
19- return info.supported_pixel_format[0];
20+ MirPixelFormat format;
21+ unsigned num_formats;
22+
23+ mir_connection_get_available_surface_formats(connection, &format, 1, &num_formats);
24+ assert(num_formats == 1);
25+
26+ return format;
27 }
28
29 static MirSurface*

Subscribers

People subscribed via source and target branches