呵呵 我的是9263上面出现这个问题的
我把qt改了一下 qt库版本 是 qt-2.3.10 基本OK了 只是 阴影部分还有点点 问题 真正解决中.................
以下是修改的代码:
其中添加了一个编译参数 BGR_555
可以添加在 configure 中
config的时候添加 -bgr555 选项
-R)
shift
R_FLAGS="$R_FLAGS -R$1"
;;
-bgr555)
shift
QT_CXX="$QT_CXX -BGR_555"
;;
*)
echo $1: unknown argument
HELP=yes;
ERROR=yes
;;
esac
shift
done
src/kernel/qgfx_qws.h
44 #if !defined( QT_NO_IMAGE_16_BIT ) || !defined( QT_NO_QWS_DEPTH_16 )
45 # ifndef QT_QWS_DEPTH16_RGB
46 #if defined(BGR_555)
47 #define QT_QWS_DEPTH16_RGB 555
48 #else
49 #define QT_QWS_DEPTH16_RGB 565
50 #endif /* end BGR_555 */
51 # endif
52 static const int qt_rbits = (QT_QWS_DEPTH16_RGB/100);
53 static const int qt_gbits = (QT_QWS_DEPTH16_RGB/10%10);
54 static const int qt_bbits = (QT_QWS_DEPTH16_RGB%10);
55
56 #if defined(BGR_555)
57 static const int qt_neg_blue_shift = qt_bbits+qt_gbits-(8-qt_rbits);
58 static const int qt_green_shift = qt_bbits-(8-qt_gbits);
59 static const int qt_red_shift = 8-qt_bbits;
60
61 static const int qt_red_mask = (1<<qt_bbits)-1;
62 static const int qt_green_mask = (1<<(qt_gbits+qt_bbits))-(1<<qt_bbits);
63 static const int qt_blue_mask = (1<<(qt_rbits+qt_gbits+qt_bbits))-(1<<(qt_gbits+qt_bbits));
64 #else
65 static const int qt_red_shift = qt_bbits+qt_gbits-(8-qt_rbits);
66 static const int qt_green_shift = qt_bbits-(8-qt_gbits);
67 static const int qt_neg_blue_shift = 8-qt_bbits;
68
69 static const int qt_blue_mask = (1<<qt_bbits)-1;
70 static const int qt_green_mask = (1<<(qt_gbits+qt_bbits))-(1<<qt_bbits);
71 static const int qt_red_mask = (1<<(qt_rbits+qt_gbits+qt_bbits))-(1<<(qt_gbits+qt_bbits));
72 #endif
73
74 inline ushort qt_convRgbTo16( const int r, const int g, const int b )
75 {
76 //const int tr = r << qt_red_shift;
77 //const int tg = g << qt_green_shift;
78 //const int tb = b >> qt_neg_blue_shift;
79 #if defined(BGR_555)
80 const int tr = r >> qt_red_shift; /* 3 */
81 const int tg = g << qt_green_shift; /* 2 */
82 const int tb = b << qt_neg_blue_shift; /* 7 */
83 //return (tr & 0x1f) | (tg & 0x3E0) | (tb & 0x7C00);
84 #else
85 const int tr = r << qt_red_shift; /* 8 */
86 const int tg = g << qt_green_shift; /* 3 */
87 const int tb = b >> qt_neg_blue_shift; /* 3 */
88 //return (tb & 0x1f) | (tg & 0x3E0) | (tr & 0x7C00);
89 #endif
90 /* the pix 16bit format of BGR555 is 0bbbbbgggggrrrrr
91 * the pix 16bit format of RGB565 is rrrrrggggggbbbbb */
92 //qDebug( "qt_red_shift:%d, qt_green_shift:%d, qt_neg_blue_shift:%d\n", qt_red_shift, qt_green_shift, qt_neg_blue_shift);
93 //qDebug( "qt_red_mask:%d, qt_green_mask:%d, qt_blue_mask:%d\n", qt_red_mask, qt_green_mask, qt_blue_mask);
94 return (tr & qt_red_mask) | (tg & qt_green_mask) | (tb & qt_blue_mask);
95 }
96
97 inline ushort qt_convRgbTo16( QRgb c )
98 {
99 //const int tr = qRed(c) << qt_red_shift;
100 //const int tg = qGreen(c) << qt_green_shift;
101 //const int tb = qBlue(c) >> qt_neg_blue_shift;
102 #if defined(BGR_555)
103 const int tr = qRed(c) >> qt_red_shift;
104 const int tg = qGreen(c) << qt_green_shift;
105 const int tb = qBlue(c) << qt_neg_blue_shift;
106 //return (tr & 0x1f) | (tg & 0x3E0) | (tb & 0x7c00);
107 #else
108 const int tr = qRed(c) << qt_red_shift;
109 const int tg = qGreen(c) << qt_green_shift;
110 const int tb = qBlue(c) >> qt_neg_blue_shift;
111 //return (tb & 0x1f) | (tg & 0x3E0) | (tr & 0x7C00);
112 #endif
113 return (tr & qt_red_mask) | (tg & qt_green_mask) | (tb & qt_blue_mask);
114 }