OLD | NEW |
1 // Copyright 2014 PDFium Authors. All rights reserved. | 1 // Copyright 2014 PDFium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #ifndef _FX_SKIABLITTER_H_ | 5 #ifndef _FX_SKIABLITTER_H_ |
6 #define _FX_SKIABLITTER_H_ | 6 #define _FX_SKIABLITTER_H_ |
7 //#define _SKIA_SUPPORT_ | 7 //#define _SKIA_SUPPORT_ |
8 #if defined(_SKIA_SUPPORT_) | 8 #if defined(_SKIA_SUPPORT_) |
9 class CFX_SkiaRenderer : public SkBlitter, public CFX_Object | 9 class CFX_SkiaRenderer : public SkBlitter, public CFX_Object { |
10 { | 10 protected: |
11 protected: | 11 int m_Alpha, |
12 int m_Alpha, | 12 m_Red, // Or the complementary-color, Cyan |
13 m_Red, // Or the complementary-color, C
yan | 13 m_Green, // Magenta |
14 m_Green, // Magenta | 14 m_Blue, // Yellow |
15 m_Blue, // Yellow | 15 m_Gray; // Black |
16 m_Gray; // Black | 16 FX_DWORD m_Color; // FX_ARGB or FX_CMYK |
17 FX_DWORD m_Color; // FX_ARGB or FX_CMYK | 17 FX_BOOL m_bFullCover; |
18 FX_BOOL m_bFullCover; | 18 int m_ProcessFilter; |
19 int m_ProcessFilter; | 19 FX_BOOL m_bRgbByteOrder; |
20 FX_BOOL m_bRgbByteOrder; | 20 |
21 | 21 FX_RECT m_ClipBox; |
22 FX_RECT m_ClipBox; | 22 CFX_DIBitmap* m_pDevice; |
23 CFX_DIBitmap* m_pDevice; | 23 CFX_DIBitmap* m_pOriDevice; |
24 CFX_DIBitmap* m_pOriDevice; | 24 const CFX_ClipRgn* m_pClipRgn; |
25 const CFX_ClipRgn* m_pClipRgn; | 25 const CFX_DIBitmap* m_pClipMask; |
26 const CFX_DIBitmap* m_pClipMask; | 26 |
27 | 27 FX_LPBYTE m_pDestScan; |
28 FX_LPBYTE m_pDestScan; | 28 FX_LPBYTE m_pDestExtraAlphaScan; |
29 FX_LPBYTE m_pDestExtraAlphaScan; | 29 FX_LPBYTE m_pOriScan; |
30 FX_LPBYTE m_pOriScan; | 30 FX_LPBYTE m_pClipScan; |
31 FX_LPBYTE m_pClipScan; | 31 |
32 | 32 void (CFX_SkiaRenderer::*composite_span)(FX_LPBYTE, |
33 void (CFX_SkiaRenderer::*composite_span)(FX_LPBYTE,FX_LPBYTE,int,int,int
,int,FX_BYTE,int,int,int,FX_LPBYTE,FX_LPBYTE); | 33 FX_LPBYTE, |
34 public: | 34 int, |
35 | 35 int, |
36 //-------------------------------------------------------------------- | 36 int, |
37 virtual void blitAntiH(int x, int y, const SkAlpha antialias[], const int16_
t runs[]); | 37 int, |
38 virtual void blitH(int x, int y, int width); | 38 FX_BYTE, |
39 virtual void blitV(int x, int y, int height, SkAlpha alpha); | 39 int, |
40 virtual void blitRect(int x, int y, int width, int height); | 40 int, |
41 virtual void blitAntiRect(int x, int y, int width, int height, SkAlpha l
eftAlpha, SkAlpha rightAlpha); | 41 int, |
42 | 42 FX_LPBYTE, |
43 /*----------------------------------------------------------------------
--------------------------------*/ | 43 FX_LPBYTE); |
44 // A general alpha merge function (with clipping mask). Gray device. | 44 |
45 void CompositeSpan1bpp_0(FX_LPBYTE dest_scan, FX_LPBYTE ori_scan,int Bpp
, | 45 public: |
46 int span_left, int span_len, int span_top, FX_BYTE cover
_scan, | 46 //-------------------------------------------------------------------- |
47 int clip_top, int clip_left, int clip_right, FX_LPBYTE c
lip_scan, | 47 virtual void blitAntiH(int x, |
48 FX_LPBYTE dest_extra_alpha_scan); | 48 int y, |
49 void CompositeSpan1bpp_1(FX_LPBYTE dest_scan, FX_LPBYTE ori_scan,int Bpp
, | 49 const SkAlpha antialias[], |
50 int span_left, int span_len, int span_top, FX_BYTE cover
_scan, | 50 const int16_t runs[]); |
51 int clip_top, int clip_left, int clip_right, FX_LPBYTE c
lip_scan, | 51 virtual void blitH(int x, int y, int width); |
52 FX_LPBYTE dest_extra_alpha_scan); | 52 virtual void blitV(int x, int y, int height, SkAlpha alpha); |
53 void CompositeSpan1bpp_4(FX_LPBYTE dest_scan, FX_LPBYTE ori_scan,int Bpp
, | 53 virtual void blitRect(int x, int y, int width, int height); |
54 int span_left, int span_len, int span_top, FX_BYTE cover
_scan, | 54 virtual void blitAntiRect(int x, |
55 int clip_top, int clip_left, int clip_right, FX_LPBYTE c
lip_scan, | 55 int y, |
56 FX_LPBYTE dest_extra_alpha_scan); | 56 int width, |
57 void CompositeSpan1bpp_5(FX_LPBYTE dest_scan, FX_LPBYTE ori_scan,int Bpp
, | 57 int height, |
58 int span_left, int span_len, int span_top, FX_BYTE cover
_scan, | 58 SkAlpha leftAlpha, |
59 int clip_top, int clip_left, int clip_right, FX_LPBYTE c
lip_scan, | 59 SkAlpha rightAlpha); |
60 FX_LPBYTE dest_extra_alpha_scan); | 60 |
61 void CompositeSpan1bpp_8(FX_LPBYTE dest_scan, FX_LPBYTE ori_scan,int Bpp
, | 61 /*----------------------------------------------------------------------------
--------------------------*/ |
62 int span_left, int span_len, int span_top, FX_BYTE cover
_scan, | 62 // A general alpha merge function (with clipping mask). Gray device. |
63 int clip_top, int clip_left, int clip_right, FX_LPBYTE c
lip_scan, | 63 void CompositeSpan1bpp_0(FX_LPBYTE dest_scan, |
64 FX_LPBYTE dest_extra_alpha_scan); | 64 FX_LPBYTE ori_scan, |
65 void CompositeSpan1bpp_9(FX_LPBYTE dest_scan, FX_LPBYTE ori_scan,int Bpp
, | 65 int Bpp, |
66 int span_left, int span_len, int span_top, FX_BYTE cover
_scan, | 66 int span_left, |
67 int clip_top, int clip_left, int clip_right, FX_LPBYTE c
lip_scan, | 67 int span_len, |
68 FX_LPBYTE dest_extra_alpha_scan); | 68 int span_top, |
69 void CompositeSpan1bpp_12(FX_LPBYTE dest_scan, FX_LPBYTE ori_scan,int Bp
p, | 69 FX_BYTE cover_scan, |
70 int span_left, int span_len, int span_top, FX_BYTE cover
_scan, | 70 int clip_top, |
71 int clip_top, int clip_left, int clip_right, FX_LPBYTE c
lip_scan, | 71 int clip_left, |
72 FX_LPBYTE dest_extra_alpha_scan); | 72 int clip_right, |
73 void CompositeSpan1bpp_13(FX_LPBYTE dest_scan, FX_LPBYTE ori_scan,int Bp
p, | 73 FX_LPBYTE clip_scan, |
74 int span_left, int span_len, int span_top, FX_BYTE cover
_scan, | 74 FX_LPBYTE dest_extra_alpha_scan); |
75 int clip_top, int clip_left, int clip_right, FX_LPBYTE c
lip_scan, | 75 void CompositeSpan1bpp_1(FX_LPBYTE dest_scan, |
76 FX_LPBYTE dest_extra_alpha_scan); | 76 FX_LPBYTE ori_scan, |
77 | 77 int Bpp, |
78 /*----------------------------------------------------------------------
----------------------------------*/ | 78 int span_left, |
79 | 79 int span_len, |
80 // A general alpha merge function (with clipping mask). Gray device. | 80 int span_top, |
81 void CompositeSpanGray_2(FX_LPBYTE dest_scan, FX_LPBYTE ori_scan,int Bpp
, | 81 FX_BYTE cover_scan, |
82 int span_left, int span_len, int span_top, FX_BYTE cover
_scan, | 82 int clip_top, |
83 int clip_top, int clip_left, int clip_right, FX_LPBYTE c
lip_scan, | 83 int clip_left, |
84 FX_LPBYTE dest_extra_alpha_scan); | 84 int clip_right, |
85 | 85 FX_LPBYTE clip_scan, |
86 void CompositeSpanGray_3(FX_LPBYTE dest_scan, FX_LPBYTE ori_scan,int Bpp
, | 86 FX_LPBYTE dest_extra_alpha_scan); |
87 int span_left, int span_len, int span_top, FX_BYTE cover
_scan, | 87 void CompositeSpan1bpp_4(FX_LPBYTE dest_scan, |
88 int clip_top, int clip_left, int clip_right, FX_LPBYTE c
lip_scan, | 88 FX_LPBYTE ori_scan, |
89 FX_LPBYTE dest_extra_alpha_scan); | 89 int Bpp, |
90 | 90 int span_left, |
91 void CompositeSpanGray_6(FX_LPBYTE dest_scan, FX_LPBYTE ori_scan,int Bpp
, | 91 int span_len, |
92 int span_left, int span_len, int span_top, FX_BYTE cover
_scan, | 92 int span_top, |
93 int clip_top, int clip_left, int clip_right, FX_LPBYTE c
lip_scan, | 93 FX_BYTE cover_scan, |
94 FX_LPBYTE dest_extra_alpha_scan); | 94 int clip_top, |
95 | 95 int clip_left, |
96 void CompositeSpanGray_7(FX_LPBYTE dest_scan, FX_LPBYTE ori_scan,int Bpp
, | 96 int clip_right, |
97 int span_left, int span_len, int span_top, FX_BYTE cover
_scan, | 97 FX_LPBYTE clip_scan, |
98 int clip_top, int clip_left, int clip_right, FX_LPBYTE c
lip_scan, | 98 FX_LPBYTE dest_extra_alpha_scan); |
99 FX_LPBYTE dest_extra_alpha_scan); | 99 void CompositeSpan1bpp_5(FX_LPBYTE dest_scan, |
100 | 100 FX_LPBYTE ori_scan, |
101 void CompositeSpanGray_10(FX_LPBYTE dest_scan, FX_LPBYTE ori_scan,int Bp
p, | 101 int Bpp, |
102 int span_left, int span_len, int span_top, FX_BYTE cover
_scan, | 102 int span_left, |
103 int clip_top, int clip_left, int clip_right, FX_LPBYTE c
lip_scan, | 103 int span_len, |
104 FX_LPBYTE dest_extra_alpha_scan); | 104 int span_top, |
105 | 105 FX_BYTE cover_scan, |
106 | 106 int clip_top, |
107 void CompositeSpanGray_11(FX_LPBYTE dest_scan, FX_LPBYTE ori_scan,int Bp
p, | 107 int clip_left, |
108 int span_left, int span_len, int span_top, FX_BYTE cover
_scan, | 108 int clip_right, |
109 int clip_top, int clip_left, int clip_right, FX_LPBYTE c
lip_scan, | 109 FX_LPBYTE clip_scan, |
110 FX_LPBYTE dest_extra_alpha_scan); | 110 FX_LPBYTE dest_extra_alpha_scan); |
111 | 111 void CompositeSpan1bpp_8(FX_LPBYTE dest_scan, |
112 void CompositeSpanGray_14(FX_LPBYTE dest_scan, FX_LPBYTE ori_scan,int Bp
p, | 112 FX_LPBYTE ori_scan, |
113 int span_left, int span_len, int span_top, FX_BYTE cover
_scan, | 113 int Bpp, |
114 int clip_top, int clip_left, int clip_right, FX_LPBYTE c
lip_scan, | 114 int span_left, |
115 FX_LPBYTE dest_extra_alpha_scan); | 115 int span_len, |
116 | 116 int span_top, |
117 void CompositeSpanGray_15(FX_LPBYTE dest_scan, FX_LPBYTE ori_scan,int Bp
p, | 117 FX_BYTE cover_scan, |
118 int span_left, int span_len, int span_top, FX_BYTE cover
_scan, | 118 int clip_top, |
119 int clip_top, int clip_left, int clip_right, FX_LPBYTE c
lip_scan, | 119 int clip_left, |
120 FX_LPBYTE dest_extra_alpha_scan); | 120 int clip_right, |
121 | 121 FX_LPBYTE clip_scan, |
122 /*----------------------------------------------------------------------
----------------------------------*/ | 122 FX_LPBYTE dest_extra_alpha_scan); |
123 void CompositeSpanARGB_2(FX_LPBYTE dest_scan, FX_LPBYTE ori_scan,int Bpp
, | 123 void CompositeSpan1bpp_9(FX_LPBYTE dest_scan, |
124 int span_left, int span_len, int span_top, FX_BYTE cover
_scan, | 124 FX_LPBYTE ori_scan, |
125 int clip_top, int clip_left, int clip_right, FX_LPBYTE c
lip_scan, | 125 int Bpp, |
126 FX_LPBYTE dest_extra_alpha_scan); | 126 int span_left, |
127 | 127 int span_len, |
128 void CompositeSpanARGB_3(FX_LPBYTE dest_scan, FX_LPBYTE ori_scan,int Bpp
, | 128 int span_top, |
129 int span_left, int span_len, int span_top, FX_BYTE cover
_scan, | 129 FX_BYTE cover_scan, |
130 int clip_top, int clip_left, int clip_right, FX_LPBYTE c
lip_scan, | 130 int clip_top, |
131 FX_LPBYTE dest_extra_alpha_scan); | 131 int clip_left, |
132 | 132 int clip_right, |
133 | 133 FX_LPBYTE clip_scan, |
134 void CompositeSpanARGB_6(FX_LPBYTE dest_scan, FX_LPBYTE ori_scan,int Bpp
, | 134 FX_LPBYTE dest_extra_alpha_scan); |
135 int span_left, int span_len, int span_top, FX_BYTE cover
_scan, | 135 void CompositeSpan1bpp_12(FX_LPBYTE dest_scan, |
136 int clip_top, int clip_left, int clip_right, FX_LPBYTE c
lip_scan, | 136 FX_LPBYTE ori_scan, |
137 FX_LPBYTE dest_extra_alpha_scan); | 137 int Bpp, |
138 | 138 int span_left, |
139 | 139 int span_len, |
140 void CompositeSpanARGB_7(FX_LPBYTE dest_scan, FX_LPBYTE ori_scan,int Bpp
, | 140 int span_top, |
141 int span_left, int span_len, int span_top, FX_BYTE cover
_scan, | 141 FX_BYTE cover_scan, |
142 int clip_top, int clip_left, int clip_right, FX_LPBYTE c
lip_scan, | 142 int clip_top, |
143 FX_LPBYTE dest_extra_alpha_scan); | 143 int clip_left, |
144 // ... | 144 int clip_right, |
145 /*----------------------------------------------------------------------
----------------------------------*/ | 145 FX_LPBYTE clip_scan, |
146 void CompositeSpanRGB32_2(FX_LPBYTE dest_scan, FX_LPBYTE ori_scan,int Bp
p, | 146 FX_LPBYTE dest_extra_alpha_scan); |
147 int span_left, int span_len, int span_top, FX_BYTE cover
_scan, | 147 void CompositeSpan1bpp_13(FX_LPBYTE dest_scan, |
148 int clip_top, int clip_left, int clip_right, FX_LPBYTE c
lip_scan, | 148 FX_LPBYTE ori_scan, |
149 FX_LPBYTE dest_extra_alpha_scan); | 149 int Bpp, |
150 void CompositeSpanRGB32_3(FX_LPBYTE dest_scan, FX_LPBYTE ori_scan,int Bp
p, | 150 int span_left, |
151 int span_left, int span_len, int span_top, FX_BYTE cover
_scan, | 151 int span_len, |
152 int clip_top, int clip_left, int clip_right, FX_LPBYTE c
lip_scan, | 152 int span_top, |
153 FX_LPBYTE dest_extra_alpha_scan); | 153 FX_BYTE cover_scan, |
154 void CompositeSpanRGB32_6(FX_LPBYTE dest_scan, FX_LPBYTE ori_scan,int Bp
p, | 154 int clip_top, |
155 int span_left, int span_len, int span_top, FX_BYTE cover
_scan, | 155 int clip_left, |
156 int clip_top, int clip_left, int clip_right, FX_LPBYTE c
lip_scan, | 156 int clip_right, |
157 FX_LPBYTE dest_extra_alpha_scan); | 157 FX_LPBYTE clip_scan, |
158 void CompositeSpanRGB32_7(FX_LPBYTE dest_scan, FX_LPBYTE ori_scan,int Bp
p, | 158 FX_LPBYTE dest_extra_alpha_scan); |
159 int span_left, int span_len, int span_top, FX_BYTE cover
_scan, | 159 |
160 int clip_top, int clip_left, int clip_right, FX_LPBYTE c
lip_scan, | 160 /*----------------------------------------------------------------------------
----------------------------*/ |
161 FX_LPBYTE dest_extra_alpha_scan); | 161 |
162 | 162 // A general alpha merge function (with clipping mask). Gray device. |
163 /*----------------------------------------------------------------------
-----------------------------------*/ | 163 void CompositeSpanGray_2(FX_LPBYTE dest_scan, |
164 | 164 FX_LPBYTE ori_scan, |
165 void CompositeSpanRGB24_2(FX_LPBYTE dest_scan, FX_LPBYTE ori_scan,int Bp
p, | 165 int Bpp, |
166 int span_left, int span_len, int span_top, FX_BYTE cover
_scan, | 166 int span_left, |
167 int clip_top, int clip_left, int clip_right, FX_LPBYTE c
lip_scan, | 167 int span_len, |
168 FX_LPBYTE dest_extra_alpha_scan); | 168 int span_top, |
169 void CompositeSpanRGB24_3(FX_LPBYTE dest_scan, FX_LPBYTE ori_scan,int Bp
p, | 169 FX_BYTE cover_scan, |
170 int span_left, int span_len, int span_top, FX_BYTE cover
_scan, | 170 int clip_top, |
171 int clip_top, int clip_left, int clip_right, FX_LPBYTE c
lip_scan, | 171 int clip_left, |
172 FX_LPBYTE dest_extra_alpha_scan); | 172 int clip_right, |
173 void CompositeSpanRGB24_6(FX_LPBYTE dest_scan, FX_LPBYTE ori_scan,int Bp
p, | 173 FX_LPBYTE clip_scan, |
174 int span_left, int span_len, int span_top, FX_BYTE cover
_scan, | 174 FX_LPBYTE dest_extra_alpha_scan); |
175 int clip_top, int clip_left, int clip_right, FX_LPBYTE c
lip_scan, | 175 |
176 FX_LPBYTE dest_extra_alpha_scan); | 176 void CompositeSpanGray_3(FX_LPBYTE dest_scan, |
177 void CompositeSpanRGB24_7(FX_LPBYTE dest_scan, FX_LPBYTE ori_scan,int Bp
p, | 177 FX_LPBYTE ori_scan, |
178 int span_left, int span_len, int span_top, FX_BYTE cover
_scan, | 178 int Bpp, |
179 int clip_top, int clip_left, int clip_right, FX_LPBYTE c
lip_scan, | 179 int span_left, |
180 FX_LPBYTE dest_extra_alpha_scan); | 180 int span_len, |
181 void CompositeSpanRGB24_10(FX_LPBYTE dest_scan, FX_LPBYTE ori_scan,int B
pp, | 181 int span_top, |
182 int span_left, int span_len, int span_top, FX_BYTE cover
_scan, | 182 FX_BYTE cover_scan, |
183 int clip_top, int clip_left, int clip_right, FX_LPBYTE c
lip_scan, | 183 int clip_top, |
184 FX_LPBYTE dest_extra_alpha_scan); | 184 int clip_left, |
185 void CompositeSpanRGB24_11(FX_LPBYTE dest_scan, FX_LPBYTE ori_scan,int B
pp, | 185 int clip_right, |
186 int span_left, int span_len, int span_top, FX_BYTE cover
_scan, | 186 FX_LPBYTE clip_scan, |
187 int clip_top, int clip_left, int clip_right, FX_LPBYTE c
lip_scan, | 187 FX_LPBYTE dest_extra_alpha_scan); |
188 FX_LPBYTE dest_extra_alpha_scan); | 188 |
189 void CompositeSpanRGB24_14(FX_LPBYTE dest_scan, FX_LPBYTE ori_scan,int B
pp, | 189 void CompositeSpanGray_6(FX_LPBYTE dest_scan, |
190 int span_left, int span_len, int span_top, FX_BYTE cover
_scan, | 190 FX_LPBYTE ori_scan, |
191 int clip_top, int clip_left, int clip_right, FX_LPBYTE c
lip_scan, | 191 int Bpp, |
192 FX_LPBYTE dest_extra_alpha_scan); | 192 int span_left, |
193 void CompositeSpanRGB24_15(FX_LPBYTE dest_scan, FX_LPBYTE ori_scan,int B
pp, | 193 int span_len, |
194 int span_left, int span_len, int span_top, FX_BYTE cover
_scan, | 194 int span_top, |
195 int clip_top, int clip_left, int clip_right, FX_LPBYTE c
lip_scan, | 195 FX_BYTE cover_scan, |
196 FX_LPBYTE dest_extra_alpha_scan); | 196 int clip_top, |
197 | 197 int clip_left, |
198 /*----------------------------------------------------------------------
------------------------------------*/ | 198 int clip_right, |
199 | 199 FX_LPBYTE clip_scan, |
200 // A general alpha merge function (with clipping mask). Cmyka/Cmyk devic
e. | 200 FX_LPBYTE dest_extra_alpha_scan); |
201 void CompositeSpanCMYK(FX_LPBYTE dest_scan, FX_LPBYTE ori_scan,int Bpp, | 201 |
202 int span_left, int span_len, int span_top, FX_BYTE cover
_scan, | 202 void CompositeSpanGray_7(FX_LPBYTE dest_scan, |
203 int clip_top, int clip_left, int clip_right, FX_LPBYTE c
lip_scan, | 203 FX_LPBYTE ori_scan, |
204 FX_LPBYTE dest_extra_alpha_scan); | 204 int Bpp, |
205 | 205 int span_left, |
206 | 206 int span_len, |
207 //-------------------------------------------------------------------- | 207 int span_top, |
208 FX_BOOL Init(CFX_DIBitmap* pDevice, CFX_DIBitmap* pOriDevice, const CFX_
ClipRgn* pClipRgn, FX_DWORD color, FX_BOOL bFullCover, FX_BOOL bRgbByteOrder, | 208 FX_BYTE cover_scan, |
209 int alpha_flag = 0, void* pIccTransform = NULL); //The alpha fla
g must be fill_flag if exist. | 209 int clip_top, |
| 210 int clip_left, |
| 211 int clip_right, |
| 212 FX_LPBYTE clip_scan, |
| 213 FX_LPBYTE dest_extra_alpha_scan); |
| 214 |
| 215 void CompositeSpanGray_10(FX_LPBYTE dest_scan, |
| 216 FX_LPBYTE ori_scan, |
| 217 int Bpp, |
| 218 int span_left, |
| 219 int span_len, |
| 220 int span_top, |
| 221 FX_BYTE cover_scan, |
| 222 int clip_top, |
| 223 int clip_left, |
| 224 int clip_right, |
| 225 FX_LPBYTE clip_scan, |
| 226 FX_LPBYTE dest_extra_alpha_scan); |
| 227 |
| 228 void CompositeSpanGray_11(FX_LPBYTE dest_scan, |
| 229 FX_LPBYTE ori_scan, |
| 230 int Bpp, |
| 231 int span_left, |
| 232 int span_len, |
| 233 int span_top, |
| 234 FX_BYTE cover_scan, |
| 235 int clip_top, |
| 236 int clip_left, |
| 237 int clip_right, |
| 238 FX_LPBYTE clip_scan, |
| 239 FX_LPBYTE dest_extra_alpha_scan); |
| 240 |
| 241 void CompositeSpanGray_14(FX_LPBYTE dest_scan, |
| 242 FX_LPBYTE ori_scan, |
| 243 int Bpp, |
| 244 int span_left, |
| 245 int span_len, |
| 246 int span_top, |
| 247 FX_BYTE cover_scan, |
| 248 int clip_top, |
| 249 int clip_left, |
| 250 int clip_right, |
| 251 FX_LPBYTE clip_scan, |
| 252 FX_LPBYTE dest_extra_alpha_scan); |
| 253 |
| 254 void CompositeSpanGray_15(FX_LPBYTE dest_scan, |
| 255 FX_LPBYTE ori_scan, |
| 256 int Bpp, |
| 257 int span_left, |
| 258 int span_len, |
| 259 int span_top, |
| 260 FX_BYTE cover_scan, |
| 261 int clip_top, |
| 262 int clip_left, |
| 263 int clip_right, |
| 264 FX_LPBYTE clip_scan, |
| 265 FX_LPBYTE dest_extra_alpha_scan); |
| 266 |
| 267 /*----------------------------------------------------------------------------
----------------------------*/ |
| 268 void CompositeSpanARGB_2(FX_LPBYTE dest_scan, |
| 269 FX_LPBYTE ori_scan, |
| 270 int Bpp, |
| 271 int span_left, |
| 272 int span_len, |
| 273 int span_top, |
| 274 FX_BYTE cover_scan, |
| 275 int clip_top, |
| 276 int clip_left, |
| 277 int clip_right, |
| 278 FX_LPBYTE clip_scan, |
| 279 FX_LPBYTE dest_extra_alpha_scan); |
| 280 |
| 281 void CompositeSpanARGB_3(FX_LPBYTE dest_scan, |
| 282 FX_LPBYTE ori_scan, |
| 283 int Bpp, |
| 284 int span_left, |
| 285 int span_len, |
| 286 int span_top, |
| 287 FX_BYTE cover_scan, |
| 288 int clip_top, |
| 289 int clip_left, |
| 290 int clip_right, |
| 291 FX_LPBYTE clip_scan, |
| 292 FX_LPBYTE dest_extra_alpha_scan); |
| 293 |
| 294 void CompositeSpanARGB_6(FX_LPBYTE dest_scan, |
| 295 FX_LPBYTE ori_scan, |
| 296 int Bpp, |
| 297 int span_left, |
| 298 int span_len, |
| 299 int span_top, |
| 300 FX_BYTE cover_scan, |
| 301 int clip_top, |
| 302 int clip_left, |
| 303 int clip_right, |
| 304 FX_LPBYTE clip_scan, |
| 305 FX_LPBYTE dest_extra_alpha_scan); |
| 306 |
| 307 void CompositeSpanARGB_7(FX_LPBYTE dest_scan, |
| 308 FX_LPBYTE ori_scan, |
| 309 int Bpp, |
| 310 int span_left, |
| 311 int span_len, |
| 312 int span_top, |
| 313 FX_BYTE cover_scan, |
| 314 int clip_top, |
| 315 int clip_left, |
| 316 int clip_right, |
| 317 FX_LPBYTE clip_scan, |
| 318 FX_LPBYTE dest_extra_alpha_scan); |
| 319 // ... |
| 320 /*----------------------------------------------------------------------------
----------------------------*/ |
| 321 void CompositeSpanRGB32_2(FX_LPBYTE dest_scan, |
| 322 FX_LPBYTE ori_scan, |
| 323 int Bpp, |
| 324 int span_left, |
| 325 int span_len, |
| 326 int span_top, |
| 327 FX_BYTE cover_scan, |
| 328 int clip_top, |
| 329 int clip_left, |
| 330 int clip_right, |
| 331 FX_LPBYTE clip_scan, |
| 332 FX_LPBYTE dest_extra_alpha_scan); |
| 333 void CompositeSpanRGB32_3(FX_LPBYTE dest_scan, |
| 334 FX_LPBYTE ori_scan, |
| 335 int Bpp, |
| 336 int span_left, |
| 337 int span_len, |
| 338 int span_top, |
| 339 FX_BYTE cover_scan, |
| 340 int clip_top, |
| 341 int clip_left, |
| 342 int clip_right, |
| 343 FX_LPBYTE clip_scan, |
| 344 FX_LPBYTE dest_extra_alpha_scan); |
| 345 void CompositeSpanRGB32_6(FX_LPBYTE dest_scan, |
| 346 FX_LPBYTE ori_scan, |
| 347 int Bpp, |
| 348 int span_left, |
| 349 int span_len, |
| 350 int span_top, |
| 351 FX_BYTE cover_scan, |
| 352 int clip_top, |
| 353 int clip_left, |
| 354 int clip_right, |
| 355 FX_LPBYTE clip_scan, |
| 356 FX_LPBYTE dest_extra_alpha_scan); |
| 357 void CompositeSpanRGB32_7(FX_LPBYTE dest_scan, |
| 358 FX_LPBYTE ori_scan, |
| 359 int Bpp, |
| 360 int span_left, |
| 361 int span_len, |
| 362 int span_top, |
| 363 FX_BYTE cover_scan, |
| 364 int clip_top, |
| 365 int clip_left, |
| 366 int clip_right, |
| 367 FX_LPBYTE clip_scan, |
| 368 FX_LPBYTE dest_extra_alpha_scan); |
| 369 |
| 370 /*----------------------------------------------------------------------------
-----------------------------*/ |
| 371 |
| 372 void CompositeSpanRGB24_2(FX_LPBYTE dest_scan, |
| 373 FX_LPBYTE ori_scan, |
| 374 int Bpp, |
| 375 int span_left, |
| 376 int span_len, |
| 377 int span_top, |
| 378 FX_BYTE cover_scan, |
| 379 int clip_top, |
| 380 int clip_left, |
| 381 int clip_right, |
| 382 FX_LPBYTE clip_scan, |
| 383 FX_LPBYTE dest_extra_alpha_scan); |
| 384 void CompositeSpanRGB24_3(FX_LPBYTE dest_scan, |
| 385 FX_LPBYTE ori_scan, |
| 386 int Bpp, |
| 387 int span_left, |
| 388 int span_len, |
| 389 int span_top, |
| 390 FX_BYTE cover_scan, |
| 391 int clip_top, |
| 392 int clip_left, |
| 393 int clip_right, |
| 394 FX_LPBYTE clip_scan, |
| 395 FX_LPBYTE dest_extra_alpha_scan); |
| 396 void CompositeSpanRGB24_6(FX_LPBYTE dest_scan, |
| 397 FX_LPBYTE ori_scan, |
| 398 int Bpp, |
| 399 int span_left, |
| 400 int span_len, |
| 401 int span_top, |
| 402 FX_BYTE cover_scan, |
| 403 int clip_top, |
| 404 int clip_left, |
| 405 int clip_right, |
| 406 FX_LPBYTE clip_scan, |
| 407 FX_LPBYTE dest_extra_alpha_scan); |
| 408 void CompositeSpanRGB24_7(FX_LPBYTE dest_scan, |
| 409 FX_LPBYTE ori_scan, |
| 410 int Bpp, |
| 411 int span_left, |
| 412 int span_len, |
| 413 int span_top, |
| 414 FX_BYTE cover_scan, |
| 415 int clip_top, |
| 416 int clip_left, |
| 417 int clip_right, |
| 418 FX_LPBYTE clip_scan, |
| 419 FX_LPBYTE dest_extra_alpha_scan); |
| 420 void CompositeSpanRGB24_10(FX_LPBYTE dest_scan, |
| 421 FX_LPBYTE ori_scan, |
| 422 int Bpp, |
| 423 int span_left, |
| 424 int span_len, |
| 425 int span_top, |
| 426 FX_BYTE cover_scan, |
| 427 int clip_top, |
| 428 int clip_left, |
| 429 int clip_right, |
| 430 FX_LPBYTE clip_scan, |
| 431 FX_LPBYTE dest_extra_alpha_scan); |
| 432 void CompositeSpanRGB24_11(FX_LPBYTE dest_scan, |
| 433 FX_LPBYTE ori_scan, |
| 434 int Bpp, |
| 435 int span_left, |
| 436 int span_len, |
| 437 int span_top, |
| 438 FX_BYTE cover_scan, |
| 439 int clip_top, |
| 440 int clip_left, |
| 441 int clip_right, |
| 442 FX_LPBYTE clip_scan, |
| 443 FX_LPBYTE dest_extra_alpha_scan); |
| 444 void CompositeSpanRGB24_14(FX_LPBYTE dest_scan, |
| 445 FX_LPBYTE ori_scan, |
| 446 int Bpp, |
| 447 int span_left, |
| 448 int span_len, |
| 449 int span_top, |
| 450 FX_BYTE cover_scan, |
| 451 int clip_top, |
| 452 int clip_left, |
| 453 int clip_right, |
| 454 FX_LPBYTE clip_scan, |
| 455 FX_LPBYTE dest_extra_alpha_scan); |
| 456 void CompositeSpanRGB24_15(FX_LPBYTE dest_scan, |
| 457 FX_LPBYTE ori_scan, |
| 458 int Bpp, |
| 459 int span_left, |
| 460 int span_len, |
| 461 int span_top, |
| 462 FX_BYTE cover_scan, |
| 463 int clip_top, |
| 464 int clip_left, |
| 465 int clip_right, |
| 466 FX_LPBYTE clip_scan, |
| 467 FX_LPBYTE dest_extra_alpha_scan); |
| 468 |
| 469 /*----------------------------------------------------------------------------
------------------------------*/ |
| 470 |
| 471 // A general alpha merge function (with clipping mask). Cmyka/Cmyk device. |
| 472 void CompositeSpanCMYK(FX_LPBYTE dest_scan, |
| 473 FX_LPBYTE ori_scan, |
| 474 int Bpp, |
| 475 int span_left, |
| 476 int span_len, |
| 477 int span_top, |
| 478 FX_BYTE cover_scan, |
| 479 int clip_top, |
| 480 int clip_left, |
| 481 int clip_right, |
| 482 FX_LPBYTE clip_scan, |
| 483 FX_LPBYTE dest_extra_alpha_scan); |
| 484 |
| 485 //-------------------------------------------------------------------- |
| 486 FX_BOOL Init(CFX_DIBitmap* pDevice, |
| 487 CFX_DIBitmap* pOriDevice, |
| 488 const CFX_ClipRgn* pClipRgn, |
| 489 FX_DWORD color, |
| 490 FX_BOOL bFullCover, |
| 491 FX_BOOL bRgbByteOrder, |
| 492 int alpha_flag = 0, |
| 493 void* pIccTransform = |
| 494 NULL); // The alpha flag must be fill_flag if exist. |
210 }; | 495 }; |
211 class CFX_SkiaA8Renderer : public SkBlitter, public CFX_Object | 496 class CFX_SkiaA8Renderer : public SkBlitter, public CFX_Object { |
212 { | 497 public: |
213 public: | 498 //-------------------------------------------------------------------- |
214 //-------------------------------------------------------------------- | 499 virtual void blitAntiH(int x, |
215 virtual void blitAntiH(int x, int y, const SkAlpha antialias[], const int16_
t runs[]); | 500 int y, |
216 » virtual void blitH(int x, int y, int width); | 501 const SkAlpha antialias[], |
217 » virtual void blitV(int x, int y, int height, SkAlpha alpha); | 502 const int16_t runs[]); |
218 » virtual void blitRect(int x, int y, int width, int height); | 503 virtual void blitH(int x, int y, int width); |
219 » virtual»void blitAntiRect(int x, int y, int width, int height, SkAlpha l
eftAlpha, SkAlpha rightAlpha); | 504 virtual void blitV(int x, int y, int height, SkAlpha alpha); |
220 » //-------------------------------------------------------------------- | 505 virtual void blitRect(int x, int y, int width, int height); |
221 » FX_BOOL Init(CFX_DIBitmap* pDevice, int Left, int Top); | 506 virtual void blitAntiRect(int x, |
222 » CFX_DIBitmap* m_pDevice; | 507 int y, |
223 » int m_Left; | 508 int width, |
224 » int m_Top; | 509 int height, |
225 » int m_dstWidth; | 510 SkAlpha leftAlpha, |
226 » int m_dstHeight; | 511 SkAlpha rightAlpha); |
| 512 //-------------------------------------------------------------------- |
| 513 FX_BOOL Init(CFX_DIBitmap* pDevice, int Left, int Top); |
| 514 CFX_DIBitmap* m_pDevice; |
| 515 int m_Left; |
| 516 int m_Top; |
| 517 int m_dstWidth; |
| 518 int m_dstHeight; |
227 }; | 519 }; |
228 #endif | 520 #endif |
229 #endif | 521 #endif |
OLD | NEW |