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 CORE_SRC_FXGE_SKIA_FX_SKIA_BLITTER_NEW_H_ | 5 #ifndef CORE_SRC_FXGE_SKIA_FX_SKIA_BLITTER_NEW_H_ |
6 #define CORE_SRC_FXGE_SKIA_FX_SKIA_BLITTER_NEW_H_ | 6 #define CORE_SRC_FXGE_SKIA_FX_SKIA_BLITTER_NEW_H_ |
7 | 7 |
8 #if defined(_SKIA_SUPPORT_) | 8 #if defined(_SKIA_SUPPORT_) |
9 class CFX_SkiaRenderer : public SkBlitter | 9 class CFX_SkiaRenderer : public SkBlitter |
10 { | 10 { |
11 protected: | 11 protected: |
12 int m_Alpha, | 12 int m_Alpha, |
13 m_Red, // Or the complementary-color, C
yan | 13 m_Red, // Or the complementary-color, C
yan |
14 m_Green, // Magenta | 14 m_Green, // Magenta |
15 m_Blue, // Yellow | 15 m_Blue, // Yellow |
16 m_Gray; // Black | 16 m_Gray; // Black |
17 FX_DWORD m_Color; // FX_ARGB or FX_CMYK | 17 FX_DWORD m_Color; // FX_ARGB or FX_CMYK |
18 » FX_BOOL»» m_bFullCover; | 18 » bool» » m_bFullCover; |
19 int m_ProcessFilter; | 19 int m_ProcessFilter; |
20 » FX_BOOL m_bRgbByteOrder; | 20 » bool m_bRgbByteOrder; |
21 | 21 |
22 FX_RECT m_ClipBox; | 22 FX_RECT m_ClipBox; |
23 CFX_DIBitmap* m_pDevice; | 23 CFX_DIBitmap* m_pDevice; |
24 CFX_DIBitmap* m_pOriDevice; | 24 CFX_DIBitmap* m_pOriDevice; |
25 const CFX_ClipRgn* m_pClipRgn; | 25 const CFX_ClipRgn* m_pClipRgn; |
26 const CFX_DIBitmap* m_pClipMask; | 26 const CFX_DIBitmap* m_pClipMask; |
27 | 27 |
28 uint8_t* m_pDestScan; | 28 uint8_t* m_pDestScan; |
29 uint8_t* m_pDestExtraAlphaScan; | 29 uint8_t* m_pDestExtraAlphaScan; |
30 uint8_t* m_pOriScan; | 30 uint8_t* m_pOriScan; |
(...skipping 167 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
198 /*----------------------------------------------------------------------
------------------------------------*/ | 198 /*----------------------------------------------------------------------
------------------------------------*/ |
199 | 199 |
200 // A general alpha merge function (with clipping mask). Cmyka/Cmyk devic
e. | 200 // A general alpha merge function (with clipping mask). Cmyka/Cmyk devic
e. |
201 void CompositeSpanCMYK(uint8_t* dest_scan, uint8_t* ori_scan,int Bpp, | 201 void CompositeSpanCMYK(uint8_t* dest_scan, uint8_t* ori_scan,int Bpp, |
202 int span_left, int span_len, int span_top, uint8_t cover
_scan, | 202 int span_left, int span_len, int span_top, uint8_t cover
_scan, |
203 int clip_top, int clip_left, int clip_right, uint8_t* cl
ip_scan, | 203 int clip_top, int clip_left, int clip_right, uint8_t* cl
ip_scan, |
204 uint8_t* dest_extra_alpha_scan); | 204 uint8_t* dest_extra_alpha_scan); |
205 | 205 |
206 | 206 |
207 //-------------------------------------------------------------------- | 207 //-------------------------------------------------------------------- |
208 » FX_BOOL Init(CFX_DIBitmap* pDevice, CFX_DIBitmap* pOriDevice, const CFX_
ClipRgn* pClipRgn, FX_DWORD color, FX_BOOL bFullCover, FX_BOOL bRgbByteOrder, | 208 » bool Init(CFX_DIBitmap* pDevice, CFX_DIBitmap* pOriDevice, const CFX_Cli
pRgn* pClipRgn, FX_DWORD color, bool bFullCover, bool bRgbByteOrder, |
209 int alpha_flag = 0, void* pIccTransform = NULL); //The alpha fla
g must be fill_flag if exist. | 209 int alpha_flag = 0, void* pIccTransform = NULL); //The alpha fla
g must be fill_flag if exist. |
210 }; | 210 }; |
211 class CFX_SkiaA8Renderer : public SkBlitter | 211 class CFX_SkiaA8Renderer : public SkBlitter |
212 { | 212 { |
213 public: | 213 public: |
214 //-------------------------------------------------------------------- | 214 //-------------------------------------------------------------------- |
215 virtual void blitAntiH(int x, int y, const SkAlpha antialias[], const int16_
t runs[]); | 215 virtual void blitAntiH(int x, int y, const SkAlpha antialias[], const int16_
t runs[]); |
216 virtual void blitH(int x, int y, int width); | 216 virtual void blitH(int x, int y, int width); |
217 virtual void blitV(int x, int y, int height, SkAlpha alpha); | 217 virtual void blitV(int x, int y, int height, SkAlpha alpha); |
218 virtual void blitRect(int x, int y, int width, int height); | 218 virtual void blitRect(int x, int y, int width, int height); |
219 virtual void blitAntiRect(int x, int y, int width, int height, SkAlpha l
eftAlpha, SkAlpha rightAlpha); | 219 virtual void blitAntiRect(int x, int y, int width, int height, SkAlpha l
eftAlpha, SkAlpha rightAlpha); |
220 //-------------------------------------------------------------------- | 220 //-------------------------------------------------------------------- |
221 » FX_BOOL Init(CFX_DIBitmap* pDevice, int Left, int Top); | 221 » bool Init(CFX_DIBitmap* pDevice, int Left, int Top); |
222 CFX_DIBitmap* m_pDevice; | 222 CFX_DIBitmap* m_pDevice; |
223 int m_Left; | 223 int m_Left; |
224 int m_Top; | 224 int m_Top; |
225 int m_dstWidth; | 225 int m_dstWidth; |
226 int m_dstHeight; | 226 int m_dstHeight; |
227 }; | 227 }; |
228 #endif | 228 #endif |
229 | 229 |
230 #endif // CORE_SRC_FXGE_SKIA_FX_SKIA_BLITTER_NEW_H_ | 230 #endif // CORE_SRC_FXGE_SKIA_FX_SKIA_BLITTER_NEW_H_ |
OLD | NEW |