Merge lp:~brandontschaefer/qtmir/correct-xrgb-support into lp:qtmir

Proposed by Brandon Schaefer
Status: Work in progress
Proposed branch: lp:~brandontschaefer/qtmir/correct-xrgb-support
Merge into: lp:qtmir
Diff against target: 26 lines (+8/-3)
1 file modified
src/platforms/mirserver/screen.cpp (+8/-3)
To merge this branch: bzr merge lp:~brandontschaefer/qtmir/correct-xrgb-support
Reviewer Review Type Date Requested Status
PS Jenkins bot (community) continuous-integration Approve
Mir development team Pending
Review via email: mp+238937@code.launchpad.net

Commit message

Use RGBX_8888 for mir_xrgb format vs RGB32. The other issue with RGB32 is its 0xFF alpha value is getting changed/defaulted to 0x00 at some point when making the conversion.

Description of the change

Use RGBX_8888 for mir_xrgb format vs RGB32. The other issue with RGB32 is its 0xFF alpha value is getting changed/defaulted to 0x00 at some point when making the conversion.

To post a comment you must log in.
Revision history for this message
Gerry Boland (gerboland) wrote :

Can you give me branches of SDL and an example demo which I can use to test this?

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

Unmerged revisions

274. By Brandon Schaefer

* Move to using RGBX_8888 for mir_xrgb pixel format

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'src/platforms/mirserver/screen.cpp'
2--- src/platforms/mirserver/screen.cpp 2014-09-10 15:04:42 +0000
3+++ src/platforms/mirserver/screen.cpp 2014-10-20 18:45:02 +0000
4@@ -69,14 +69,19 @@
5 "Qt doesn't support mir_pixel_format_xbgr_8888 in a big endian architecture");
6 }
7 break;
8- break;
9 case mir_pixel_format_argb_8888:
10 // 0xAARRGGBB
11 return QImage::Format_ARGB32;
12 break;
13 case mir_pixel_format_xrgb_8888:
14- // 0xffRRGGBB
15- return QImage::Format_RGB32;
16+ if (isLittleEndian()) {
17+ // 0xRR,0xGG,0xBB,0xXX
18+ return QImage::Format_RGBX8888;
19+ } else {
20+ // 0xXX,0xBB,0xGG,0xRR
21+ qFatal("[mirserver QPA] "
22+ "Qt doesn't support mir_pixel_format_xrgb_8888 in a big endian architecture");
23+ }
24 break;
25 case mir_pixel_format_bgr_888:
26 qFatal("[mirserver QPA] Qt doesn't support mir_pixel_format_bgr_888");

Subscribers

People subscribed via source and target branches