mir_buffer_usage_software produces incorrect colours / pixel format
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Mir |
Fix Released
|
High
|
Alexandros Frantzis |
Bug Description
Using mir_buffer_
The documentation says:
/**
* The order of components in a format enum matches the
* order of the components as they would be written in an
* integer representing a pixel value of that format.
*
* For example, abgr_8888 corresponds to 0xAABBGGRR, which will
* end up as R,G,B,A in memory in a little endian system, and
* as A,B,G,R in memory in a big endian system.
*/
This sounds logical and portable. No byte swapping is ever required in the client.
And my system says I get: mir_pixel_
However on screen I don't get the right colours unless I draw 0xAARRGGBB. That's clearly wrong no matter how you interpret the endian-ness.
Related branches
- PS Jenkins bot (community): Approve (continuous-integration)
- Daniel van Vugt: Approve
- Alan Griffiths: Approve
-
Diff: 179 lines (+110/-12)3 files modifiedexamples/multiwin.c (+0/-6)
src/client/mir_surface.cpp (+2/-5)
tests/unit-tests/client/test_client_mir_surface.cpp (+108/-1)
Changed in mir: | |
status: | New → In Progress |
assignee: | nobody → Alexandros Frantzis (afrantzis) |
Changed in mir: | |
status: | Fix Committed → Fix Released |
Demo: https:/ /code.launchpad .net/~vanvugt/ mir/multiwin/ +merge/ 160558