Merge lp:~raof/mir/plumb-subpixel-info into lp:mir
- plumb-subpixel-info
- Merge into development-branch
Status: | Merged |
---|---|
Approved by: | Chris Halse Rogers |
Approved revision: | no longer in the source branch. |
Merged at revision: | 3642 |
Proposed branch: | lp:~raof/mir/plumb-subpixel-info |
Merge into: | lp:mir |
Diff against target: |
690 lines (+218/-42) 25 files modified
include/client/mir_toolkit/mir_display_configuration.h (+9/-0) include/common/mir_toolkit/common.h (+16/-0) include/platform/mir/graphics/display_configuration.h (+4/-0) include/test/mir/test/doubles/stub_display_configuration.h (+22/-2) src/client/display_configuration_api.cpp (+7/-0) src/client/symbols.map (+1/-0) src/platform/graphics/display_configuration.cpp (+2/-1) src/platforms/android/server/display_configuration.cpp (+3/-1) src/platforms/android/server/fb_device.cpp (+2/-1) src/platforms/android/server/hwc_blanking_control.cpp (+2/-1) src/platforms/mesa/server/kms/real_kms_display_configuration.cpp (+1/-1) src/platforms/mesa/server/x11/graphics/display_configuration.cpp (+2/-1) src/protobuf/mir_protobuf.proto (+1/-0) src/server/frontend/protobuf_buffer_packer.cpp (+1/-0) src/server/graphics/nested/nested_display_configuration.cpp (+6/-4) src/server/graphics/nested/nested_display_configuration.h (+1/-0) tests/acceptance-tests/test_new_display_configuration.cpp (+44/-0) tests/mir_test/display_config_matchers.cpp (+6/-3) tests/mir_test_doubles/stub_display_configuration.cpp (+56/-11) tests/unit-tests/graphics/mesa/kms/test_cursor.cpp (+6/-3) tests/unit-tests/graphics/mesa/kms/test_display_configuration.cpp (+18/-9) tests/unit-tests/graphics/test_default_display_configuration_policy.cpp (+2/-1) tests/unit-tests/graphics/test_display_configuration.cpp (+2/-1) tests/unit-tests/graphics/test_overlapping_output_grouping.cpp (+2/-1) tests/unit-tests/scene/test_mediating_display_changer.cpp (+2/-1) |
To merge this branch: | bzr merge lp:~raof/mir/plumb-subpixel-info |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Mir CI Bot | continuous-integration | Approve | |
Cemil Azizoglu (community) | Approve | ||
Daniel van Vugt | Approve | ||
Kevin DuBois (community) | Approve | ||
Review via email: mp+302377@code.launchpad.net |
Commit message
Add subpixel arrangement info to the display configuration API.
Current platforms only provide mir_subpixel_
Fixes (part one): https:/
Description of the change
Chris Halse Rogers (raof) wrote : | # |
Heh. Pentile was exactly the reason I did not choose “order”; pentile isn't an order, it's an arrangement :).
DRM uses HORIZONTAL_RGB, VERTICAL_RGB, etc. I could abbreviate, I guess.
I don't think any of our platforms can actually *report* a pentile arrangement; once we have an API that can actually return that value to us, it's easy to add it to the Mir enum :)
Daniel van Vugt (vanvugt) wrote : | # |
Cool. I half expected as much.
I'm still annoyed and confused by pentile. It always seems to look worse...
Chris Halse Rogers (raof) wrote : | # |
That's because it *is* worse :).
It discards RGB information from each pixel.
Mir CI Bot (mir-ci-bot) wrote : | # |
PASSED: Continuous integration, rev:3639
https:/
Executed test runs:
SUCCESS: https:/
SUCCESS: https:/
SUCCESS: https:/
SUCCESS: https:/
SUCCESS: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
Click here to trigger a rebuild:
https:/
Daniel van Vugt (vanvugt) wrote : | # |
In the future I expect you would also want:
mir_surface_
For clients to choose the correct arrangement for their window. Interestingly my frame timing work has the same long-term requirement -- to know which output a surface is mostly on. Subpixel arrangement and frame timing are both specific to an output. While I can see this requirement, I also hate it. In a beautiful world a client should never know or care the attributes of a physical display it is on. With some luck most of the time all displays would have the same or very similar values.
On that note however, I still like the idea of having the option (a fake display mode) to triple the resolution and let the system compositor do sub-pixel rendering of everything(!).
Chris Halse Rogers (raof) wrote : | # |
On Wed, Aug 10, 2016 at 5:37 PM, Daniel van Vugt
<email address hidden> wrote:
> Review: Approve
>
> In the future I expect you would also want:
>
> mir_surface_
Actually, I think I'll just attach a MirOutput* to the surface output
event, and then clients can slurp all the relevant values out.
Mir CI Bot (mir-ci-bot) wrote : | # |
FAILED: Autolanding.
More details in the following jenkins job:
https:/
Executed test runs:
FAILURE: https:/
None: https:/
SUCCESS: https:/
SUCCESS: https:/
SUCCESS: https:/
SUCCESS: https:/
FAILURE: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
Alan Griffiths (alan-griffiths) wrote : | # |
08:00:22 9: [ FAILED ] NestedServer.
lp:1523621 I presume
Mir CI Bot (mir-ci-bot) wrote : | # |
FAILED: Autolanding.
More details in the following jenkins job:
https:/
Executed test runs:
FAILURE: https:/
None: https:/
SUCCESS: https:/
SUCCESS: https:/
SUCCESS: https:/
SUCCESS: https:/
FAILURE: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
Chris Halse Rogers (raof) wrote : | # |
[ FAILED ] NestedInput.
Unlikely to be this branch; not the same as lp:1523621, but maybe similar?
Mir CI Bot (mir-ci-bot) wrote : | # |
FAILED: Autolanding.
More details in the following jenkins job:
https:/
Executed test runs:
FAILURE: https:/
None: https:/
SUCCESS: https:/
FAILURE: https:/
FAILURE: https:/
FAILURE: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
Daniel van Vugt (vanvugt) wrote : | # |
Java says no: java.io.
Mir CI Bot (mir-ci-bot) wrote : | # |
FAILED: Autolanding.
More details in the following jenkins job:
https:/
Executed test runs:
FAILURE: https:/
None: https:/
SUCCESS: https:/
FAILURE: https:/
FAILURE: https:/
FAILURE: https:/
SUCCESS: https:/
deb: https:/
FAILURE: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
Chris Halse Rogers (raof) wrote : | # |
Java continues to run out of memory!
Mir CI Bot (mir-ci-bot) : | # |
Preview Diff
1 | === modified file 'include/client/mir_toolkit/mir_display_configuration.h' | |||
2 | --- include/client/mir_toolkit/mir_display_configuration.h 2016-05-03 06:55:25 +0000 | |||
3 | +++ include/client/mir_toolkit/mir_display_configuration.h 2016-08-09 07:09:23 +0000 | |||
4 | @@ -413,6 +413,15 @@ | |||
5 | 413 | float mir_output_get_scale_factor(MirOutput const* output); | 413 | float mir_output_get_scale_factor(MirOutput const* output); |
6 | 414 | 414 | ||
7 | 415 | /** | 415 | /** |
8 | 416 | * Get the subpixel arrangement of a display | ||
9 | 417 | * | ||
10 | 418 | * \param [in] output The MirOutput to query | ||
11 | 419 | * \returns The MirSubpixelArrangement corresponding to the physical arrangement of subpixels | ||
12 | 420 | * on this display, or mir_subpixel_arrangement_unknown if this cannot be determined. | ||
13 | 421 | */ | ||
14 | 422 | MirSubpixelArrangement mir_output_get_subpixel_arrangement(MirOutput const* output); | ||
15 | 423 | |||
16 | 424 | /** | ||
17 | 416 | * Get the form-factor of a connected output. | 425 | * Get the form-factor of a connected output. |
18 | 417 | * | 426 | * |
19 | 418 | * This call succeeds even if the output is not connected, but may return nonsense values. | 427 | * This call succeeds even if the output is not connected, but may return nonsense values. |
20 | 419 | 428 | ||
21 | === modified file 'include/common/mir_toolkit/common.h' | |||
22 | --- include/common/mir_toolkit/common.h 2016-06-08 21:16:46 +0000 | |||
23 | +++ include/common/mir_toolkit/common.h 2016-08-09 07:09:23 +0000 | |||
24 | @@ -212,6 +212,22 @@ | |||
25 | 212 | mir_form_factor_projector, | 212 | mir_form_factor_projector, |
26 | 213 | } MirFormFactor; | 213 | } MirFormFactor; |
27 | 214 | 214 | ||
28 | 215 | |||
29 | 216 | /** | ||
30 | 217 | * Physical arrangement of subpixels on the physical output | ||
31 | 218 | * | ||
32 | 219 | * This is always relative to the “natural” orientation of the display - mir_orientation_normal. | ||
33 | 220 | */ | ||
34 | 221 | typedef enum MirSubpixelArrangement | ||
35 | 222 | { | ||
36 | 223 | mir_subpixel_arrangement_unknown, /**< Arrangement of subpixels cannot be determined */ | ||
37 | 224 | mir_subpixel_arrangement_horizontal_rgb, /**< Subpixels are arranged horizontally, R, G, B from left to right */ | ||
38 | 225 | mir_subpixel_arrangement_horizontal_bgr, /**< Subpixels are arranged horizontally, B, G, R from left to right */ | ||
39 | 226 | mir_subpixel_arrangement_vertical_rgb, /**< Subpixels are arranged vertically, R, G, B from top to bottom */ | ||
40 | 227 | mir_subpixel_arrangement_vertical_bgr, /**< Subpixels are arranged vertically, B, G, R from top to bottom */ | ||
41 | 228 | mir_subpixel_arrangement_none /**< Device does not have regular subpixels */ | ||
42 | 229 | } MirSubpixelArrangement; | ||
43 | 230 | |||
44 | 215 | /** | 231 | /** |
45 | 216 | * Shell chrome | 232 | * Shell chrome |
46 | 217 | */ | 233 | */ |
47 | 218 | 234 | ||
48 | === modified file 'include/platform/mir/graphics/display_configuration.h' | |||
49 | --- include/platform/mir/graphics/display_configuration.h 2016-04-26 03:20:39 +0000 | |||
50 | +++ include/platform/mir/graphics/display_configuration.h 2016-08-09 07:09:23 +0000 | |||
51 | @@ -117,6 +117,9 @@ | |||
52 | 117 | /** Form factor of this output; phone display, tablet, monitor, TV, projector... */ | 117 | /** Form factor of this output; phone display, tablet, monitor, TV, projector... */ |
53 | 118 | MirFormFactor form_factor; | 118 | MirFormFactor form_factor; |
54 | 119 | 119 | ||
55 | 120 | /** Subpixel arrangement of this output */ | ||
56 | 121 | MirSubpixelArrangement subpixel_arrangement; | ||
57 | 122 | |||
58 | 120 | /** The logical rectangle occupied by the output, based on its position, | 123 | /** The logical rectangle occupied by the output, based on its position, |
59 | 121 | current mode and orientation (rotation) */ | 124 | current mode and orientation (rotation) */ |
60 | 122 | geometry::Rectangle extents() const; | 125 | geometry::Rectangle extents() const; |
61 | @@ -145,6 +148,7 @@ | |||
62 | 145 | MirOrientation& orientation; | 148 | MirOrientation& orientation; |
63 | 146 | float& scale; | 149 | float& scale; |
64 | 147 | MirFormFactor& form_factor; | 150 | MirFormFactor& form_factor; |
65 | 151 | MirSubpixelArrangement& subpixel_arrangement; | ||
66 | 148 | 152 | ||
67 | 149 | UserDisplayConfigurationOutput(DisplayConfigurationOutput& master); | 153 | UserDisplayConfigurationOutput(DisplayConfigurationOutput& master); |
68 | 150 | geometry::Rectangle extents() const; | 154 | geometry::Rectangle extents() const; |
69 | 151 | 155 | ||
70 | === modified file 'include/test/mir/test/doubles/stub_display_configuration.h' | |||
71 | --- include/test/mir/test/doubles/stub_display_configuration.h 2016-05-03 06:55:25 +0000 | |||
72 | +++ include/test/mir/test/doubles/stub_display_configuration.h 2016-08-09 07:09:23 +0000 | |||
73 | @@ -36,8 +36,28 @@ | |||
74 | 36 | StubDisplayConfigurationOutput( | 36 | StubDisplayConfigurationOutput( |
75 | 37 | geometry::Size px_size, geometry::Size mm_size, MirPixelFormat format, double vrefresh, bool connected); | 37 | geometry::Size px_size, geometry::Size mm_size, MirPixelFormat format, double vrefresh, bool connected); |
76 | 38 | 38 | ||
79 | 39 | StubDisplayConfigurationOutput(graphics::DisplayConfigurationOutputId id, | 39 | StubDisplayConfigurationOutput( |
80 | 40 | geometry::Size px_size, geometry::Size mm_size, MirPixelFormat format, double vrefresh, bool connected); | 40 | geometry::Size px_size, |
81 | 41 | geometry::Size mm_size, | ||
82 | 42 | MirPixelFormat format, | ||
83 | 43 | double vrefresh, | ||
84 | 44 | bool connected, | ||
85 | 45 | MirSubpixelArrangement subpixel_arrangement); | ||
86 | 46 | |||
87 | 47 | StubDisplayConfigurationOutput(graphics::DisplayConfigurationOutputId id, | ||
88 | 48 | geometry::Size px_size, | ||
89 | 49 | geometry::Size mm_size, | ||
90 | 50 | MirPixelFormat format, | ||
91 | 51 | double vrefresh, | ||
92 | 52 | bool connected); | ||
93 | 53 | |||
94 | 54 | StubDisplayConfigurationOutput(graphics::DisplayConfigurationOutputId id, | ||
95 | 55 | geometry::Size px_size, | ||
96 | 56 | geometry::Size mm_size, | ||
97 | 57 | MirPixelFormat format, | ||
98 | 58 | double vrefresh, | ||
99 | 59 | bool connected, | ||
100 | 60 | MirSubpixelArrangement subpixel_arrangement); | ||
101 | 41 | 61 | ||
102 | 42 | StubDisplayConfigurationOutput(graphics::DisplayConfigurationOutputId id, | 62 | StubDisplayConfigurationOutput(graphics::DisplayConfigurationOutputId id, |
103 | 43 | std::vector<graphics::DisplayConfigurationMode> modes, std::vector<MirPixelFormat> formats); | 63 | std::vector<graphics::DisplayConfigurationMode> modes, std::vector<MirPixelFormat> formats); |
104 | 44 | 64 | ||
105 | === modified file 'src/client/display_configuration_api.cpp' | |||
106 | --- src/client/display_configuration_api.cpp 2016-05-03 06:55:25 +0000 | |||
107 | +++ src/client/display_configuration_api.cpp 2016-08-09 07:09:23 +0000 | |||
108 | @@ -306,6 +306,13 @@ | |||
109 | 306 | return output->scale_factor(); | 306 | return output->scale_factor(); |
110 | 307 | } | 307 | } |
111 | 308 | 308 | ||
112 | 309 | MirSubpixelArrangement mir_output_get_subpixel_arrangement(MirOutput const* client_output) | ||
113 | 310 | { | ||
114 | 311 | auto output = client_to_output(client_output); | ||
115 | 312 | |||
116 | 313 | return static_cast<MirSubpixelArrangement>(output->subpixel_arrangement()); | ||
117 | 314 | } | ||
118 | 315 | |||
119 | 309 | MirFormFactor mir_output_get_form_factor(MirOutput const* client_output) | 316 | MirFormFactor mir_output_get_form_factor(MirOutput const* client_output) |
120 | 310 | { | 317 | { |
121 | 311 | auto output = client_to_output(client_output); | 318 | auto output = client_to_output(client_output); |
122 | 312 | 319 | ||
123 | === modified file 'src/client/symbols.map' | |||
124 | --- src/client/symbols.map 2016-07-18 10:11:34 +0000 | |||
125 | +++ src/client/symbols.map 2016-08-09 07:09:23 +0000 | |||
126 | @@ -419,5 +419,6 @@ | |||
127 | 419 | MIR_CLIENT_0.25 { # New functions in Mir 0.25 | 419 | MIR_CLIENT_0.25 { # New functions in Mir 0.25 |
128 | 420 | global: | 420 | global: |
129 | 421 | mir_connection_create_spec_for_tip; | 421 | mir_connection_create_spec_for_tip; |
130 | 422 | mir_output_get_subpixel_arrangement; | ||
131 | 422 | } MIR_CLIENT_0.24; | 423 | } MIR_CLIENT_0.24; |
132 | 423 | 424 | ||
133 | 424 | 425 | ||
134 | === modified file 'src/platform/graphics/display_configuration.cpp' | |||
135 | --- src/platform/graphics/display_configuration.cpp 2016-02-01 22:53:06 +0000 | |||
136 | +++ src/platform/graphics/display_configuration.cpp 2016-08-09 07:09:23 +0000 | |||
137 | @@ -320,7 +320,8 @@ | |||
138 | 320 | power_mode(master.power_mode), | 320 | power_mode(master.power_mode), |
139 | 321 | orientation(master.orientation), | 321 | orientation(master.orientation), |
140 | 322 | scale(master.scale), | 322 | scale(master.scale), |
142 | 323 | form_factor(master.form_factor) | 323 | form_factor(master.form_factor), |
143 | 324 | subpixel_arrangement(master.subpixel_arrangement) | ||
144 | 324 | { | 325 | { |
145 | 325 | } | 326 | } |
146 | 326 | 327 | ||
147 | 327 | 328 | ||
148 | === modified file 'src/platforms/android/server/display_configuration.cpp' | |||
149 | --- src/platforms/android/server/display_configuration.cpp 2016-04-26 03:20:39 +0000 | |||
150 | +++ src/platforms/android/server/display_configuration.cpp 2016-08-09 07:09:23 +0000 | |||
151 | @@ -45,6 +45,7 @@ | |||
152 | 45 | auto const type = mg::DisplayConfigurationOutputType::virt; | 45 | auto const type = mg::DisplayConfigurationOutputType::virt; |
153 | 46 | auto const form_factor = mir_form_factor_monitor; | 46 | auto const form_factor = mir_form_factor_monitor; |
154 | 47 | float const scale{1.0f}; | 47 | float const scale{1.0f}; |
155 | 48 | auto const subpixel_arrangement = mir_subpixel_arrangement_unknown; | ||
156 | 48 | std::vector<mg::DisplayConfigurationMode> external_modes; | 49 | std::vector<mg::DisplayConfigurationMode> external_modes; |
157 | 49 | external_modes.emplace_back(mg::DisplayConfigurationMode{{1920,1080}, vrefresh_hz}); | 50 | external_modes.emplace_back(mg::DisplayConfigurationMode{{1920,1080}, vrefresh_hz}); |
158 | 50 | 51 | ||
159 | @@ -64,7 +65,8 @@ | |||
160 | 64 | external_mode, | 65 | external_mode, |
161 | 65 | mir_orientation_normal, | 66 | mir_orientation_normal, |
162 | 66 | scale, | 67 | scale, |
164 | 67 | form_factor | 68 | form_factor, |
165 | 69 | subpixel_arrangement | ||
166 | 68 | }; | 70 | }; |
167 | 69 | } | 71 | } |
168 | 70 | } | 72 | } |
169 | 71 | 73 | ||
170 | === modified file 'src/platforms/android/server/fb_device.cpp' | |||
171 | --- src/platforms/android/server/fb_device.cpp 2016-05-03 06:55:25 +0000 | |||
172 | +++ src/platforms/android/server/fb_device.cpp 2016-08-09 07:09:23 +0000 | |||
173 | @@ -88,7 +88,8 @@ | |||
174 | 88 | mir_power_mode_on, | 88 | mir_power_mode_on, |
175 | 89 | mir_orientation_normal, | 89 | mir_orientation_normal, |
176 | 90 | 1.0f, | 90 | 1.0f, |
178 | 91 | mir_form_factor_phone | 91 | mir_form_factor_phone, |
179 | 92 | mir_subpixel_arrangement_unknown | ||
180 | 92 | }; | 93 | }; |
181 | 93 | } | 94 | } |
182 | 94 | 95 | ||
183 | 95 | 96 | ||
184 | === modified file 'src/platforms/android/server/hwc_blanking_control.cpp' | |||
185 | --- src/platforms/android/server/hwc_blanking_control.cpp 2016-06-22 22:45:56 +0000 | |||
186 | +++ src/platforms/android/server/hwc_blanking_control.cpp 2016-08-09 07:09:23 +0000 | |||
187 | @@ -166,7 +166,8 @@ | |||
188 | 166 | external_mode, | 166 | external_mode, |
189 | 167 | mir_orientation_normal, | 167 | mir_orientation_normal, |
190 | 168 | 1.0f, | 168 | 1.0f, |
192 | 169 | form_factor | 169 | form_factor, |
193 | 170 | mir_subpixel_arrangement_unknown | ||
194 | 170 | }; | 171 | }; |
195 | 171 | } | 172 | } |
196 | 172 | 173 | ||
197 | 173 | 174 | ||
198 | === modified file 'src/platforms/mesa/server/kms/real_kms_display_configuration.cpp' | |||
199 | --- src/platforms/mesa/server/kms/real_kms_display_configuration.cpp 2016-05-26 02:12:27 +0000 | |||
200 | +++ src/platforms/mesa/server/kms/real_kms_display_configuration.cpp 2016-08-09 07:09:23 +0000 | |||
201 | @@ -220,7 +220,7 @@ | |||
202 | 220 | physical_size, connected, false, geom::Point(), | 220 | physical_size, connected, false, geom::Point(), |
203 | 221 | current_mode_index, mir_pixel_format_xrgb_8888, | 221 | current_mode_index, mir_pixel_format_xrgb_8888, |
204 | 222 | mir_power_mode_on, mir_orientation_normal, | 222 | mir_power_mode_on, mir_orientation_normal, |
206 | 223 | 1.0f, mir_form_factor_monitor}); | 223 | 1.0f, mir_form_factor_monitor, mir_subpixel_arrangement_unknown}); |
207 | 224 | } | 224 | } |
208 | 225 | else | 225 | else |
209 | 226 | { | 226 | { |
210 | 227 | 227 | ||
211 | === modified file 'src/platforms/mesa/server/x11/graphics/display_configuration.cpp' | |||
212 | --- src/platforms/mesa/server/x11/graphics/display_configuration.cpp 2016-07-01 18:40:38 +0000 | |||
213 | +++ src/platforms/mesa/server/x11/graphics/display_configuration.cpp 2016-08-09 07:09:23 +0000 | |||
214 | @@ -42,7 +42,8 @@ | |||
215 | 42 | mir_power_mode_on, | 42 | mir_power_mode_on, |
216 | 43 | orientation, | 43 | orientation, |
217 | 44 | 1.0f, | 44 | 1.0f, |
219 | 45 | mir_form_factor_monitor}, | 45 | mir_form_factor_monitor, |
220 | 46 | mir_subpixel_arrangement_unknown}, | ||
221 | 46 | card{mg::DisplayConfigurationCardId{0}, 1} | 47 | card{mg::DisplayConfigurationCardId{0}, 1} |
222 | 47 | { | 48 | { |
223 | 48 | } | 49 | } |
224 | 49 | 50 | ||
225 | === modified file 'src/protobuf/mir_protobuf.proto' | |||
226 | --- src/protobuf/mir_protobuf.proto 2016-06-21 21:31:05 +0000 | |||
227 | +++ src/protobuf/mir_protobuf.proto 2016-08-09 07:09:23 +0000 | |||
228 | @@ -216,6 +216,7 @@ | |||
229 | 216 | optional sint32 orientation = 16; | 216 | optional sint32 orientation = 16; |
230 | 217 | optional float scale_factor = 17; | 217 | optional float scale_factor = 17; |
231 | 218 | optional uint32 form_factor = 18; | 218 | optional uint32 form_factor = 18; |
232 | 219 | optional uint32 subpixel_arrangement = 19; | ||
233 | 219 | } | 220 | } |
234 | 220 | 221 | ||
235 | 221 | message Connection { | 222 | message Connection { |
236 | 222 | 223 | ||
237 | === modified file 'src/server/frontend/protobuf_buffer_packer.cpp' | |||
238 | --- src/server/frontend/protobuf_buffer_packer.cpp 2016-05-03 06:55:25 +0000 | |||
239 | +++ src/server/frontend/protobuf_buffer_packer.cpp 2016-08-09 07:09:23 +0000 | |||
240 | @@ -69,6 +69,7 @@ | |||
241 | 69 | protobuf_output.set_orientation(display_output.orientation); | 69 | protobuf_output.set_orientation(display_output.orientation); |
242 | 70 | protobuf_output.set_scale_factor(display_output.scale); | 70 | protobuf_output.set_scale_factor(display_output.scale); |
243 | 71 | protobuf_output.set_form_factor(display_output.form_factor); | 71 | protobuf_output.set_form_factor(display_output.form_factor); |
244 | 72 | protobuf_output.set_subpixel_arrangement(display_output.subpixel_arrangement); | ||
245 | 72 | } | 73 | } |
246 | 73 | 74 | ||
247 | 74 | } | 75 | } |
248 | 75 | 76 | ||
249 | === modified file 'src/server/graphics/nested/nested_display_configuration.cpp' | |||
250 | --- src/server/graphics/nested/nested_display_configuration.cpp 2016-01-29 08:18:22 +0000 | |||
251 | +++ src/server/graphics/nested/nested_display_configuration.cpp 2016-08-09 07:09:23 +0000 | |||
252 | @@ -110,7 +110,8 @@ | |||
253 | 110 | mir_output.power_mode, | 110 | mir_output.power_mode, |
254 | 111 | mir_output.orientation, | 111 | mir_output.orientation, |
255 | 112 | local_config.scale, | 112 | local_config.scale, |
257 | 113 | local_config.form_factor | 113 | local_config.form_factor, |
258 | 114 | local_config.subpixel_arrangement | ||
259 | 114 | }; | 115 | }; |
260 | 115 | 116 | ||
261 | 116 | f(output); | 117 | f(output); |
262 | @@ -168,13 +169,14 @@ | |||
263 | 168 | mir_output.power_mode, | 169 | mir_output.power_mode, |
264 | 169 | mir_output.orientation, | 170 | mir_output.orientation, |
265 | 170 | local_config.scale, | 171 | local_config.scale, |
267 | 171 | local_config.form_factor | 172 | local_config.form_factor, |
268 | 173 | local_config.subpixel_arrangement | ||
269 | 172 | }; | 174 | }; |
270 | 173 | UserDisplayConfigurationOutput user(output); | 175 | UserDisplayConfigurationOutput user(output); |
271 | 174 | 176 | ||
272 | 175 | f(user); | 177 | f(user); |
273 | 176 | 178 | ||
275 | 177 | set_local_config_for(mir_output.output_id, {user.scale, user.form_factor }); | 179 | set_local_config_for(mir_output.output_id, {user.scale, user.form_factor , user.subpixel_arrangement}); |
276 | 178 | 180 | ||
277 | 179 | mir_output.current_mode = output.current_mode_index; | 181 | mir_output.current_mode = output.current_mode_index; |
278 | 180 | mir_output.current_format = output.current_format; | 182 | mir_output.current_format = output.current_format; |
279 | @@ -196,7 +198,7 @@ | |||
280 | 196 | { | 198 | { |
281 | 197 | std::lock_guard<std::mutex> lock{local_config_mutex}; | 199 | std::lock_guard<std::mutex> lock{local_config_mutex}; |
282 | 198 | 200 | ||
284 | 199 | constexpr LocalOutputConfig default_values {1.0f, mir_form_factor_monitor }; | 201 | constexpr LocalOutputConfig default_values {1.0f, mir_form_factor_monitor, mir_subpixel_arrangement_unknown }; |
285 | 200 | 202 | ||
286 | 201 | bool inserted; | 203 | bool inserted; |
287 | 202 | decltype(local_config)::iterator keypair; | 204 | decltype(local_config)::iterator keypair; |
288 | 203 | 205 | ||
289 | === modified file 'src/server/graphics/nested/nested_display_configuration.h' | |||
290 | --- src/server/graphics/nested/nested_display_configuration.h 2016-01-29 08:18:22 +0000 | |||
291 | +++ src/server/graphics/nested/nested_display_configuration.h 2016-08-09 07:09:23 +0000 | |||
292 | @@ -59,6 +59,7 @@ | |||
293 | 59 | { | 59 | { |
294 | 60 | float scale; | 60 | float scale; |
295 | 61 | MirFormFactor form_factor; | 61 | MirFormFactor form_factor; |
296 | 62 | MirSubpixelArrangement subpixel_arrangement; | ||
297 | 62 | }; | 63 | }; |
298 | 63 | std::unordered_map<uint32_t, LocalOutputConfig> mutable local_config; | 64 | std::unordered_map<uint32_t, LocalOutputConfig> mutable local_config; |
299 | 64 | 65 | ||
300 | 65 | 66 | ||
301 | === modified file 'tests/acceptance-tests/test_new_display_configuration.cpp' | |||
302 | --- tests/acceptance-tests/test_new_display_configuration.cpp 2016-05-03 06:55:25 +0000 | |||
303 | +++ tests/acceptance-tests/test_new_display_configuration.cpp 2016-08-09 07:09:23 +0000 | |||
304 | @@ -284,6 +284,7 @@ | |||
305 | 284 | struct DisplayPowerSetting : public DisplayConfigurationTest, public ::testing::WithParamInterface<MirPowerMode> {}; | 284 | struct DisplayPowerSetting : public DisplayConfigurationTest, public ::testing::WithParamInterface<MirPowerMode> {}; |
306 | 285 | struct DisplayOrientationSetting : public DisplayConfigurationTest, public ::testing::WithParamInterface<MirOrientation> {}; | 285 | struct DisplayOrientationSetting : public DisplayConfigurationTest, public ::testing::WithParamInterface<MirOrientation> {}; |
307 | 286 | struct DisplayFormatSetting : public DisplayConfigurationTest, public ::testing::WithParamInterface<MirPixelFormat> {}; | 286 | struct DisplayFormatSetting : public DisplayConfigurationTest, public ::testing::WithParamInterface<MirPixelFormat> {}; |
308 | 287 | struct DisplaySubpixelSetting : public DisplayConfigurationTest, public ::testing::WithParamInterface<MirSubpixelArrangement> {}; | ||
309 | 287 | 288 | ||
310 | 288 | TEST_P(DisplayPowerSetting, can_get_power_mode) | 289 | TEST_P(DisplayPowerSetting, can_get_power_mode) |
311 | 289 | { | 290 | { |
312 | @@ -392,12 +393,55 @@ | |||
313 | 392 | client.disconnect(); | 393 | client.disconnect(); |
314 | 393 | } | 394 | } |
315 | 394 | 395 | ||
316 | 396 | TEST_P(DisplaySubpixelSetting, can_get_all_subpixel_arrangements) | ||
317 | 397 | { | ||
318 | 398 | using namespace testing; | ||
319 | 399 | |||
320 | 400 | auto subpixel_arrangement = GetParam(); | ||
321 | 401 | mtd::StubDisplayConfigurationOutput output{ | ||
322 | 402 | {1920, 1200}, | ||
323 | 403 | {200, 100}, | ||
324 | 404 | mir_pixel_format_abgr_8888, | ||
325 | 405 | 60.0, | ||
326 | 406 | true, | ||
327 | 407 | subpixel_arrangement}; | ||
328 | 408 | mtd::StubDisplayConfig single_subpixel_config({output}); | ||
329 | 409 | |||
330 | 410 | mock_display.emit_configuration_change_event(mt::fake_shared(single_subpixel_config)); | ||
331 | 411 | mock_display.wait_for_configuration_change_handler(); | ||
332 | 412 | |||
333 | 413 | DisplayClient client{new_connection()}; | ||
334 | 414 | |||
335 | 415 | client.connect(); | ||
336 | 416 | |||
337 | 417 | auto client_config = client.get_base_config(); | ||
338 | 418 | |||
339 | 419 | for (int i = 0; i < mir_display_config_get_num_outputs(client_config.get()); ++i) | ||
340 | 420 | { | ||
341 | 421 | auto output = mir_display_config_get_output(client_config.get(), i); | ||
342 | 422 | |||
343 | 423 | EXPECT_THAT(mir_output_get_subpixel_arrangement(output), Eq(subpixel_arrangement)); | ||
344 | 424 | } | ||
345 | 425 | |||
346 | 426 | client.disconnect(); | ||
347 | 427 | } | ||
348 | 428 | |||
349 | 429 | |||
350 | 395 | INSTANTIATE_TEST_CASE_P(DisplayConfiguration, DisplayPowerSetting, | 430 | INSTANTIATE_TEST_CASE_P(DisplayConfiguration, DisplayPowerSetting, |
351 | 396 | Values(mir_power_mode_on, mir_power_mode_standby, mir_power_mode_suspend, mir_power_mode_off)); | 431 | Values(mir_power_mode_on, mir_power_mode_standby, mir_power_mode_suspend, mir_power_mode_off)); |
352 | 397 | 432 | ||
353 | 398 | INSTANTIATE_TEST_CASE_P(DisplayConfiguration, DisplayFormatSetting, | 433 | INSTANTIATE_TEST_CASE_P(DisplayConfiguration, DisplayFormatSetting, |
354 | 399 | ValuesIn(formats)); | 434 | ValuesIn(formats)); |
355 | 400 | 435 | ||
356 | 436 | INSTANTIATE_TEST_CASE_P(DisplayConfiguration, DisplaySubpixelSetting, | ||
357 | 437 | Values( | ||
358 | 438 | mir_subpixel_arrangement_unknown, | ||
359 | 439 | mir_subpixel_arrangement_horizontal_rgb, | ||
360 | 440 | mir_subpixel_arrangement_horizontal_bgr, | ||
361 | 441 | mir_subpixel_arrangement_vertical_rgb, | ||
362 | 442 | mir_subpixel_arrangement_vertical_bgr, | ||
363 | 443 | mir_subpixel_arrangement_none)); | ||
364 | 444 | |||
365 | 401 | TEST_F(DisplayConfigurationTest, client_received_configuration_matches_server_config) | 445 | TEST_F(DisplayConfigurationTest, client_received_configuration_matches_server_config) |
366 | 402 | { | 446 | { |
367 | 403 | mg::DisplayConfigurationMode hd{{1280, 720}, 60.0}; | 447 | mg::DisplayConfigurationMode hd{{1280, 720}, 60.0}; |
368 | 404 | 448 | ||
369 | === modified file 'tests/mir_test/display_config_matchers.cpp' | |||
370 | --- tests/mir_test/display_config_matchers.cpp 2016-05-03 06:55:25 +0000 | |||
371 | +++ tests/mir_test/display_config_matchers.cpp 2016-08-09 07:09:23 +0000 | |||
372 | @@ -84,7 +84,8 @@ | |||
373 | 84 | static_cast<MirPowerMode>(protobuf_output.power_mode()), | 84 | static_cast<MirPowerMode>(protobuf_output.power_mode()), |
374 | 85 | static_cast<MirOrientation>(protobuf_output.orientation()), | 85 | static_cast<MirOrientation>(protobuf_output.orientation()), |
375 | 86 | 1.0f, | 86 | 1.0f, |
377 | 87 | mir_form_factor_monitor | 87 | mir_form_factor_monitor, |
378 | 88 | mir_subpixel_arrangement_unknown | ||
379 | 88 | }; | 89 | }; |
380 | 89 | 90 | ||
381 | 90 | /* Modes */ | 91 | /* Modes */ |
382 | @@ -152,7 +153,8 @@ | |||
383 | 152 | static_cast<MirPowerMode>(client_output.power_mode), | 153 | static_cast<MirPowerMode>(client_output.power_mode), |
384 | 153 | static_cast<MirOrientation>(client_output.orientation), | 154 | static_cast<MirOrientation>(client_output.orientation), |
385 | 154 | 1.0f, | 155 | 1.0f, |
387 | 155 | mir_form_factor_monitor | 156 | mir_form_factor_monitor, |
388 | 157 | mir_subpixel_arrangement_unknown | ||
389 | 156 | }; | 158 | }; |
390 | 157 | 159 | ||
391 | 158 | /* Modes */ | 160 | /* Modes */ |
392 | @@ -213,7 +215,8 @@ | |||
393 | 213 | mir_output_get_power_mode(client_output), | 215 | mir_output_get_power_mode(client_output), |
394 | 214 | mir_output_get_orientation(client_output), | 216 | mir_output_get_orientation(client_output), |
395 | 215 | 1.0f, | 217 | 1.0f, |
397 | 216 | mir_form_factor_monitor | 218 | mir_form_factor_monitor, |
398 | 219 | mir_subpixel_arrangement_unknown | ||
399 | 217 | }; | 220 | }; |
400 | 218 | 221 | ||
401 | 219 | /* Modes */ | 222 | /* Modes */ |
402 | 220 | 223 | ||
403 | === modified file 'tests/mir_test_doubles/stub_display_configuration.cpp' | |||
404 | --- tests/mir_test_doubles/stub_display_configuration.cpp 2016-05-03 06:55:25 +0000 | |||
405 | +++ tests/mir_test_doubles/stub_display_configuration.cpp 2016-08-09 07:09:23 +0000 | |||
406 | @@ -25,13 +25,54 @@ | |||
407 | 25 | 25 | ||
408 | 26 | mtd::StubDisplayConfigurationOutput::StubDisplayConfigurationOutput( | 26 | mtd::StubDisplayConfigurationOutput::StubDisplayConfigurationOutput( |
409 | 27 | geometry::Size px_size, geometry::Size mm_size, MirPixelFormat format, double vrefresh, bool connected) : | 27 | geometry::Size px_size, geometry::Size mm_size, MirPixelFormat format, double vrefresh, bool connected) : |
417 | 28 | StubDisplayConfigurationOutput(graphics::DisplayConfigurationOutputId{1}, px_size, mm_size, format, vrefresh, connected) | 28 | StubDisplayConfigurationOutput(px_size, mm_size, format, vrefresh, connected, mir_subpixel_arrangement_unknown) |
418 | 29 | { | 29 | { |
419 | 30 | } | 30 | } |
420 | 31 | 31 | ||
421 | 32 | mtd::StubDisplayConfigurationOutput::StubDisplayConfigurationOutput( | 32 | mtd::StubDisplayConfigurationOutput::StubDisplayConfigurationOutput( |
422 | 33 | graphics::DisplayConfigurationOutputId id, | 33 | geometry::Size px_size, |
423 | 34 | geometry::Size px_size, geometry::Size mm_size, MirPixelFormat format, double vrefresh, bool connected) : | 34 | geometry::Size mm_size, |
424 | 35 | MirPixelFormat format, | ||
425 | 36 | double vrefresh, | ||
426 | 37 | bool connected, | ||
427 | 38 | MirSubpixelArrangement subpixel_arrangement) : | ||
428 | 39 | StubDisplayConfigurationOutput( | ||
429 | 40 | graphics::DisplayConfigurationOutputId{1}, | ||
430 | 41 | px_size, | ||
431 | 42 | mm_size, | ||
432 | 43 | format, | ||
433 | 44 | vrefresh, | ||
434 | 45 | connected, | ||
435 | 46 | subpixel_arrangement) | ||
436 | 47 | { | ||
437 | 48 | } | ||
438 | 49 | |||
439 | 50 | mtd::StubDisplayConfigurationOutput::StubDisplayConfigurationOutput( | ||
440 | 51 | graphics::DisplayConfigurationOutputId id, | ||
441 | 52 | geometry::Size px_size, | ||
442 | 53 | geometry::Size mm_size, | ||
443 | 54 | MirPixelFormat format, | ||
444 | 55 | double vrefresh, | ||
445 | 56 | bool connected) : | ||
446 | 57 | StubDisplayConfigurationOutput( | ||
447 | 58 | id, | ||
448 | 59 | px_size, | ||
449 | 60 | mm_size, | ||
450 | 61 | format, | ||
451 | 62 | vrefresh, | ||
452 | 63 | connected, | ||
453 | 64 | mir_subpixel_arrangement_unknown) | ||
454 | 65 | { | ||
455 | 66 | } | ||
456 | 67 | |||
457 | 68 | mtd::StubDisplayConfigurationOutput::StubDisplayConfigurationOutput( | ||
458 | 69 | graphics::DisplayConfigurationOutputId id, | ||
459 | 70 | geometry::Size px_size, | ||
460 | 71 | geometry::Size mm_size, | ||
461 | 72 | MirPixelFormat format, | ||
462 | 73 | double vrefresh, | ||
463 | 74 | bool connected, | ||
464 | 75 | MirSubpixelArrangement subpixel_arrangement) : | ||
465 | 35 | DisplayConfigurationOutput{ | 76 | DisplayConfigurationOutput{ |
466 | 36 | id, | 77 | id, |
467 | 37 | graphics::DisplayConfigurationCardId{0}, | 78 | graphics::DisplayConfigurationCardId{0}, |
468 | @@ -48,7 +89,8 @@ | |||
469 | 48 | mir_power_mode_on, | 89 | mir_power_mode_on, |
470 | 49 | mir_orientation_normal, | 90 | mir_orientation_normal, |
471 | 50 | 1.0f, | 91 | 1.0f, |
473 | 51 | mir_form_factor_monitor | 92 | mir_form_factor_monitor, |
474 | 93 | subpixel_arrangement | ||
475 | 52 | } | 94 | } |
476 | 53 | { | 95 | { |
477 | 54 | } | 96 | } |
478 | @@ -73,7 +115,8 @@ | |||
479 | 73 | mir_power_mode_on, | 115 | mir_power_mode_on, |
480 | 74 | mir_orientation_normal, | 116 | mir_orientation_normal, |
481 | 75 | 1.0f, | 117 | 1.0f, |
483 | 76 | mir_form_factor_monitor | 118 | mir_form_factor_monitor, |
484 | 119 | mir_subpixel_arrangement_unknown | ||
485 | 77 | } | 120 | } |
486 | 78 | { | 121 | { |
487 | 79 | if (modes.empty()) | 122 | if (modes.empty()) |
488 | @@ -174,7 +217,8 @@ | |||
489 | 174 | used(i) ? mir_power_mode_on : mir_power_mode_off, | 217 | used(i) ? mir_power_mode_on : mir_power_mode_off, |
490 | 175 | mir_orientation_normal, | 218 | mir_orientation_normal, |
491 | 176 | 1.0f, | 219 | 1.0f, |
493 | 177 | mir_form_factor_monitor | 220 | mir_form_factor_monitor, |
494 | 221 | mir_subpixel_arrangement_unknown | ||
495 | 178 | }; | 222 | }; |
496 | 179 | 223 | ||
497 | 180 | outputs.push_back(output); | 224 | outputs.push_back(output); |
498 | @@ -203,7 +247,8 @@ | |||
499 | 203 | mir_pixel_format_abgr_8888, mir_power_mode_on, | 247 | mir_pixel_format_abgr_8888, mir_power_mode_on, |
500 | 204 | mir_orientation_normal, | 248 | mir_orientation_normal, |
501 | 205 | 1.0f, | 249 | 1.0f, |
503 | 206 | mir_form_factor_monitor | 250 | mir_form_factor_monitor, |
504 | 251 | mir_subpixel_arrangement_unknown | ||
505 | 207 | }; | 252 | }; |
506 | 208 | 253 | ||
507 | 209 | outputs.push_back(output); | 254 | outputs.push_back(output); |
508 | 210 | 255 | ||
509 | === modified file 'tests/unit-tests/graphics/mesa/kms/test_cursor.cpp' | |||
510 | --- tests/unit-tests/graphics/mesa/kms/test_cursor.cpp 2016-01-29 08:18:22 +0000 | |||
511 | +++ tests/unit-tests/graphics/mesa/kms/test_cursor.cpp 2016-08-09 07:09:23 +0000 | |||
512 | @@ -106,7 +106,8 @@ | |||
513 | 106 | mir_power_mode_on, | 106 | mir_power_mode_on, |
514 | 107 | mir_orientation_normal, | 107 | mir_orientation_normal, |
515 | 108 | 1.0f, | 108 | 1.0f, |
517 | 109 | mir_form_factor_monitor | 109 | mir_form_factor_monitor, |
518 | 110 | mir_subpixel_arrangement_unknown | ||
519 | 110 | }, | 111 | }, |
520 | 111 | { | 112 | { |
521 | 112 | mg::DisplayConfigurationOutputId{11}, | 113 | mg::DisplayConfigurationOutputId{11}, |
522 | @@ -127,7 +128,8 @@ | |||
523 | 127 | mir_power_mode_on, | 128 | mir_power_mode_on, |
524 | 128 | mir_orientation_normal, | 129 | mir_orientation_normal, |
525 | 129 | 1.0f, | 130 | 1.0f, |
527 | 130 | mir_form_factor_monitor | 131 | mir_form_factor_monitor, |
528 | 132 | mir_subpixel_arrangement_unknown | ||
529 | 131 | }, | 133 | }, |
530 | 132 | { | 134 | { |
531 | 133 | mg::DisplayConfigurationOutputId{12}, | 135 | mg::DisplayConfigurationOutputId{12}, |
532 | @@ -148,7 +150,8 @@ | |||
533 | 148 | mir_power_mode_on, | 150 | mir_power_mode_on, |
534 | 149 | mir_orientation_right, | 151 | mir_orientation_right, |
535 | 150 | 1.0f, | 152 | 1.0f, |
537 | 151 | mir_form_factor_monitor | 153 | mir_form_factor_monitor, |
538 | 154 | mir_subpixel_arrangement_unknown | ||
539 | 152 | }}} | 155 | }}} |
540 | 153 | { | 156 | { |
541 | 154 | } | 157 | } |
542 | 155 | 158 | ||
543 | === modified file 'tests/unit-tests/graphics/mesa/kms/test_display_configuration.cpp' | |||
544 | --- tests/unit-tests/graphics/mesa/kms/test_display_configuration.cpp 2016-06-02 05:33:50 +0000 | |||
545 | +++ tests/unit-tests/graphics/mesa/kms/test_display_configuration.cpp 2016-08-09 07:09:23 +0000 | |||
546 | @@ -234,7 +234,8 @@ | |||
547 | 234 | mir_power_mode_on, | 234 | mir_power_mode_on, |
548 | 235 | mir_orientation_normal, | 235 | mir_orientation_normal, |
549 | 236 | 1.0f, | 236 | 1.0f, |
551 | 237 | mir_form_factor_monitor | 237 | mir_form_factor_monitor, |
552 | 238 | mir_subpixel_arrangement_unknown | ||
553 | 238 | }, | 239 | }, |
554 | 239 | { | 240 | { |
555 | 240 | mg::DisplayConfigurationOutputId{connector1_id}, | 241 | mg::DisplayConfigurationOutputId{connector1_id}, |
556 | @@ -252,7 +253,8 @@ | |||
557 | 252 | mir_power_mode_on, | 253 | mir_power_mode_on, |
558 | 253 | mir_orientation_normal, | 254 | mir_orientation_normal, |
559 | 254 | 1.0f, | 255 | 1.0f, |
561 | 255 | mir_form_factor_monitor | 256 | mir_form_factor_monitor, |
562 | 257 | mir_subpixel_arrangement_unknown | ||
563 | 256 | }, | 258 | }, |
564 | 257 | { | 259 | { |
565 | 258 | mg::DisplayConfigurationOutputId{connector2_id}, | 260 | mg::DisplayConfigurationOutputId{connector2_id}, |
566 | @@ -270,7 +272,8 @@ | |||
567 | 270 | mir_power_mode_on, | 272 | mir_power_mode_on, |
568 | 271 | mir_orientation_normal, | 273 | mir_orientation_normal, |
569 | 272 | 1.0f, | 274 | 1.0f, |
571 | 273 | mir_form_factor_monitor | 275 | mir_form_factor_monitor, |
572 | 276 | mir_subpixel_arrangement_unknown | ||
573 | 274 | } | 277 | } |
574 | 275 | }; | 278 | }; |
575 | 276 | 279 | ||
576 | @@ -428,7 +431,8 @@ | |||
577 | 428 | mir_power_mode_on, | 431 | mir_power_mode_on, |
578 | 429 | mir_orientation_normal, | 432 | mir_orientation_normal, |
579 | 430 | 1.0f, | 433 | 1.0f, |
581 | 431 | mir_form_factor_monitor | 434 | mir_form_factor_monitor, |
582 | 435 | mir_subpixel_arrangement_unknown | ||
583 | 432 | }, | 436 | }, |
584 | 433 | { | 437 | { |
585 | 434 | mg::DisplayConfigurationOutputId(connector_ids[1]), | 438 | mg::DisplayConfigurationOutputId(connector_ids[1]), |
586 | @@ -446,7 +450,8 @@ | |||
587 | 446 | mir_power_mode_on, | 450 | mir_power_mode_on, |
588 | 447 | mir_orientation_normal, | 451 | mir_orientation_normal, |
589 | 448 | 1.0f, | 452 | 1.0f, |
591 | 449 | mir_form_factor_monitor | 453 | mir_form_factor_monitor, |
592 | 454 | mir_subpixel_arrangement_unknown | ||
593 | 450 | }, | 455 | }, |
594 | 451 | }; | 456 | }; |
595 | 452 | 457 | ||
596 | @@ -468,7 +473,8 @@ | |||
597 | 468 | mir_power_mode_on, | 473 | mir_power_mode_on, |
598 | 469 | mir_orientation_normal, | 474 | mir_orientation_normal, |
599 | 470 | 1.0f, | 475 | 1.0f, |
601 | 471 | mir_form_factor_monitor | 476 | mir_form_factor_monitor, |
602 | 477 | mir_subpixel_arrangement_unknown | ||
603 | 472 | }, | 478 | }, |
604 | 473 | { | 479 | { |
605 | 474 | mg::DisplayConfigurationOutputId(connector_ids[1]), | 480 | mg::DisplayConfigurationOutputId(connector_ids[1]), |
606 | @@ -486,7 +492,8 @@ | |||
607 | 486 | mir_power_mode_on, | 492 | mir_power_mode_on, |
608 | 487 | mir_orientation_normal, | 493 | mir_orientation_normal, |
609 | 488 | 1.0f, | 494 | 1.0f, |
611 | 489 | mir_form_factor_monitor | 495 | mir_form_factor_monitor, |
612 | 496 | mir_subpixel_arrangement_unknown | ||
613 | 490 | }, | 497 | }, |
614 | 491 | }; | 498 | }; |
615 | 492 | 499 | ||
616 | @@ -617,7 +624,8 @@ | |||
617 | 617 | mir_power_mode_on, | 624 | mir_power_mode_on, |
618 | 618 | mir_orientation_normal, | 625 | mir_orientation_normal, |
619 | 619 | 1.0f, | 626 | 1.0f, |
621 | 620 | mir_form_factor_monitor | 627 | mir_form_factor_monitor, |
622 | 628 | mir_subpixel_arrangement_unknown | ||
623 | 621 | }, | 629 | }, |
624 | 622 | }; | 630 | }; |
625 | 623 | 631 | ||
626 | @@ -640,7 +648,8 @@ | |||
627 | 640 | mir_power_mode_on, | 648 | mir_power_mode_on, |
628 | 641 | mir_orientation_normal, | 649 | mir_orientation_normal, |
629 | 642 | 1.0f, | 650 | 1.0f, |
631 | 643 | mir_form_factor_monitor | 651 | mir_form_factor_monitor, |
632 | 652 | mir_subpixel_arrangement_unknown | ||
633 | 644 | }, | 653 | }, |
634 | 645 | }; | 654 | }; |
635 | 646 | 655 | ||
636 | 647 | 656 | ||
637 | === modified file 'tests/unit-tests/graphics/test_default_display_configuration_policy.cpp' | |||
638 | --- tests/unit-tests/graphics/test_default_display_configuration_policy.cpp 2016-01-29 08:18:22 +0000 | |||
639 | +++ tests/unit-tests/graphics/test_default_display_configuration_policy.cpp 2016-08-09 07:09:23 +0000 | |||
640 | @@ -64,7 +64,8 @@ | |||
641 | 64 | mir_power_mode_on, | 64 | mir_power_mode_on, |
642 | 65 | mir_orientation_normal, | 65 | mir_orientation_normal, |
643 | 66 | 1.0f, | 66 | 1.0f, |
645 | 67 | mir_form_factor_monitor | 67 | mir_form_factor_monitor, |
646 | 68 | mir_subpixel_arrangement_unknown | ||
647 | 68 | }; | 69 | }; |
648 | 69 | } | 70 | } |
649 | 70 | 71 | ||
650 | 71 | 72 | ||
651 | === modified file 'tests/unit-tests/graphics/test_display_configuration.cpp' | |||
652 | --- tests/unit-tests/graphics/test_display_configuration.cpp 2016-02-01 22:53:06 +0000 | |||
653 | +++ tests/unit-tests/graphics/test_display_configuration.cpp 2016-08-09 07:09:23 +0000 | |||
654 | @@ -49,7 +49,8 @@ | |||
655 | 49 | mir_power_mode_on, | 49 | mir_power_mode_on, |
656 | 50 | mir_orientation_normal, | 50 | mir_orientation_normal, |
657 | 51 | 1.0f, | 51 | 1.0f, |
659 | 52 | mir_form_factor_monitor | 52 | mir_form_factor_monitor, |
660 | 53 | mir_subpixel_arrangement_unknown | ||
661 | 53 | }; | 54 | }; |
662 | 54 | 55 | ||
663 | 55 | } | 56 | } |
664 | 56 | 57 | ||
665 | === modified file 'tests/unit-tests/graphics/test_overlapping_output_grouping.cpp' | |||
666 | --- tests/unit-tests/graphics/test_overlapping_output_grouping.cpp 2016-01-29 08:18:22 +0000 | |||
667 | +++ tests/unit-tests/graphics/test_overlapping_output_grouping.cpp 2016-08-09 07:09:23 +0000 | |||
668 | @@ -96,7 +96,8 @@ | |||
669 | 96 | info.power_mode, | 96 | info.power_mode, |
670 | 97 | info.orientation, | 97 | info.orientation, |
671 | 98 | 1.0f, | 98 | 1.0f, |
673 | 99 | mir_form_factor_monitor | 99 | mir_form_factor_monitor, |
674 | 100 | mir_subpixel_arrangement_unknown | ||
675 | 100 | }; | 101 | }; |
676 | 101 | 102 | ||
677 | 102 | f(output); | 103 | f(output); |
678 | 103 | 104 | ||
679 | === modified file 'tests/unit-tests/scene/test_mediating_display_changer.cpp' | |||
680 | --- tests/unit-tests/scene/test_mediating_display_changer.cpp 2016-06-02 05:33:50 +0000 | |||
681 | +++ tests/unit-tests/scene/test_mediating_display_changer.cpp 2016-08-09 07:09:23 +0000 | |||
682 | @@ -71,7 +71,8 @@ | |||
683 | 71 | mode, | 71 | mode, |
684 | 72 | mir_orientation_normal, | 72 | mir_orientation_normal, |
685 | 73 | 1.0f, | 73 | 1.0f, |
687 | 74 | mir_form_factor_phone | 74 | mir_form_factor_phone, |
688 | 75 | mir_subpixel_arrangement_unknown | ||
689 | 75 | }; | 76 | }; |
690 | 76 | } | 77 | } |
691 | 77 | 78 |
Just at quick glance, a couple of things I was already thinking about:
* "arrangement" is better known (and easier to type) as "order"
* "horizontal_rgb" could be abbreviated to "hrgb" etc.
* Consider adding "pentile" and friends. I known most OLED displays are pentile (except only for the PS Vita). And I also suspect my HP Chromebook 13 has a pentile-like LCD too (!?).