author | Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com> |
Wed, 18 Aug 2010 10:37:55 +0300 | |
changeset 33 | 3e2da88830cd |
parent 18 | 2f34d5167611 |
permissions | -rw-r--r-- |
0 | 1 |
;**************************************************************************** |
2 |
;** |
|
18
2f34d5167611
Revision: 201011
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
0
diff
changeset
|
3 |
;** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies). |
0 | 4 |
;** All rights reserved. |
5 |
;** Contact: Nokia Corporation (qt-info@nokia.com) |
|
6 |
;** |
|
7 |
;** This file is part of the QtGui module of the Qt Toolkit. |
|
8 |
;** |
|
9 |
;** $QT_BEGIN_LICENSE:LGPL$ |
|
10 |
;** No Commercial Usage |
|
11 |
;** This file contains pre-release code and may not be distributed. |
|
12 |
;** You may use this file in accordance with the terms and conditions |
|
13 |
;** contained in the Technology Preview License Agreement accompanying |
|
14 |
;** this package. |
|
15 |
;** |
|
16 |
;** GNU Lesser General Public License Usage |
|
17 |
;** Alternatively, this file may be used under the terms of the GNU Lesser |
|
18 |
;** General Public License version 2.1 as published by the Free Software |
|
19 |
;** Foundation and appearing in the file LICENSE.LGPL included in the |
|
20 |
;** packaging of this file. Please review the following information to |
|
21 |
;** ensure the GNU Lesser General Public License version 2.1 requirements |
|
22 |
;** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. |
|
23 |
;** |
|
24 |
;** In addition, as a special exception, Nokia gives you certain additional |
|
25 |
;** rights. These rights are described in the Nokia Qt LGPL Exception |
|
26 |
;** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. |
|
27 |
;** |
|
28 |
;** If you have questions regarding the use of this file, please contact |
|
29 |
;** Nokia at qt-info@nokia.com. |
|
30 |
;** |
|
31 |
;** |
|
32 |
;** |
|
33 |
;** |
|
34 |
;** |
|
35 |
;** |
|
36 |
;** |
|
37 |
;** |
|
38 |
;** $QT_END_LICENSE$ |
|
39 |
;** |
|
40 |
;**************************************************************************** |
|
41 |
||
42 |
; |
|
43 |
; W A R N I N G |
|
44 |
; ------------- |
|
45 |
; |
|
46 |
; This file is not part of the Qt API. It exists purely as an |
|
47 |
; implementation detail. This header file may change from version to |
|
48 |
; version without notice, or even be removed. |
|
49 |
; |
|
50 |
; We mean it. |
|
51 |
; |
|
52 |
||
53 |
||
54 |
ARM |
|
55 |
PRESERVE8 |
|
56 |
||
57 |
INCLUDE qdrawhelper_armv6_rvct.inc |
|
58 |
||
59 |
||
60 |
;----------------------------------------------------------------------------- |
|
61 |
; qt_blend_rgb32_on_rgb32_arm |
|
62 |
; |
|
63 |
; @brief |
|
64 |
; |
|
65 |
; @param dest Destination pixels (r0) |
|
66 |
; @param dbpl Destination bytes per line (r1) |
|
67 |
; @param src Source pixels (r2) |
|
68 |
; @param sbpl Source bytes per line (r3) |
|
69 |
; @param w Width (s0 -> r4) |
|
70 |
; @param h Height (s1 -> r5) |
|
71 |
; @param const_alpha Constant alpha (s2 -> r6) |
|
72 |
; |
|
73 |
;--------------------------------------------------------------------------- |
|
74 |
qt_blend_rgb32_on_rgb32_armv6 Function |
|
75 |
stmfd sp!, {r4-r12, r14} |
|
76 |
||
77 |
; read arguments off the stack |
|
78 |
add r8, sp, #10 * 4 |
|
79 |
ldmia r8, {r9-r11} |
|
80 |
||
81 |
; Reorganize registers |
|
82 |
||
83 |
mov r4, r10 |
|
84 |
mov r5, r1 |
|
85 |
mov r6, r3 |
|
86 |
||
87 |
mov r1, r2 |
|
88 |
mov r2, r9 |
|
89 |
mov r3, r11 |
|
90 |
||
91 |
; Now we have registers |
|
92 |
; @param dest Destination pixels (r0) |
|
93 |
; @param src Source pixels (r1) |
|
94 |
; @param w Width (r2) |
|
95 |
; @param const_alpha Constant alpha (r3) |
|
96 |
; @param h Height (r4) |
|
97 |
; @param dbpl Destination bytes per line (r5) |
|
98 |
; @param sbpl Source bytes per line (r6) |
|
99 |
||
100 |
cmp r3, #256 ; test if we have fully opaque constant alpha value |
|
101 |
bne rgb32_blend_const_alpha ; branch if not |
|
102 |
||
103 |
rgb32_blend_loop |
|
104 |
||
105 |
subs r4, r4, #1 |
|
106 |
bmi rgb32_blend_exit ; while(h--) |
|
107 |
||
108 |
rgb321 PixCpySafe r0, r1, r2 |
|
109 |
||
110 |
add r0, r0, r5 ; dest = dest + dbpl |
|
111 |
add r1, r1, r6 ; src = src + sbpl |
|
112 |
||
113 |
b rgb32_blend_loop |
|
114 |
||
115 |
||
116 |
rgb32_blend_const_alpha |
|
117 |
||
118 |
;ldr r14, =ComponentHalf ; load 0x800080 to r14 |
|
119 |
mov r14, #0x800000 |
|
120 |
add r14, r14, #0x80 |
|
121 |
||
122 |
sub r3, r3, #1 ; const_alpha -= 1; |
|
123 |
||
124 |
rgb32_blend_loop_const_alpha |
|
125 |
||
126 |
subs r4, r4, #1 |
|
127 |
bmi rgb32_blend_exit ; while(h--) |
|
128 |
||
129 |
rgb322 BlendRowSafe PixelSourceOverConstAlpha |
|
130 |
||
131 |
add r0, r0, r5 ; dest = dest + dbpl |
|
132 |
add r1, r1, r6 ; src = src + sbpl |
|
133 |
||
134 |
b rgb32_blend_loop_const_alpha |
|
135 |
||
136 |
rgb32_blend_exit |
|
137 |
||
138 |
ldmfd sp!, {r4-r12, pc} ; pop and return |
|
139 |
||
140 |
||
141 |
||
142 |
;----------------------------------------------------------------------------- |
|
143 |
; qt_blend_argb32_on_argb32_arm |
|
144 |
; |
|
145 |
; @brief |
|
146 |
; |
|
147 |
; @param dest Destination pixels (r0) |
|
148 |
; @param dbpl Destination bytes per line (r1) |
|
149 |
; @param src Source pixels (r2) |
|
150 |
; @param sbpl Source bytes per line (r3) |
|
151 |
; @param w Width (s0 -> r4) |
|
152 |
; @param h Height (s1 -> r5) |
|
153 |
; @param const_alpha Constant alpha (s2 -> r6) |
|
154 |
; |
|
155 |
;--------------------------------------------------------------------------- |
|
156 |
qt_blend_argb32_on_argb32_armv6 Function |
|
157 |
stmfd sp!, {r4-r12, r14} |
|
158 |
||
159 |
; read arguments off the stack |
|
160 |
add r8, sp, #10 * 4 |
|
161 |
ldmia r8, {r9-r11} |
|
162 |
||
163 |
; Reorganize registers |
|
164 |
||
165 |
mov r4, r10 |
|
166 |
mov r5, r1 |
|
167 |
mov r6, r3 |
|
168 |
||
169 |
mov r1, r2 |
|
170 |
mov r2, r9 |
|
171 |
mov r3, r11 |
|
172 |
||
173 |
; Now we have registers |
|
174 |
; @param dest Destination pixels (r0) |
|
175 |
; @param src Source pixels (r1) |
|
176 |
; @param w Width (r2) |
|
177 |
; @param const_alpha Constant alpha (r3) |
|
178 |
; @param h Height (r4) |
|
179 |
; @param dbpl Destination bytes per line (r5) |
|
180 |
; @param sbpl Source bytes per line (r6) |
|
181 |
||
182 |
;ldr r14, =ComponentHalf ; load 0x800080 to r14 |
|
183 |
mov r14, #0x800000 |
|
184 |
add r14, r14, #0x80 |
|
185 |
||
186 |
cmp r3, #256 ; test if we have fully opaque constant alpha value |
|
187 |
bne argb32_blend_const_alpha ; branch if not |
|
188 |
||
189 |
argb32_blend_loop |
|
190 |
||
191 |
subs r4, r4, #1 |
|
192 |
bmi argb32_blend_exit ; while(h--) |
|
193 |
||
194 |
argb321 BlendRowSafe PixelSourceOver |
|
195 |
||
196 |
add r0, r0, r5 ; dest = dest + dbpl |
|
197 |
add r1, r1, r6 ; src = src + sbpl |
|
198 |
||
199 |
b argb32_blend_loop |
|
200 |
||
201 |
argb32_blend_const_alpha |
|
202 |
||
203 |
sub r3, r3, #1 ; const_alpha -= 1; |
|
204 |
||
205 |
argb32_blend_loop_const_alpha |
|
206 |
||
207 |
subs r4, r4, #1 |
|
208 |
bmi argb32_blend_exit ; while(h--) |
|
209 |
||
210 |
argb322 BlendRowSafe PixelSourceOverConstAlpha |
|
211 |
||
212 |
add r0, r0, r5 ; dest = dest + dbpl |
|
213 |
add r1, r1, r6 ; src = src + sbpl |
|
214 |
||
215 |
b argb32_blend_loop_const_alpha |
|
216 |
||
217 |
argb32_blend_exit |
|
218 |
||
219 |
ldmfd sp!, {r4-r12, pc} ; pop and return |
|
220 |
||
221 |
||
222 |
END ; File end |