Mir

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

Proposed by Daniel van Vugt
Status: Merged
Approved by: Daniel van Vugt
Approved revision: no longer in the source branch.
Merged at revision: 1231
Proposed branch: lp:~vanvugt/mir/fix-1168304
Merge into: lp:mir
Diff against target: 55 lines (+8/-9)
2 files modified
examples/eglapp.c (+6/-8)
include/shared/mir_toolkit/client_types.h (+2/-1)
To merge this branch: bzr merge lp:~vanvugt/mir/fix-1168304
Reviewer Review Type Date Requested Status
PS Jenkins bot (community) continuous-integration Approve
Kevin DuBois (community) Approve
Alan Griffiths Approve
Review via email: mp+195568@code.launchpad.net

Commit message

eglapp: Clarify messages about pixel formats (LP: #1168304)

To post a comment you must log in.
Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Needs Fixing (continuous-integration)
Revision history for this message
Alan Griffiths (alan-griffiths) wrote :

Build failure appears to be unrelated

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

lgtm

review: Approve
Revision history for this message
PS Jenkins bot (ps-jenkins) :
review: Approve (continuous-integration)

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'examples/eglapp.c'
2--- examples/eglapp.c 2013-10-07 09:21:27 +0000
3+++ examples/eglapp.c 2013-11-18 10:07:45 +0000
4@@ -300,12 +300,11 @@
5
6 const MirDisplayMode *mode = &output->modes[output->current_mode];
7
8- const unsigned int max_formats = 10;
9- unsigned int format[max_formats];
10+ unsigned int format[mir_pixel_formats];
11 unsigned int nformats;
12
13 mir_connection_get_available_surface_formats(connection,
14- format, max_formats, &nformats);
15+ format, mir_pixel_formats, &nformats);
16
17 surfaceparm.pixel_format = format[0];
18 for (unsigned int f = 0; f < nformats; f++)
19@@ -322,18 +321,17 @@
20 }
21 }
22
23- printf("Connected to display: resolution (%dx%d), position(%dx%d), "
24- "supports %d pixel formats\n",
25+ printf("Current active output is %dx%d %+d%+d\n",
26 mode->horizontal_resolution, mode->vertical_resolution,
27- output->position_x, output->position_y,
28- output->num_output_formats);
29+ output->position_x, output->position_y);
30
31 surfaceparm.width = *width > 0 ? *width : mode->horizontal_resolution;
32 surfaceparm.height = *height > 0 ? *height : mode->vertical_resolution;
33
34 mir_display_config_destroy(display_config);
35
36- printf("Using pixel format #%d\n", surfaceparm.pixel_format);
37+ printf("Server supports %d of %d surface pixel formats. Using format: %d\n",
38+ nformats, mir_pixel_formats, surfaceparm.pixel_format);
39 unsigned int bpp = get_bpp(surfaceparm.pixel_format);
40 EGLint attribs[] =
41 {
42
43=== modified file 'include/shared/mir_toolkit/client_types.h'
44--- include/shared/mir_toolkit/client_types.h 2013-09-12 21:36:55 +0000
45+++ include/shared/mir_toolkit/client_types.h 2013-11-18 10:07:45 +0000
46@@ -112,7 +112,8 @@
47 mir_pixel_format_xbgr_8888,
48 mir_pixel_format_argb_8888,
49 mir_pixel_format_xrgb_8888,
50- mir_pixel_format_bgr_888
51+ mir_pixel_format_bgr_888,
52+ mir_pixel_formats
53 } MirPixelFormat;
54
55 /**

Subscribers

People subscribed via source and target branches