diff options
author | Lei Zhang <thestig@chromium.org> | 2015-06-11 15:17:59 -0700 |
---|---|---|
committer | Lei Zhang <thestig@chromium.org> | 2015-06-11 15:17:59 -0700 |
commit | d9e1477c88692ac6eaf8bd20a573a2fdccb1ff41 (patch) | |
tree | 204bbb14d2962753b0f1431c9631e81298e5f454 /core/src/fxge/skia | |
parent | f25db681003f0247e97bfef22be56a8aa02b7595 (diff) | |
download | pdfium-d9e1477c88692ac6eaf8bd20a573a2fdccb1ff41.tar.xz |
Remove trailing whitespaces in core.
R=tsepez@chromium.org
Review URL: https://codereview.chromium.org/1177973008.
Diffstat (limited to 'core/src/fxge/skia')
-rw-r--r-- | core/src/fxge/skia/fx_skia_blitter_new.cpp | 230 | ||||
-rw-r--r-- | core/src/fxge/skia/fx_skia_blitter_new.h | 156 | ||||
-rw-r--r-- | core/src/fxge/skia/fx_skia_device.cpp | 74 | ||||
-rw-r--r-- | core/src/fxge/skia/fx_skia_device.h | 50 |
4 files changed, 255 insertions, 255 deletions
diff --git a/core/src/fxge/skia/fx_skia_blitter_new.cpp b/core/src/fxge/skia/fx_skia_blitter_new.cpp index e87092f90f..da9e6f28f1 100644 --- a/core/src/fxge/skia/fx_skia_blitter_new.cpp +++ b/core/src/fxge/skia/fx_skia_blitter_new.cpp @@ -18,7 +18,7 @@ { int width = runs[0]; SkASSERT(width >= 0); - if (width <= 0) + if (width <= 0) return; unsigned aa = antialias[0]; if (aa) @@ -63,7 +63,7 @@ } void CFX_SkiaRenderer::blitAntiRect(int x, int y, int width, int height, - SkAlpha leftAlpha, SkAlpha rightAlpha) + SkAlpha leftAlpha, SkAlpha rightAlpha) { blitV(x++, y, height, leftAlpha); if (width > 0) { @@ -74,8 +74,8 @@ } /*---------------------------------------------------------------------------------------------------*/ void CFX_SkiaRenderer::CompositeSpan1bpp_0(uint8_t* dest_scan, uint8_t* ori_scan,int Bpp, - int span_left, int span_len, int span_top, uint8_t cover_scan, - int clip_top, int clip_left, int clip_right, uint8_t* clip_scan, + int span_left, int span_len, int span_top, uint8_t cover_scan, + int clip_top, int clip_left, int clip_right, uint8_t* clip_scan, uint8_t* dest_extra_alpha_scan) { ASSERT(!m_bRgbByteOrder); @@ -87,13 +87,13 @@ dest_scan += col_start/8; int index = 0; - if (m_pDevice->GetPalette() == NULL) + if (m_pDevice->GetPalette() == NULL) index = ((uint8_t)m_Color == 0xff) ? 1 : 0; else { for (int i = 0; i < 2; i ++) - if (FXARGB_TODIB(m_pDevice->GetPalette()[i]) == m_Color) + if (FXARGB_TODIB(m_pDevice->GetPalette()[i]) == m_Color) index = i; - } + } uint8_t* dest_scan1 = dest_scan; int src_alpha = m_Alpha * cover_scan / 255; for (int col = col_start; col < col_end; col ++) { @@ -102,13 +102,13 @@ *dest_scan1 &= ~(1 << (7 - (col+span_left)%8)); else *dest_scan1|= 1 << (7 - (col+span_left)%8); - } + } dest_scan1 = dest_scan+(span_left%8+col-col_start+1)/8; } } void CFX_SkiaRenderer::CompositeSpan1bpp_4(uint8_t* dest_scan, uint8_t* ori_scan,int Bpp, - int span_left, int span_len, int span_top, uint8_t cover_scan, - int clip_top, int clip_left, int clip_right, uint8_t* clip_scan, + int span_left, int span_len, int span_top, uint8_t cover_scan, + int clip_top, int clip_left, int clip_right, uint8_t* clip_scan, uint8_t* dest_extra_alpha_scan) { ASSERT(!m_bRgbByteOrder); @@ -121,13 +121,13 @@ dest_scan += col_start/8; int index = 0; - if (m_pDevice->GetPalette() == NULL) + if (m_pDevice->GetPalette() == NULL) index = ((uint8_t)m_Color == 0xff) ? 1 : 0; else { for (int i = 0; i < 2; i ++) - if (FXARGB_TODIB(m_pDevice->GetPalette()[i]) == m_Color) + if (FXARGB_TODIB(m_pDevice->GetPalette()[i]) == m_Color) index = i; - } + } uint8_t* dest_scan1 = dest_scan; int src_alpha = m_Alpha * cover_scan / 255; for (int col = col_start; col < col_end; col ++) { @@ -137,14 +137,14 @@ *dest_scan1 &= ~(1 << (7 - (col+span_left)%8)); else *dest_scan1|= 1 << (7 - (col+span_left)%8); - } + } dest_scan1 = dest_scan+(span_left%8+col-col_start+1)/8; } } /*-----------------------------------------------------------------------------------------------------*/ void CFX_SkiaRenderer::CompositeSpanGray_2(uint8_t* dest_scan, uint8_t* ori_scan,int Bpp, - int span_left, int span_len, int span_top, uint8_t cover_scan, - int clip_top, int clip_left, int clip_right, uint8_t* clip_scan, + int span_left, int span_len, int span_top, uint8_t cover_scan, + int clip_top, int clip_left, int clip_right, uint8_t* clip_scan, uint8_t* dest_extra_alpha_scan) { ASSERT(!m_pDevice->IsCmykImage()); @@ -165,8 +165,8 @@ } } void CFX_SkiaRenderer::CompositeSpanGray_3(uint8_t* dest_scan, uint8_t* ori_scan,int Bpp, - int span_left, int span_len, int span_top, uint8_t cover_scan, - int clip_top, int clip_left, int clip_right, uint8_t* clip_scan, + int span_left, int span_len, int span_top, uint8_t cover_scan, + int clip_top, int clip_left, int clip_right, uint8_t* clip_scan, uint8_t* dest_extra_alpha_scan) { ASSERT(!m_pDevice->IsCmykImage()); @@ -208,8 +208,8 @@ } void CFX_SkiaRenderer::CompositeSpanGray_6(uint8_t* dest_scan, uint8_t* ori_scan,int Bpp, - int span_left, int span_len, int span_top, uint8_t cover_scan, - int clip_top, int clip_left, int clip_right, uint8_t* clip_scan, + int span_left, int span_len, int span_top, uint8_t cover_scan, + int clip_top, int clip_left, int clip_right, uint8_t* clip_scan, uint8_t* dest_extra_alpha_scan) { ASSERT(!m_bRgbByteOrder); @@ -232,12 +232,12 @@ *dest_scan = FXDIB_ALPHA_MERGE(*dest_scan, m_Gray, src_alpha1); dest_scan ++; } - } + } } void CFX_SkiaRenderer::CompositeSpanGray_7(uint8_t* dest_scan, uint8_t* ori_scan,int Bpp, - int span_left, int span_len, int span_top, uint8_t cover_scan, - int clip_top, int clip_left, int clip_right, uint8_t* clip_scan, + int span_left, int span_len, int span_top, uint8_t cover_scan, + int clip_top, int clip_left, int clip_right, uint8_t* clip_scan, uint8_t* dest_extra_alpha_scan) { ASSERT(!m_pDevice->IsCmykImage()); @@ -296,8 +296,8 @@ /*--------------------------------------------------------------------------------------------------*/ void CFX_SkiaRenderer::CompositeSpanARGB_2(uint8_t* dest_scan, uint8_t* ori_scan,int Bpp, - int span_left, int span_len, int span_top, uint8_t cover_scan, - int clip_top, int clip_left, int clip_right, uint8_t* clip_scan, + int span_left, int span_len, int span_top, uint8_t cover_scan, + int clip_top, int clip_left, int clip_right, uint8_t* clip_scan, uint8_t* dest_extra_alpha_scan) { dest_scan = (uint8_t*)m_pDevice->GetScanline(span_top) + (span_left<<2); @@ -317,7 +317,7 @@ return; } } - else + else #endif src_alpha = m_Alpha * cover_scan / 255; for (int col = col_start; col < col_end; col ++) { @@ -328,7 +328,7 @@ *dest_scan++ = m_Blue; *dest_scan++ = m_Green; *dest_scan = m_Red; - dest_scan += 2; + dest_scan += 2; continue; } uint8_t dest_alpha = dest_scan[3] + src_alpha - dest_scan[3] * src_alpha / 255; @@ -344,8 +344,8 @@ } void CFX_SkiaRenderer::CompositeSpanARGB_3(uint8_t* dest_scan, uint8_t* ori_scan,int Bpp, - int span_left, int span_len, int span_top, uint8_t cover_scan, - int clip_top, int clip_left, int clip_right, uint8_t* clip_scan, + int span_left, int span_len, int span_top, uint8_t cover_scan, + int clip_top, int clip_left, int clip_right, uint8_t* clip_scan, uint8_t* dest_extra_alpha_scan) { ASSERT(!m_pDevice->IsCmykImage()); @@ -360,7 +360,7 @@ if (m_Alpha == 255 && cover_scan == 255){ FXSYS_memset(dest_scan, m_Color, (col_end - col_start)<<2); return; - } + } if (cover_scan == 255) { int dst_color = (0x00ffffff&m_Color)|(m_Alpha<<24); FXSYS_memset(dest_scan, dst_color, (col_end - col_start)<<2); @@ -368,7 +368,7 @@ } // Do not need origin bitmap, because of merge in pure transparent background int src_alpha_covered = m_Alpha * cover_scan / 255; - for (int col = col_start; col < col_end; col ++) + for (int col = col_start; col < col_end; col ++) { // shortcut if (dest_scan[3] == 0) { @@ -376,7 +376,7 @@ *dest_scan ++ = m_Blue; *dest_scan ++ = m_Green; *dest_scan = m_Red; - dest_scan += 2; + dest_scan += 2; continue; } // We should do alpha transition and color transition @@ -393,8 +393,8 @@ } } void CFX_SkiaRenderer::CompositeSpanARGB_6(uint8_t* dest_scan, uint8_t* ori_scan,int Bpp, - int span_left, int span_len, int span_top, uint8_t cover_scan, - int clip_top, int clip_left, int clip_right, uint8_t* clip_scan, + int span_left, int span_len, int span_top, uint8_t cover_scan, + int clip_top, int clip_left, int clip_right, uint8_t* clip_scan, uint8_t* dest_extra_alpha_scan) { dest_scan = (uint8_t*)m_pDevice->GetScanline(span_top) + (span_left<<2); @@ -404,7 +404,7 @@ if (col_end < col_start) return; // do nothing. dest_scan += col_start << 2; #if 1 - int src_alpha = m_Alpha * cover_scan / 255; + int src_alpha = m_Alpha * cover_scan / 255; for (int col = col_start; col < col_end; col ++) { int src_alpha1 = src_alpha* clip_scan[col] / 255; if (!src_alpha1) { @@ -422,7 +422,7 @@ *dest_scan++ = m_Blue; *dest_scan++ = m_Green; *dest_scan = m_Red; - dest_scan += 2; + dest_scan += 2; continue; } uint8_t dest_alpha = dest_scan[3] + src_alpha1 - dest_scan[3] * src_alpha1 / 255; @@ -456,7 +456,7 @@ *dest_scan++ = m_Blue; *dest_scan++ = m_Green; *dest_scan = m_Red; - dest_scan += 2; + dest_scan += 2; continue; } uint8_t dest_alpha = dest_scan[3] + src_alpha - dest_scan[3] * src_alpha / 255; @@ -471,7 +471,7 @@ } } } else { - int src_alpha = m_Alpha * cover_scan / 255; + int src_alpha = m_Alpha * cover_scan / 255; for (int col = col_start; col < col_end; col ++) { int src_alpha1 = src_alpha* clip_scan[col] / 255; if (!src_alpha1) { @@ -489,7 +489,7 @@ *dest_scan++ = m_Blue; *dest_scan++ = m_Green; *dest_scan = m_Red; - dest_scan += 2; + dest_scan += 2; continue; } uint8_t dest_alpha = dest_scan[3] + src_alpha1 - dest_scan[3] * src_alpha1 / 255; @@ -508,8 +508,8 @@ } void CFX_SkiaRenderer::CompositeSpanARGB_7(uint8_t* dest_scan, uint8_t* ori_scan,int Bpp, - int span_left, int span_len, int span_top, uint8_t cover_scan, - int clip_top, int clip_left, int clip_right, uint8_t* clip_scan, + int span_left, int span_len, int span_top, uint8_t cover_scan, + int clip_top, int clip_left, int clip_right, uint8_t* clip_scan, uint8_t* dest_extra_alpha_scan) { ASSERT(!m_pDevice->IsCmykImage()); @@ -522,7 +522,7 @@ dest_scan += col_start << 2; //ori_scan += col_start << 2; // Do not need origin bitmap, because of merge in pure transparent background - for (int col = col_start; col < col_end; col ++) + for (int col = col_start; col < col_end; col ++) { int src_alpha = m_Alpha * clip_scan[col] / 255; int src_alpha_covered = src_alpha * cover_scan / 255; @@ -539,7 +539,7 @@ *dest_scan ++ = m_Blue; *dest_scan ++ = m_Green; *dest_scan = m_Red; - dest_scan += 2; + dest_scan += 2; continue; } // We should do alpha transition and color transition @@ -555,11 +555,11 @@ dest_scan += 2; } } - + /*-----------------------------------------------------------------------------------------------------------*/ void CFX_SkiaRenderer::CompositeSpanRGB32_2(uint8_t* dest_scan, uint8_t* ori_scan,int Bpp, - int span_left, int span_len, int span_top, uint8_t cover_scan, - int clip_top, int clip_left, int clip_right, uint8_t* clip_scan, + int span_left, int span_len, int span_top, uint8_t cover_scan, + int clip_top, int clip_left, int clip_right, uint8_t* clip_scan, uint8_t* dest_extra_alpha_scan) { dest_scan = (uint8_t*)m_pDevice->GetScanline(span_top) + (span_left<<2); @@ -575,7 +575,7 @@ #if 0 if (m_bFullCover) src_alpha = m_Alpha; - else + else #endif src_alpha = m_Alpha * cover_scan / 255; for (int col = col_start; col < col_end; col ++) { @@ -589,8 +589,8 @@ } } void CFX_SkiaRenderer::CompositeSpanRGB32_3(uint8_t* dest_scan, uint8_t* ori_scan,int Bpp, - int span_left, int span_len, int span_top, uint8_t cover_scan, - int clip_top, int clip_left, int clip_right, uint8_t* clip_scan, + int span_left, int span_len, int span_top, uint8_t cover_scan, + int clip_top, int clip_left, int clip_right, uint8_t* clip_scan, uint8_t* dest_extra_alpha_scan) { dest_scan = (uint8_t*)m_pDevice->GetScanline(span_top) + (span_left<<2); @@ -628,8 +628,8 @@ } } void CFX_SkiaRenderer::CompositeSpanRGB32_6(uint8_t* dest_scan, uint8_t* ori_scan,int Bpp, - int span_left, int span_len, int span_top, uint8_t cover_scan, - int clip_top, int clip_left, int clip_right, uint8_t* clip_scan, + int span_left, int span_len, int span_top, uint8_t cover_scan, + int clip_top, int clip_left, int clip_right, uint8_t* clip_scan, uint8_t* dest_extra_alpha_scan) { dest_scan = (uint8_t*)m_pDevice->GetScanline(span_top) + (span_left<<2); @@ -657,7 +657,7 @@ dest_scan ++; *dest_scan = FXDIB_ALPHA_MERGE(*dest_scan, m_Red, src_alpha1); dest_scan += 2; - } + } } #else if (m_bFullCover) { @@ -700,14 +700,14 @@ dest_scan ++; *dest_scan = FXDIB_ALPHA_MERGE(*dest_scan, m_Red, src_alpha1); dest_scan += 2; - } + } } - } + } #endif } void CFX_SkiaRenderer::CompositeSpanRGB32_7(uint8_t* dest_scan, uint8_t* ori_scan,int Bpp, - int span_left, int span_len, int span_top, uint8_t cover_scan, - int clip_top, int clip_left, int clip_right, uint8_t* clip_scan, + int span_left, int span_len, int span_top, uint8_t cover_scan, + int clip_top, int clip_left, int clip_right, uint8_t* clip_scan, uint8_t* dest_extra_alpha_scan) { ASSERT(!m_pDevice->IsCmykImage()); @@ -759,7 +759,7 @@ *dest_scan++ = FXDIB_ALPHA_MERGE(*ori_scan++, m_Green, src_alpha); *dest_scan = FXDIB_ALPHA_MERGE(*ori_scan, m_Red, src_alpha); dest_scan += 2; ori_scan += 2; - } + } } else { for (int col = col_start; col < col_end; col ++) { int src_alpha = m_Alpha * clip_scan[col] / 255; @@ -785,8 +785,8 @@ } /*-----------------------------------------------------------------------------------------------------*/ void CFX_SkiaRenderer::CompositeSpanRGB24_2(uint8_t* dest_scan, uint8_t* ori_scan,int Bpp, - int span_left, int span_len, int span_top, uint8_t cover_scan, - int clip_top, int clip_left, int clip_right, uint8_t* clip_scan, + int span_left, int span_len, int span_top, uint8_t cover_scan, + int clip_top, int clip_left, int clip_right, uint8_t* clip_scan, uint8_t* dest_extra_alpha_scan) { dest_scan = (uint8_t*)m_pDevice->GetScanline(span_top) + span_left + (span_left<<1); @@ -798,7 +798,7 @@ #if 0 if (m_bFullCover) src_alpha = m_Alpha; - else + else #endif src_alpha = m_Alpha * cover_scan / 255; if (src_alpha == 255) { @@ -819,8 +819,8 @@ } } void CFX_SkiaRenderer::CompositeSpanRGB24_3(uint8_t* dest_scan, uint8_t* ori_scan,int Bpp, - int span_left, int span_len, int span_top, uint8_t cover_scan, - int clip_top, int clip_left, int clip_right, uint8_t* clip_scan, + int span_left, int span_len, int span_top, uint8_t cover_scan, + int clip_top, int clip_left, int clip_right, uint8_t* clip_scan, uint8_t* dest_extra_alpha_scan) { ASSERT(!m_pDevice->IsCmykImage()); @@ -860,8 +860,8 @@ } } void CFX_SkiaRenderer::CompositeSpanRGB24_6(uint8_t* dest_scan, uint8_t* ori_scan,int Bpp, - int span_left, int span_len, int span_top, uint8_t cover_scan, - int clip_top, int clip_left, int clip_right, uint8_t* clip_scan, + int span_left, int span_len, int span_top, uint8_t cover_scan, + int clip_top, int clip_left, int clip_right, uint8_t* clip_scan, uint8_t* dest_extra_alpha_scan) { dest_scan = (uint8_t*)m_pDevice->GetScanline(span_top) + span_left+(span_left<<1); @@ -873,7 +873,7 @@ #if 1 int src_alpha = m_Alpha * cover_scan /255; for (int col = col_start; col < col_end; col ++) { - int src_alpha1 = src_alpha * clip_scan[col] / 255; + int src_alpha1 = src_alpha * clip_scan[col] / 255; if (!src_alpha1) { dest_scan += 3; continue; @@ -895,7 +895,7 @@ #else if (m_bFullCover) { for (int col = col_start; col < col_end; col ++) { - int src_alpha = m_Alpha * clip_scan[col] / 255; + int src_alpha = m_Alpha * clip_scan[col] / 255; if (!src_alpha) { dest_scan += 3; continue; @@ -917,7 +917,7 @@ } else { int src_alpha = m_Alpha * cover_scan /255; for (int col = col_start; col < col_end; col ++) { - int src_alpha1 = src_alpha * clip_scan[col] / 255; + int src_alpha1 = src_alpha * clip_scan[col] / 255; if (!src_alpha1) { dest_scan += 3; continue; @@ -940,8 +940,8 @@ #endif } void CFX_SkiaRenderer::CompositeSpanRGB24_7(uint8_t* dest_scan, uint8_t* ori_scan,int Bpp, - int span_left, int span_len, int span_top, uint8_t cover_scan, - int clip_top, int clip_left, int clip_right, uint8_t* clip_scan, + int span_left, int span_len, int span_top, uint8_t cover_scan, + int clip_top, int clip_left, int clip_right, uint8_t* clip_scan, uint8_t* dest_extra_alpha_scan) { ASSERT(!m_pDevice->IsCmykImage()); @@ -974,7 +974,7 @@ dest_scan ++; } #else - if (m_bFullCover) { + if (m_bFullCover) { for (int col = col_start; col < col_end; col ++) { int src_alpha = m_Alpha * clip_scan[col] / 255; if (!src_alpha){ @@ -1018,8 +1018,8 @@ #endif } void CFX_SkiaRenderer::CompositeSpanRGB24_10(uint8_t* dest_scan, uint8_t* ori_scan,int Bpp, - int span_left, int span_len, int span_top, uint8_t cover_scan, - int clip_top, int clip_left, int clip_right, uint8_t* clip_scan, + int span_left, int span_len, int span_top, uint8_t cover_scan, + int clip_top, int clip_left, int clip_right, uint8_t* clip_scan, uint8_t* dest_extra_alpha_scan) { dest_scan = (uint8_t*)m_pDevice->GetScanline(span_top) + span_left+(span_left<<1); @@ -1042,7 +1042,7 @@ for (int col = col_start; col < col_end; col ++) { // Dest format: Rgba // calculate destination alpha (it's union of source and dest alpha) - uint8_t dest_alpha = (*dest_extra_alpha_scan) + src_alpha - + uint8_t dest_alpha = (*dest_extra_alpha_scan) + src_alpha - (*dest_extra_alpha_scan) * src_alpha / 255; *dest_extra_alpha_scan++ = dest_alpha; int alpha_ratio = src_alpha*255/dest_alpha; @@ -1051,7 +1051,7 @@ *dest_scan = FXDIB_ALPHA_MERGE(*dest_scan, m_Green, alpha_ratio); dest_scan ++; *dest_scan = FXDIB_ALPHA_MERGE(*dest_scan, m_Red, alpha_ratio); - dest_scan ++; + dest_scan ++; } #else if (m_bFullCover) { @@ -1067,7 +1067,7 @@ for (int col = col_start; col < col_end; col ++) { // Dest format: Rgba // calculate destination alpha (it's union of source and dest alpha) - uint8_t dest_alpha = (*dest_extra_alpha_scan) + m_Alpha - + uint8_t dest_alpha = (*dest_extra_alpha_scan) + m_Alpha - (*dest_extra_alpha_scan) * m_Alpha / 255; *dest_extra_alpha_scan++ = dest_alpha; int alpha_ratio = m_Alpha*255/dest_alpha; @@ -1092,7 +1092,7 @@ for (int col = col_start; col < col_end; col ++) { // Dest format: Rgba // calculate destination alpha (it's union of source and dest alpha) - uint8_t dest_alpha = (*dest_extra_alpha_scan) + src_alpha - + uint8_t dest_alpha = (*dest_extra_alpha_scan) + src_alpha - (*dest_extra_alpha_scan) * src_alpha / 255; *dest_extra_alpha_scan++ = dest_alpha; int alpha_ratio = src_alpha*255/dest_alpha; @@ -1101,14 +1101,14 @@ *dest_scan = FXDIB_ALPHA_MERGE(*dest_scan, m_Green, alpha_ratio); dest_scan ++; *dest_scan = FXDIB_ALPHA_MERGE(*dest_scan, m_Red, alpha_ratio); - dest_scan ++; + dest_scan ++; } } #endif } void CFX_SkiaRenderer::CompositeSpanRGB24_14(uint8_t* dest_scan, uint8_t* ori_scan,int Bpp, - int span_left, int span_len, int span_top, uint8_t cover_scan, - int clip_top, int clip_left, int clip_right, uint8_t* clip_scan, + int span_left, int span_len, int span_top, uint8_t cover_scan, + int clip_top, int clip_left, int clip_right, uint8_t* clip_scan, uint8_t* dest_extra_alpha_scan) { dest_scan = (uint8_t*)m_pDevice->GetScanline(span_top) + span_left+(span_left<<1); @@ -1126,7 +1126,7 @@ dest_extra_alpha_scan++; dest_scan += 3; continue; - } + } if (src_alpha1 == 255) { *dest_scan++ = (uint8_t)m_Blue; *dest_scan++ = (uint8_t)m_Green; @@ -1135,7 +1135,7 @@ } else { // Dest format: Rgba // calculate destination alpha (it's union of source and dest alpha) - uint8_t dest_alpha = (*dest_extra_alpha_scan) + src_alpha1 - + uint8_t dest_alpha = (*dest_extra_alpha_scan) + src_alpha1 - (*dest_extra_alpha_scan) * src_alpha1 / 255; *dest_extra_alpha_scan++ = dest_alpha; int alpha_ratio = src_alpha1*255/dest_alpha; @@ -1164,7 +1164,7 @@ } else { // Dest format: Rgba // calculate destination alpha (it's union of source and dest alpha) - uint8_t dest_alpha = (*dest_extra_alpha_scan) + src_alpha - + uint8_t dest_alpha = (*dest_extra_alpha_scan) + src_alpha - (*dest_extra_alpha_scan) * src_alpha / 255; *dest_extra_alpha_scan++ = dest_alpha; int alpha_ratio = src_alpha*255/dest_alpha; @@ -1184,7 +1184,7 @@ dest_extra_alpha_scan++; dest_scan += 3; continue; - } + } if (src_alpha1 == 255) { *dest_scan++ = (uint8_t)m_Blue; *dest_scan++ = (uint8_t)m_Green; @@ -1193,7 +1193,7 @@ } else { // Dest format: Rgba // calculate destination alpha (it's union of source and dest alpha) - uint8_t dest_alpha = (*dest_extra_alpha_scan) + src_alpha1 - + uint8_t dest_alpha = (*dest_extra_alpha_scan) + src_alpha1 - (*dest_extra_alpha_scan) * src_alpha1 / 255; *dest_extra_alpha_scan++ = dest_alpha; int alpha_ratio = src_alpha1*255/dest_alpha; @@ -1212,8 +1212,8 @@ // A general alpha merge function (with clipping mask). Cmyka/Cmyk device. void CFX_SkiaRenderer::CompositeSpanCMYK(uint8_t* dest_scan, uint8_t* ori_scan,int Bpp, - int span_left, int span_len, int span_top, uint8_t cover_scan, - int clip_top, int clip_left, int clip_right, uint8_t* clip_scan, + int span_left, int span_len, int span_top, uint8_t cover_scan, + int clip_top, int clip_left, int clip_right, uint8_t* clip_scan, uint8_t* dest_extra_alpha_scan) { ASSERT(!m_bRgbByteOrder); @@ -1223,7 +1223,7 @@ if (col_end < col_start) return; // do nothing. dest_scan += col_start * 4; Bpp; // for avoid compile warning. - + if (dest_extra_alpha_scan) { // CMYKa for (int col = col_start; col < col_end; col ++) { @@ -1239,7 +1239,7 @@ else src_alpha = m_Alpha * cover_scan / 255; } - + if (src_alpha) { if (src_alpha == 255) { *(FX_CMYK*)dest_scan = m_Color; @@ -1247,7 +1247,7 @@ } else { // Dest format: Cmyka // calculate destination alpha (it's union of source and dest alpha) - uint8_t dest_alpha = (*dest_extra_alpha_scan) + src_alpha - + uint8_t dest_alpha = (*dest_extra_alpha_scan) + src_alpha - (*dest_extra_alpha_scan) * src_alpha / 255; *dest_extra_alpha_scan++ = dest_alpha; int alpha_ratio = src_alpha*255/dest_alpha; @@ -1273,7 +1273,7 @@ src_alpha = m_Alpha * cover_scan * clip_scan[col] / 255 / 255; else src_alpha = m_Alpha * cover_scan / 255; - + if (src_alpha) { if (src_alpha == 255) { *(FX_CMYK*)dest_scan = m_Color; @@ -1295,10 +1295,10 @@ } } - - + + //-------------------------------------------------------------------- - FX_BOOL CFX_SkiaRenderer::Init(CFX_DIBitmap* pDevice, CFX_DIBitmap* pOriDevice, const CFX_ClipRgn* pClipRgn, FX_DWORD color, FX_BOOL bFullCover, FX_BOOL bRgbByteOrder, + FX_BOOL CFX_SkiaRenderer::Init(CFX_DIBitmap* pDevice, CFX_DIBitmap* pOriDevice, const CFX_ClipRgn* pClipRgn, FX_DWORD color, FX_BOOL bFullCover, FX_BOOL bRgbByteOrder, int alpha_flag, void* pIccTransform) //The alpha flag must be fill_flag if exist. { m_pDevice = pDevice; @@ -1328,9 +1328,9 @@ if (m_pOriDevice) m_pOriScan = m_pOriDevice->GetBuffer(); m_pDestScan = m_pDevice->GetBuffer(); - + m_bFullCover = bFullCover; - + FX_BOOL bObjectCMYK = FXGETFLAG_COLORTYPE(alpha_flag); FX_BOOL bDeviceCMYK = pDevice->IsCmykImage(); @@ -1338,11 +1338,11 @@ ICodec_IccModule* pIccModule = NULL; // No lcms engine, we skip the transform - if (!CFX_GEModule::Get()->GetCodecModule() || !CFX_GEModule::Get()->GetCodecModule()->GetIccModule()) + if (!CFX_GEModule::Get()->GetCodecModule() || !CFX_GEModule::Get()->GetCodecModule()->GetIccModule()) pIccTransform = NULL; else pIccModule = CFX_GEModule::Get()->GetCodecModule()->GetIccModule(); - + if (m_pDevice->GetBPP() == 8) { // Gray(a) device ASSERT(!m_bRgbByteOrder); if (m_pDevice->IsAlphaMask()) { @@ -1358,7 +1358,7 @@ } else { if (bObjectCMYK) { uint8_t r, g, b; - AdobeCMYK_to_sRGB1(FXSYS_GetCValue(color), FXSYS_GetMValue(color), FXSYS_GetYValue(color), FXSYS_GetKValue(color), + AdobeCMYK_to_sRGB1(FXSYS_GetCValue(color), FXSYS_GetMValue(color), FXSYS_GetYValue(color), FXSYS_GetKValue(color), r, g, b); m_Gray = FXRGB2GRAY(r, g, b); } else { @@ -1371,7 +1371,7 @@ ASSERT(!m_bRgbByteOrder); //TODO... opt for cmyk composite_span = &CFX_SkiaRenderer::CompositeSpanCMYK; - if (bObjectCMYK) { + if (bObjectCMYK) { m_Color = FXCMYK_TODIB(color); if (pIccTransform) pIccModule->TranslateScanline(pIccTransform, (uint8_t*)&m_Color, (const uint8_t*)&m_Color, 1); @@ -1386,7 +1386,7 @@ m_Blue = ((uint8_t*)&m_Color)[2]; m_Gray = ((uint8_t*)&m_Color)[3]; return TRUE; - } else { + } else { if (pIccTransform) { color = bObjectCMYK ? FXCMYK_TODIB(color) : FXARGB_TODIB(color); pIccModule->TranslateScanline(pIccTransform, (uint8_t*)&m_Color, (const uint8_t*)&color, 1); @@ -1405,7 +1405,7 @@ } else { if (bObjectCMYK) { uint8_t r, g, b; - AdobeCMYK_to_sRGB1(FXSYS_GetCValue(color), FXSYS_GetMValue(color), FXSYS_GetYValue(color), FXSYS_GetKValue(color), + AdobeCMYK_to_sRGB1(FXSYS_GetCValue(color), FXSYS_GetMValue(color), FXSYS_GetYValue(color), FXSYS_GetKValue(color), r, g, b); m_Color = FXARGB_MAKE(m_Alpha, r, g, b); if (m_bRgbByteOrder){ @@ -1421,15 +1421,15 @@ ArgbDecode(color, m_Alpha, m_Blue, m_Green, m_Red); // }else { m_Color = FXARGB_TODIB(color); - ArgbDecode(color, m_Alpha, m_Red, m_Green, m_Blue); - } + ArgbDecode(color, m_Alpha, m_Red, m_Green, m_Blue); + } } - } + } } } // Get palette transparency selector m_ProcessFilter = (m_pOriDevice? 1 : 0) /* has Ori Device flag */ - + (m_pDevice->GetBPP() >= 8 ? 2 : 0) /* bpp flag */ + + (m_pDevice->GetBPP() >= 8 ? 2 : 0) /* bpp flag */ + (m_pClipMask? 4 : 0) /* has clip region flag */ + (m_pDevice->m_pAlphaMask? 8 : 0); /* has Alpha Mask chanel flag */ switch(m_ProcessFilter) { @@ -1452,7 +1452,7 @@ composite_span = &CFX_SkiaRenderer::CompositeSpanGray_3; else if (m_pDevice->GetBPP() == 24) composite_span = &CFX_SkiaRenderer::CompositeSpanRGB24_3; - else + else composite_span = m_pDevice->HasAlpha()?&CFX_SkiaRenderer::CompositeSpanARGB_3 : &CFX_SkiaRenderer::CompositeSpanRGB32_3; } break; @@ -1465,7 +1465,7 @@ composite_span = &CFX_SkiaRenderer::CompositeSpanGray_6; else if (m_pDevice->GetBPP() == 24) composite_span = &CFX_SkiaRenderer::CompositeSpanRGB24_6; - else + else composite_span = m_pDevice->HasAlpha()?&CFX_SkiaRenderer::CompositeSpanARGB_6 : &CFX_SkiaRenderer::CompositeSpanRGB32_6; } break; @@ -1475,7 +1475,7 @@ composite_span = &CFX_SkiaRenderer::CompositeSpanGray_7; else if (m_pDevice->GetBPP() == 24) composite_span = &CFX_SkiaRenderer::CompositeSpanRGB24_7; - else + else composite_span = m_pDevice->HasAlpha()?&CFX_SkiaRenderer::CompositeSpanARGB_7 : &CFX_SkiaRenderer::CompositeSpanRGB32_7; } break; @@ -1508,16 +1508,16 @@ int dst_y = y - m_Top; if (dst_y < 0 || dst_y >= m_pDevice->GetHeight()) return; - + uint8_t* dest_scan = m_pDevice->GetBuffer() + m_pDevice->GetPitch() * dst_y; uint8_t* dest_pos = dest_scan; while (1) { - if (x >= m_dstWidth) + if (x >= m_dstWidth) return; int width = runs[0]; SkASSERT(width >= 0); - if (width <= 0) + if (width <= 0) return; unsigned aa = antialias[0]; if (aa) { @@ -1531,8 +1531,8 @@ FXSYS_memset(dest_pos, FXARGB_MAKE(aa, aa, aa, aa),result); else FXSYS_memset(dest_pos,aa,result); - } - } + } + } runs += width; antialias += width; x += width; @@ -1544,7 +1544,7 @@ int dst_y = y - m_Top; if (dst_y < 0 || dst_y >= m_pDevice->GetHeight()) return; - if (x >= m_dstWidth) + if (x >= m_dstWidth) return; uint8_t* dest_scan = m_pDevice->GetBuffer() + m_pDevice->GetPitch() * dst_y; int col_start = x < m_Left ? 0 : x - m_Left; @@ -1586,7 +1586,7 @@ } void CFX_SkiaA8Renderer::blitAntiRect(int x, int y, int width, int height, - SkAlpha leftAlpha, SkAlpha rightAlpha) + SkAlpha leftAlpha, SkAlpha rightAlpha) { blitV(x++, y, height, leftAlpha); if (width > 0) { diff --git a/core/src/fxge/skia/fx_skia_blitter_new.h b/core/src/fxge/skia/fx_skia_blitter_new.h index 8372ca3355..e60c6398d2 100644 --- a/core/src/fxge/skia/fx_skia_blitter_new.h +++ b/core/src/fxge/skia/fx_skia_blitter_new.h @@ -9,7 +9,7 @@ class CFX_SkiaRenderer : public SkBlitter { protected: - int m_Alpha, + int m_Alpha, m_Red, // Or the complementary-color, Cyan m_Green, // Magenta m_Blue, // Yellow @@ -18,7 +18,7 @@ protected: FX_BOOL m_bFullCover; int m_ProcessFilter; FX_BOOL m_bRgbByteOrder; - + FX_RECT m_ClipBox; CFX_DIBitmap* m_pDevice; CFX_DIBitmap* m_pOriDevice; @@ -32,180 +32,180 @@ protected: void (CFX_SkiaRenderer::*composite_span)(uint8_t*,uint8_t*,int,int,int,int,uint8_t,int,int,int,uint8_t*,uint8_t*); public: - + //-------------------------------------------------------------------- virtual void blitAntiH(int x, int y, const SkAlpha antialias[], const int16_t runs[]); - virtual void blitH(int x, int y, int width); + virtual void blitH(int x, int y, int width); virtual void blitV(int x, int y, int height, SkAlpha alpha); virtual void blitRect(int x, int y, int width, int height); virtual void blitAntiRect(int x, int y, int width, int height, SkAlpha leftAlpha, SkAlpha rightAlpha); - + /*------------------------------------------------------------------------------------------------------*/ // A general alpha merge function (with clipping mask). Gray device. void CompositeSpan1bpp_0(uint8_t* dest_scan, uint8_t* ori_scan,int Bpp, - int span_left, int span_len, int span_top, uint8_t cover_scan, - int clip_top, int clip_left, int clip_right, uint8_t* clip_scan, + int span_left, int span_len, int span_top, uint8_t cover_scan, + int clip_top, int clip_left, int clip_right, uint8_t* clip_scan, uint8_t* dest_extra_alpha_scan); void CompositeSpan1bpp_1(uint8_t* dest_scan, uint8_t* ori_scan,int Bpp, - int span_left, int span_len, int span_top, uint8_t cover_scan, - int clip_top, int clip_left, int clip_right, uint8_t* clip_scan, + int span_left, int span_len, int span_top, uint8_t cover_scan, + int clip_top, int clip_left, int clip_right, uint8_t* clip_scan, uint8_t* dest_extra_alpha_scan); void CompositeSpan1bpp_4(uint8_t* dest_scan, uint8_t* ori_scan,int Bpp, - int span_left, int span_len, int span_top, uint8_t cover_scan, - int clip_top, int clip_left, int clip_right, uint8_t* clip_scan, + int span_left, int span_len, int span_top, uint8_t cover_scan, + int clip_top, int clip_left, int clip_right, uint8_t* clip_scan, uint8_t* dest_extra_alpha_scan); void CompositeSpan1bpp_5(uint8_t* dest_scan, uint8_t* ori_scan,int Bpp, - int span_left, int span_len, int span_top, uint8_t cover_scan, - int clip_top, int clip_left, int clip_right, uint8_t* clip_scan, + int span_left, int span_len, int span_top, uint8_t cover_scan, + int clip_top, int clip_left, int clip_right, uint8_t* clip_scan, uint8_t* dest_extra_alpha_scan); void CompositeSpan1bpp_8(uint8_t* dest_scan, uint8_t* ori_scan,int Bpp, - int span_left, int span_len, int span_top, uint8_t cover_scan, - int clip_top, int clip_left, int clip_right, uint8_t* clip_scan, + int span_left, int span_len, int span_top, uint8_t cover_scan, + int clip_top, int clip_left, int clip_right, uint8_t* clip_scan, uint8_t* dest_extra_alpha_scan); void CompositeSpan1bpp_9(uint8_t* dest_scan, uint8_t* ori_scan,int Bpp, - int span_left, int span_len, int span_top, uint8_t cover_scan, - int clip_top, int clip_left, int clip_right, uint8_t* clip_scan, + int span_left, int span_len, int span_top, uint8_t cover_scan, + int clip_top, int clip_left, int clip_right, uint8_t* clip_scan, uint8_t* dest_extra_alpha_scan); void CompositeSpan1bpp_12(uint8_t* dest_scan, uint8_t* ori_scan,int Bpp, - int span_left, int span_len, int span_top, uint8_t cover_scan, - int clip_top, int clip_left, int clip_right, uint8_t* clip_scan, + int span_left, int span_len, int span_top, uint8_t cover_scan, + int clip_top, int clip_left, int clip_right, uint8_t* clip_scan, uint8_t* dest_extra_alpha_scan); void CompositeSpan1bpp_13(uint8_t* dest_scan, uint8_t* ori_scan,int Bpp, - int span_left, int span_len, int span_top, uint8_t cover_scan, - int clip_top, int clip_left, int clip_right, uint8_t* clip_scan, + int span_left, int span_len, int span_top, uint8_t cover_scan, + int clip_top, int clip_left, int clip_right, uint8_t* clip_scan, uint8_t* dest_extra_alpha_scan); /*--------------------------------------------------------------------------------------------------------*/ - + // A general alpha merge function (with clipping mask). Gray device. void CompositeSpanGray_2(uint8_t* dest_scan, uint8_t* ori_scan,int Bpp, - int span_left, int span_len, int span_top, uint8_t cover_scan, - int clip_top, int clip_left, int clip_right, uint8_t* clip_scan, + int span_left, int span_len, int span_top, uint8_t cover_scan, + int clip_top, int clip_left, int clip_right, uint8_t* clip_scan, uint8_t* dest_extra_alpha_scan); void CompositeSpanGray_3(uint8_t* dest_scan, uint8_t* ori_scan,int Bpp, - int span_left, int span_len, int span_top, uint8_t cover_scan, - int clip_top, int clip_left, int clip_right, uint8_t* clip_scan, + int span_left, int span_len, int span_top, uint8_t cover_scan, + int clip_top, int clip_left, int clip_right, uint8_t* clip_scan, uint8_t* dest_extra_alpha_scan); void CompositeSpanGray_6(uint8_t* dest_scan, uint8_t* ori_scan,int Bpp, - int span_left, int span_len, int span_top, uint8_t cover_scan, - int clip_top, int clip_left, int clip_right, uint8_t* clip_scan, + int span_left, int span_len, int span_top, uint8_t cover_scan, + int clip_top, int clip_left, int clip_right, uint8_t* clip_scan, uint8_t* dest_extra_alpha_scan); void CompositeSpanGray_7(uint8_t* dest_scan, uint8_t* ori_scan,int Bpp, - int span_left, int span_len, int span_top, uint8_t cover_scan, - int clip_top, int clip_left, int clip_right, uint8_t* clip_scan, + int span_left, int span_len, int span_top, uint8_t cover_scan, + int clip_top, int clip_left, int clip_right, uint8_t* clip_scan, uint8_t* dest_extra_alpha_scan); void CompositeSpanGray_10(uint8_t* dest_scan, uint8_t* ori_scan,int Bpp, - int span_left, int span_len, int span_top, uint8_t cover_scan, - int clip_top, int clip_left, int clip_right, uint8_t* clip_scan, + int span_left, int span_len, int span_top, uint8_t cover_scan, + int clip_top, int clip_left, int clip_right, uint8_t* clip_scan, uint8_t* dest_extra_alpha_scan); void CompositeSpanGray_11(uint8_t* dest_scan, uint8_t* ori_scan,int Bpp, - int span_left, int span_len, int span_top, uint8_t cover_scan, - int clip_top, int clip_left, int clip_right, uint8_t* clip_scan, + int span_left, int span_len, int span_top, uint8_t cover_scan, + int clip_top, int clip_left, int clip_right, uint8_t* clip_scan, uint8_t* dest_extra_alpha_scan); void CompositeSpanGray_14(uint8_t* dest_scan, uint8_t* ori_scan,int Bpp, - int span_left, int span_len, int span_top, uint8_t cover_scan, - int clip_top, int clip_left, int clip_right, uint8_t* clip_scan, + int span_left, int span_len, int span_top, uint8_t cover_scan, + int clip_top, int clip_left, int clip_right, uint8_t* clip_scan, uint8_t* dest_extra_alpha_scan); void CompositeSpanGray_15(uint8_t* dest_scan, uint8_t* ori_scan,int Bpp, - int span_left, int span_len, int span_top, uint8_t cover_scan, - int clip_top, int clip_left, int clip_right, uint8_t* clip_scan, + int span_left, int span_len, int span_top, uint8_t cover_scan, + int clip_top, int clip_left, int clip_right, uint8_t* clip_scan, uint8_t* dest_extra_alpha_scan); /*--------------------------------------------------------------------------------------------------------*/ void CompositeSpanARGB_2(uint8_t* dest_scan, uint8_t* ori_scan,int Bpp, - int span_left, int span_len, int span_top, uint8_t cover_scan, - int clip_top, int clip_left, int clip_right, uint8_t* clip_scan, + int span_left, int span_len, int span_top, uint8_t cover_scan, + int clip_top, int clip_left, int clip_right, uint8_t* clip_scan, uint8_t* dest_extra_alpha_scan); void CompositeSpanARGB_3(uint8_t* dest_scan, uint8_t* ori_scan,int Bpp, - int span_left, int span_len, int span_top, uint8_t cover_scan, - int clip_top, int clip_left, int clip_right, uint8_t* clip_scan, + int span_left, int span_len, int span_top, uint8_t cover_scan, + int clip_top, int clip_left, int clip_right, uint8_t* clip_scan, uint8_t* dest_extra_alpha_scan); void CompositeSpanARGB_6(uint8_t* dest_scan, uint8_t* ori_scan,int Bpp, - int span_left, int span_len, int span_top, uint8_t cover_scan, - int clip_top, int clip_left, int clip_right, uint8_t* clip_scan, + int span_left, int span_len, int span_top, uint8_t cover_scan, + int clip_top, int clip_left, int clip_right, uint8_t* clip_scan, uint8_t* dest_extra_alpha_scan); void CompositeSpanARGB_7(uint8_t* dest_scan, uint8_t* ori_scan,int Bpp, - int span_left, int span_len, int span_top, uint8_t cover_scan, - int clip_top, int clip_left, int clip_right, uint8_t* clip_scan, + int span_left, int span_len, int span_top, uint8_t cover_scan, + int clip_top, int clip_left, int clip_right, uint8_t* clip_scan, uint8_t* dest_extra_alpha_scan); // ... /*--------------------------------------------------------------------------------------------------------*/ void CompositeSpanRGB32_2(uint8_t* dest_scan, uint8_t* ori_scan,int Bpp, - int span_left, int span_len, int span_top, uint8_t cover_scan, - int clip_top, int clip_left, int clip_right, uint8_t* clip_scan, + int span_left, int span_len, int span_top, uint8_t cover_scan, + int clip_top, int clip_left, int clip_right, uint8_t* clip_scan, uint8_t* dest_extra_alpha_scan); void CompositeSpanRGB32_3(uint8_t* dest_scan, uint8_t* ori_scan,int Bpp, - int span_left, int span_len, int span_top, uint8_t cover_scan, - int clip_top, int clip_left, int clip_right, uint8_t* clip_scan, + int span_left, int span_len, int span_top, uint8_t cover_scan, + int clip_top, int clip_left, int clip_right, uint8_t* clip_scan, uint8_t* dest_extra_alpha_scan); void CompositeSpanRGB32_6(uint8_t* dest_scan, uint8_t* ori_scan,int Bpp, - int span_left, int span_len, int span_top, uint8_t cover_scan, - int clip_top, int clip_left, int clip_right, uint8_t* clip_scan, + int span_left, int span_len, int span_top, uint8_t cover_scan, + int clip_top, int clip_left, int clip_right, uint8_t* clip_scan, uint8_t* dest_extra_alpha_scan); void CompositeSpanRGB32_7(uint8_t* dest_scan, uint8_t* ori_scan,int Bpp, - int span_left, int span_len, int span_top, uint8_t cover_scan, - int clip_top, int clip_left, int clip_right, uint8_t* clip_scan, + int span_left, int span_len, int span_top, uint8_t cover_scan, + int clip_top, int clip_left, int clip_right, uint8_t* clip_scan, uint8_t* dest_extra_alpha_scan); - + /*---------------------------------------------------------------------------------------------------------*/ void CompositeSpanRGB24_2(uint8_t* dest_scan, uint8_t* ori_scan,int Bpp, - int span_left, int span_len, int span_top, uint8_t cover_scan, - int clip_top, int clip_left, int clip_right, uint8_t* clip_scan, + int span_left, int span_len, int span_top, uint8_t cover_scan, + int clip_top, int clip_left, int clip_right, uint8_t* clip_scan, uint8_t* dest_extra_alpha_scan); void CompositeSpanRGB24_3(uint8_t* dest_scan, uint8_t* ori_scan,int Bpp, - int span_left, int span_len, int span_top, uint8_t cover_scan, - int clip_top, int clip_left, int clip_right, uint8_t* clip_scan, + int span_left, int span_len, int span_top, uint8_t cover_scan, + int clip_top, int clip_left, int clip_right, uint8_t* clip_scan, uint8_t* dest_extra_alpha_scan); void CompositeSpanRGB24_6(uint8_t* dest_scan, uint8_t* ori_scan,int Bpp, - int span_left, int span_len, int span_top, uint8_t cover_scan, - int clip_top, int clip_left, int clip_right, uint8_t* clip_scan, + int span_left, int span_len, int span_top, uint8_t cover_scan, + int clip_top, int clip_left, int clip_right, uint8_t* clip_scan, uint8_t* dest_extra_alpha_scan); void CompositeSpanRGB24_7(uint8_t* dest_scan, uint8_t* ori_scan,int Bpp, - int span_left, int span_len, int span_top, uint8_t cover_scan, - int clip_top, int clip_left, int clip_right, uint8_t* clip_scan, + int span_left, int span_len, int span_top, uint8_t cover_scan, + int clip_top, int clip_left, int clip_right, uint8_t* clip_scan, uint8_t* dest_extra_alpha_scan); void CompositeSpanRGB24_10(uint8_t* dest_scan, uint8_t* ori_scan,int Bpp, - int span_left, int span_len, int span_top, uint8_t cover_scan, - int clip_top, int clip_left, int clip_right, uint8_t* clip_scan, + int span_left, int span_len, int span_top, uint8_t cover_scan, + int clip_top, int clip_left, int clip_right, uint8_t* clip_scan, uint8_t* dest_extra_alpha_scan); void CompositeSpanRGB24_11(uint8_t* dest_scan, uint8_t* ori_scan,int Bpp, - int span_left, int span_len, int span_top, uint8_t cover_scan, - int clip_top, int clip_left, int clip_right, uint8_t* clip_scan, + int span_left, int span_len, int span_top, uint8_t cover_scan, + int clip_top, int clip_left, int clip_right, uint8_t* clip_scan, uint8_t* dest_extra_alpha_scan); void CompositeSpanRGB24_14(uint8_t* dest_scan, uint8_t* ori_scan,int Bpp, - int span_left, int span_len, int span_top, uint8_t cover_scan, - int clip_top, int clip_left, int clip_right, uint8_t* clip_scan, + int span_left, int span_len, int span_top, uint8_t cover_scan, + int clip_top, int clip_left, int clip_right, uint8_t* clip_scan, uint8_t* dest_extra_alpha_scan); void CompositeSpanRGB24_15(uint8_t* dest_scan, uint8_t* ori_scan,int Bpp, - int span_left, int span_len, int span_top, uint8_t cover_scan, - int clip_top, int clip_left, int clip_right, uint8_t* clip_scan, + int span_left, int span_len, int span_top, uint8_t cover_scan, + int clip_top, int clip_left, int clip_right, uint8_t* clip_scan, uint8_t* dest_extra_alpha_scan); /*----------------------------------------------------------------------------------------------------------*/ - + // A general alpha merge function (with clipping mask). Cmyka/Cmyk device. void CompositeSpanCMYK(uint8_t* dest_scan, uint8_t* ori_scan,int Bpp, - int span_left, int span_len, int span_top, uint8_t cover_scan, - int clip_top, int clip_left, int clip_right, uint8_t* clip_scan, + int span_left, int span_len, int span_top, uint8_t cover_scan, + int clip_top, int clip_left, int clip_right, uint8_t* clip_scan, uint8_t* dest_extra_alpha_scan); - - + + //-------------------------------------------------------------------- - FX_BOOL Init(CFX_DIBitmap* pDevice, CFX_DIBitmap* pOriDevice, const CFX_ClipRgn* pClipRgn, FX_DWORD color, FX_BOOL bFullCover, FX_BOOL bRgbByteOrder, + FX_BOOL Init(CFX_DIBitmap* pDevice, CFX_DIBitmap* pOriDevice, const CFX_ClipRgn* pClipRgn, FX_DWORD color, FX_BOOL bFullCover, FX_BOOL bRgbByteOrder, int alpha_flag = 0, void* pIccTransform = NULL); //The alpha flag must be fill_flag if exist. }; class CFX_SkiaA8Renderer : public SkBlitter @@ -213,7 +213,7 @@ class CFX_SkiaA8Renderer : public SkBlitter public: //-------------------------------------------------------------------- virtual void blitAntiH(int x, int y, const SkAlpha antialias[], const int16_t runs[]); - virtual void blitH(int x, int y, int width); + virtual void blitH(int x, int y, int width); virtual void blitV(int x, int y, int height, SkAlpha alpha); virtual void blitRect(int x, int y, int width, int height); virtual void blitAntiRect(int x, int y, int width, int height, SkAlpha leftAlpha, SkAlpha rightAlpha); diff --git a/core/src/fxge/skia/fx_skia_device.cpp b/core/src/fxge/skia/fx_skia_device.cpp index a11b92526c..381242686a 100644 --- a/core/src/fxge/skia/fx_skia_device.cpp +++ b/core/src/fxge/skia/fx_skia_device.cpp @@ -66,7 +66,7 @@ FX_BOOL FxSkDrawTreatAsHairline(const SkPaint& paint, SkScalar* coverage) { return FALSE; } -void SuperBlitter_skia::DrawPath(const SkPath& srcPath, SkBlitter* blitter, const SkRasterClip& rect, const SkPaint& origPaint) +void SuperBlitter_skia::DrawPath(const SkPath& srcPath, SkBlitter* blitter, const SkRasterClip& rect, const SkPaint& origPaint) { SkPath* pathPtr = (SkPath*)&srcPath; bool doFill = true; @@ -117,7 +117,7 @@ void SuperBlitter_skia::DrawPath(const SkPath& srcPath, SkBlitter* blitter, cons proc(*devPathPtr, rect, blitter); } -class CSkia_PathData +class CSkia_PathData { public: CSkia_PathData() {} @@ -144,9 +144,9 @@ void CSkia_PathData::BuildPath(const CFX_PathData* pPathData, const CFX_AffineMa // PDF line includes the destination point, unlike Windows line. // We received some PDF which actually draws zero length lines. TESTDOC: summer cha show.pdf // Therefore, we have to extend the line by 0.4 pixel here. - // But only for standalone segment. TESTDOC: bug #1434 - maze.pdf; TESTDOC: bug#1508 di704P_QIG_111.pdf + // But only for standalone segment. TESTDOC: bug #1434 - maze.pdf; TESTDOC: bug#1508 di704P_QIG_111.pdf x += 0.4; - // TODO: we should actually tell skia vertex generator to process zero length stroked line + // TODO: we should actually tell skia vertex generator to process zero length stroked line // (only butts are drawn) m_PathData.lineTo(x, y); } else if (point_type == FXPT_BEZIERTO) { @@ -164,9 +164,9 @@ void CSkia_PathData::BuildPath(const CFX_PathData* pPathData, const CFX_AffineMa } // convert a stroking path to scanlines -static void SkRasterizeStroke(SkPaint& spaint, SkPath* dstPathData, SkPath& path_data, +static void SkRasterizeStroke(SkPaint& spaint, SkPath* dstPathData, SkPath& path_data, const CFX_AffineMatrix* pObject2Device, - const CFX_GraphStateData* pGraphState, FX_FIXFLOAT scale = FIX8_ONE, + const CFX_GraphStateData* pGraphState, FX_FIXFLOAT scale = FIX8_ONE, FX_BOOL bStrokeAdjust = FALSE, FX_BOOL bTextMode = FALSE) { SkPaint::Cap cap; @@ -205,7 +205,7 @@ static void SkRasterizeStroke(SkPaint& spaint, SkPath* dstPathData, SkPath& path stroker.setWidth(width); stroker.setDoFill(FALSE); stroker.strokePath(path_data, dstPathData); - SkMatrix smatrix; + SkMatrix smatrix; smatrix.setAll(pObject2Device->a, pObject2Device->c, pObject2Device->e, pObject2Device->b, pObject2Device->d, pObject2Device->f, 0, 0, 1); dstPathData->transform(smatrix); } else { @@ -217,7 +217,7 @@ static void SkRasterizeStroke(SkPaint& spaint, SkPath* dstPathData, SkPath& path if (on <= 0.000001f) on = FIX8_ONE/10; FX_FIXFLOAT off = i*2+1 == pGraphState->m_DashCount ? on : pGraphState->m_DashArray[i*2+1]; - if (off < 0) off = 0; + if (off < 0) off = 0; intervals[i*2]=on*scale; intervals[i*2+1]=off*scale; } @@ -228,7 +228,7 @@ static void SkRasterizeStroke(SkPaint& spaint, SkPath* dstPathData, SkPath& path spaint.setStrokeCap(cap); spaint.setStrokeJoin(join); spaint.getFillPath(path_data, dstPathData); - SkMatrix smatrix; + SkMatrix smatrix; smatrix.setAll(pObject2Device->a, pObject2Device->c, pObject2Device->e, pObject2Device->b, pObject2Device->d, pObject2Device->f, 0, 0, 1); dstPathData->transform(smatrix); FX_Free(intervals); @@ -244,10 +244,10 @@ CFX_SkiaDeviceDriver::~CFX_SkiaDeviceDriver() if (m_pAggDriver) delete m_pAggDriver; } FX_BOOL CFX_SkiaDeviceDriver::DrawDeviceText(int nChars, const FXTEXT_CHARPOS* pCharPos, CFX_Font* pFont, - CFX_FontCache* pCache, const CFX_AffineMatrix* pObject2Device, FX_FIXFLOAT font_size, FX_DWORD color, + CFX_FontCache* pCache, const CFX_AffineMatrix* pObject2Device, FX_FIXFLOAT font_size, FX_DWORD color, int alpha_flag, void* pIccTransform) { - return m_pAggDriver->DrawDeviceText(nChars, pCharPos, pFont,pCache, pObject2Device, font_size, color, + return m_pAggDriver->DrawDeviceText(nChars, pCharPos, pFont,pCache, pObject2Device, font_size, color, alpha_flag, pIccTransform); } int CFX_SkiaDeviceDriver::GetDeviceCaps(int caps_id) @@ -256,7 +256,7 @@ int CFX_SkiaDeviceDriver::GetDeviceCaps(int caps_id) } void CFX_SkiaDeviceDriver::SaveState() { - m_pAggDriver->SaveState(); + m_pAggDriver->SaveState(); } void CFX_SkiaDeviceDriver::RestoreState(FX_BOOL bKeepSaved) @@ -268,7 +268,7 @@ void CFX_SkiaDeviceDriver::SetClipMask(rasterizer_scanline_aa& rasterizer) m_pAggDriver->SetClipMask(rasterizer); } void CFX_SkiaDeviceDriver::SetClipMask(SkPath& skPath, SkPaint* spaint) -{ +{ SkIRect clip_box; clip_box.set(0, 0, fix0_to_8(GetDeviceCaps(FXDC_PIXEL_WIDTH)), fix0_to_8(GetDeviceCaps(FXDC_PIXEL_HEIGHT))); clip_box.intersect(m_pAggDriver->m_pClipRgn->GetBox().left, m_pAggDriver->m_pClipRgn->GetBox().top, @@ -289,7 +289,7 @@ void CFX_SkiaDeviceDriver::SetClipMask(SkPath& skPath, SkPaint* spaint) SkRasterClip rasterClip(clip_box); SuperBlitter_skia::DrawPath(skPath, (SkBlitter*)&render, rasterClip, *spaint); - + // Finally, we have got the mask that we need, intersect with current clip region m_pAggDriver->m_pClipRgn->IntersectMaskF(clip_box.fLeft, clip_box.fTop, mask); @@ -348,7 +348,7 @@ FX_BOOL CFX_SkiaDeviceDriver::SetClip_PathStroke(const CFX_PathData* pPathData, SkRasterizeStroke(spaint, &dst_path, path_data.m_PathData, pObject2Device, pGraphState, 1, FALSE, 0); spaint.setStyle(SkPaint::kFill_Style); SetClipMask(dst_path, &spaint); - + return TRUE; } FX_BOOL CFX_SkiaDeviceDriver::RenderRasterizer(rasterizer_scanline_aa& rasterizer, FX_DWORD color, FX_BOOL bFullCover, FX_BOOL bGroupKnockout, @@ -356,19 +356,19 @@ FX_BOOL CFX_SkiaDeviceDriver::RenderRasterizer(rasterizer_scanline_aa& rasterize { return m_pAggDriver->RenderRasterizer(rasterizer, color, bFullCover, bGroupKnockout,alpha_flag, pIccTransform); } -FX_BOOL CFX_SkiaDeviceDriver::RenderRasterizerSkia(SkPath& skPath, const SkPaint& origPaint, SkIRect& rect, FX_DWORD color, FX_BOOL bFullCover, FX_BOOL bGroupKnockout, +FX_BOOL CFX_SkiaDeviceDriver::RenderRasterizerSkia(SkPath& skPath, const SkPaint& origPaint, SkIRect& rect, FX_DWORD color, FX_BOOL bFullCover, FX_BOOL bGroupKnockout, int alpha_flag, void* pIccTransform, FX_BOOL bFill) { CFX_DIBitmap* pt = bGroupKnockout?m_pAggDriver->GetBackDrop():NULL; CFX_SkiaRenderer render; if (!render.Init(m_pAggDriver->m_pBitmap, pt, m_pAggDriver->m_pClipRgn, color, bFullCover, m_pAggDriver->m_bRgbByteOrder, alpha_flag, pIccTransform)) return FALSE; - + SkRasterClip rasterClip(rect); SuperBlitter_skia::DrawPath(skPath, (SkBlitter*)&render, rasterClip, origPaint); return TRUE; - + } FX_BOOL CFX_SkiaDeviceDriver::DrawPath(const CFX_PathData* pPathData, // path info @@ -377,7 +377,7 @@ FX_BOOL CFX_SkiaDeviceDriver::DrawPath(const CFX_PathData* pPathData, // path in FX_DWORD fill_color, // fill color FX_DWORD stroke_color, // stroke color int fill_mode, // fill mode, WINDING or ALTERNATE. 0 for not filled - int alpha_flag, + int alpha_flag, void* pIccTransform ) { @@ -388,7 +388,7 @@ FX_BOOL CFX_SkiaDeviceDriver::DrawPath(const CFX_PathData* pPathData, // path in if ((fill_mode & 3) && fill_color) { // We have to transform before building path data, otherwise we'll have flatting problem // when we enlarge a small path (flatten before transformed) - // TESTDOC: Bug #5115 - DS_S1Dimpact_lr.pdf + // TESTDOC: Bug #5115 - DS_S1Dimpact_lr.pdf // build path data CSkia_PathData path_data; path_data.BuildPath(pPathData, pObject2Device); @@ -400,7 +400,7 @@ FX_BOOL CFX_SkiaDeviceDriver::DrawPath(const CFX_PathData* pPathData, // path in spaint.setStyle(SkPaint::kFill_Style); spaint.setColor(fill_color); if (!RenderRasterizerSkia(path_data.m_PathData, spaint, rect, fill_color, fill_mode & FXFILL_FULLCOVER, FALSE, alpha_flag, pIccTransform)) - return FALSE; + return FALSE; } int stroke_alpha = FXGETFLAG_COLORTYPE(alpha_flag) ? FXGETFLAG_ALPHA_STROKE(alpha_flag) : FXARGB_A(stroke_color); @@ -408,15 +408,15 @@ FX_BOOL CFX_SkiaDeviceDriver::DrawPath(const CFX_PathData* pPathData, // path in if (pGraphState && stroke_alpha) { // We split the matrix into two parts: first part doing the scaling, so we won't have the // flatness problem, second part doing the transformation, so we don't have stroking geo problem. - // TESTDOC: Bug #5253 - test[1].pdf + // TESTDOC: Bug #5253 - test[1].pdf CFX_AffineMatrix matrix1, matrix2; if (pObject2Device) { matrix1.a = FXSYS_fabs(pObject2Device->a) > FXSYS_fabs(pObject2Device->b) ? FXSYS_fabs(pObject2Device->a) : FXSYS_fabs(pObject2Device->b); matrix1.d = matrix1.a;//FXSYS_fabs(pObject2Device->c) > FXSYS_fabs(pObject2Device->d) ? //pObject2Device->c : pObject2Device->d; - matrix2.Set(pObject2Device->a/matrix1.a, pObject2Device->b/matrix1.a, - pObject2Device->c/matrix1.d, pObject2Device->d/matrix1.d, + matrix2.Set(pObject2Device->a/matrix1.a, pObject2Device->b/matrix1.a, + pObject2Device->c/matrix1.d, pObject2Device->d/matrix1.d, pObject2Device->e, pObject2Device->f); } // build path data @@ -432,12 +432,12 @@ FX_BOOL CFX_SkiaDeviceDriver::DrawPath(const CFX_PathData* pPathData, // path in SkRasterizeStroke(spaint, &dst_path, path_data.m_PathData, &matrix2, pGraphState, matrix1.a, FALSE, 0); spaint.setStyle(SkPaint::kFill_Style); int fill_flag = FXGETFLAG_COLORTYPE(alpha_flag)<<8 | FXGETFLAG_ALPHA_STROKE(alpha_flag); - + if (!RenderRasterizerSkia(dst_path, spaint, rect, stroke_color, fill_mode & FXFILL_FULLCOVER, FALSE, fill_flag, pIccTransform, FALSE)) return FALSE; - + } - + return TRUE; } @@ -462,26 +462,26 @@ FX_BOOL CFX_SkiaDeviceDriver::GetDIBits(CFX_DIBitmap* pBitmap, int left, int top return m_pAggDriver->GetDIBits(pBitmap, left, top, pIccTransform, bDEdge); } -FX_BOOL CFX_SkiaDeviceDriver::SetDIBits(const CFX_DIBSource* pBitmap, FX_DWORD argb, const FX_RECT* pSrcRect, int left, int top, int blend_type, +FX_BOOL CFX_SkiaDeviceDriver::SetDIBits(const CFX_DIBSource* pBitmap, FX_DWORD argb, const FX_RECT* pSrcRect, int left, int top, int blend_type, int alpha_flag, void* pIccTransform) { return m_pAggDriver->SetDIBits(pBitmap, argb, pSrcRect, left, top, blend_type, alpha_flag, pIccTransform); } -FX_BOOL CFX_SkiaDeviceDriver::StretchDIBits(const CFX_DIBSource* pSource, FX_DWORD argb, int dest_left, int dest_top, - int dest_width, int dest_height, const FX_RECT* pClipRect, FX_DWORD flags, +FX_BOOL CFX_SkiaDeviceDriver::StretchDIBits(const CFX_DIBSource* pSource, FX_DWORD argb, int dest_left, int dest_top, + int dest_width, int dest_height, const FX_RECT* pClipRect, FX_DWORD flags, int alpha_flag, void* pIccTransform) { - return m_pAggDriver->StretchDIBits(pSource, argb, dest_left, dest_top, - dest_width, dest_height, pClipRect, flags, + return m_pAggDriver->StretchDIBits(pSource, argb, dest_left, dest_top, + dest_width, dest_height, pClipRect, flags, alpha_flag, pIccTransform); } -FX_BOOL CFX_SkiaDeviceDriver::StartDIBits(const CFX_DIBSource* pSource, int bitmap_alpha, FX_DWORD argb, - const CFX_AffineMatrix* pMatrix, FX_DWORD render_flags, void*& handle, +FX_BOOL CFX_SkiaDeviceDriver::StartDIBits(const CFX_DIBSource* pSource, int bitmap_alpha, FX_DWORD argb, + const CFX_AffineMatrix* pMatrix, FX_DWORD render_flags, void*& handle, int alpha_flag, void* pIccTransform) { - return m_pAggDriver->StartDIBits(pSource, bitmap_alpha, argb, + return m_pAggDriver->StartDIBits(pSource, bitmap_alpha, argb, pMatrix, render_flags, handle, alpha_flag, pIccTransform); } @@ -502,7 +502,7 @@ CFX_SkiaDevice::CFX_SkiaDevice() FX_BOOL CFX_SkiaDevice::Attach(CFX_DIBitmap* pBitmap, int dither_bits, FX_BOOL bRgbByteOrder, CFX_DIBitmap* pOriDevice, FX_BOOL bGroupKnockout) { - if (pBitmap == NULL) + if (pBitmap == NULL) return FALSE; SetBitmap(pBitmap); CFX_SkiaDeviceDriver* pDriver = new CFX_SkiaDeviceDriver(pBitmap, dither_bits, bRgbByteOrder, pOriDevice, bGroupKnockout); @@ -517,7 +517,7 @@ FX_BOOL CFX_SkiaDevice::Create(int width, int height, FXDIB_Format format, int d if (!pBitmap->Create(width, height, format)) { delete pBitmap; return FALSE; - } + } SetBitmap(pBitmap); CFX_SkiaDeviceDriver* pDriver = new CFX_SkiaDeviceDriver(pBitmap, dither_bits, FALSE, pOriDevice, FALSE); SetDeviceDriver(pDriver); diff --git a/core/src/fxge/skia/fx_skia_device.h b/core/src/fxge/skia/fx_skia_device.h index 582b844fb9..ab51e51a33 100644 --- a/core/src/fxge/skia/fx_skia_device.h +++ b/core/src/fxge/skia/fx_skia_device.h @@ -14,23 +14,23 @@ public: /** Options */ virtual int GetDeviceCaps(int caps_id); - + /** Save and restore all graphic states */ virtual void SaveState(); virtual void RestoreState(FX_BOOL bKeepSaved); - + /** Set clipping path using filled region */ virtual FX_BOOL SetClip_PathFill(const CFX_PathData* pPathData, // path info const CFX_AffineMatrix* pObject2Device, // optional transformation int fill_mode // fill mode, WINDING or ALTERNATE ); - + /** Set clipping path using stroked region */ virtual FX_BOOL SetClip_PathStroke(const CFX_PathData* pPathData, // path info const CFX_AffineMatrix* pObject2Device, // optional transformation const CFX_GraphStateData* pGraphState // graphic state, for pen attributes ); - + /** Draw a path */ virtual FX_BOOL DrawPath(const CFX_PathData* pPathData, const CFX_AffineMatrix* pObject2Device, @@ -38,47 +38,47 @@ public: FX_DWORD fill_color, FX_DWORD stroke_color, int fill_mode, - int alpha_flag = 0, + int alpha_flag = 0, void* pIccTransform = NULL ); - + virtual FX_BOOL SetPixel(int x, int y, FX_DWORD color, int alpha_flag = 0, void* pIccTransform = NULL); - - virtual FX_BOOL FillRect(const FX_RECT* pRect, FX_DWORD fill_color, + + virtual FX_BOOL FillRect(const FX_RECT* pRect, FX_DWORD fill_color, int alpha_flag = 0, void* pIccTransform = NULL); - + /** Draw a single pixel (device dependant) line */ - virtual FX_BOOL DrawCosmeticLine(FX_FIXFLOAT x1, FX_FIXFLOAT y1, FX_FIXFLOAT x2, FX_FIXFLOAT y2, FX_DWORD color, + virtual FX_BOOL DrawCosmeticLine(FX_FIXFLOAT x1, FX_FIXFLOAT y1, FX_FIXFLOAT x2, FX_FIXFLOAT y2, FX_DWORD color, int alpha_flag, void* pIccTransform, int blend_type) { return FALSE; } - + virtual FX_BOOL GetClipBox(FX_RECT* pRect); - + /** Load device buffer into a DIB */ virtual FX_BOOL GetDIBits(CFX_DIBitmap* pBitmap, int left, int top, void* pIccTransform = NULL, FX_BOOL bDEdge = FALSE); virtual CFX_DIBitmap* GetBackDrop() { return m_pAggDriver->GetBackDrop(); } - - virtual FX_BOOL SetDIBits(const CFX_DIBSource* pBitmap, FX_DWORD color, const FX_RECT* pSrcRect, - int dest_left, int dest_top, int blend_type, + + virtual FX_BOOL SetDIBits(const CFX_DIBSource* pBitmap, FX_DWORD color, const FX_RECT* pSrcRect, + int dest_left, int dest_top, int blend_type, int alpha_flag = 0, void* pIccTransform = NULL); - virtual FX_BOOL StretchDIBits(const CFX_DIBSource* pBitmap, FX_DWORD color, int dest_left, int dest_top, - int dest_width, int dest_height, const FX_RECT* pClipRect, FX_DWORD flags, + virtual FX_BOOL StretchDIBits(const CFX_DIBSource* pBitmap, FX_DWORD color, int dest_left, int dest_top, + int dest_width, int dest_height, const FX_RECT* pClipRect, FX_DWORD flags, int alpha_flag = 0, void* pIccTransform = NULL); - - virtual FX_BOOL StartDIBits(const CFX_DIBSource* pBitmap, int bitmap_alpha, FX_DWORD color, - const CFX_AffineMatrix* pMatrix, FX_DWORD flags, void*& handle, + + virtual FX_BOOL StartDIBits(const CFX_DIBSource* pBitmap, int bitmap_alpha, FX_DWORD color, + const CFX_AffineMatrix* pMatrix, FX_DWORD flags, void*& handle, int alpha_flag = 0, void* pIccTransform = NULL); virtual FX_BOOL ContinueDIBits(void* handle, IFX_Pause* pPause); virtual void CancelDIBits(void* handle); - + virtual FX_BOOL DrawDeviceText(int nChars, const FXTEXT_CHARPOS* pCharPos, CFX_Font* pFont, - CFX_FontCache* pCache, const CFX_AffineMatrix* pObject2Device, FX_FIXFLOAT font_size, FX_DWORD color, + CFX_FontCache* pCache, const CFX_AffineMatrix* pObject2Device, FX_FIXFLOAT font_size, FX_DWORD color, int alpha_flag = 0, void* pIccTransform = NULL); - - virtual FX_BOOL RenderRasterizer(rasterizer_scanline_aa& rasterizer, FX_DWORD color, FX_BOOL bFullCover, FX_BOOL bGroupKnockout, + + virtual FX_BOOL RenderRasterizer(rasterizer_scanline_aa& rasterizer, FX_DWORD color, FX_BOOL bFullCover, FX_BOOL bGroupKnockout, int alpha_flag, void* pIccTransform); - virtual FX_BOOL RenderRasterizerSkia(SkPath& skPath, const SkPaint& origPaint, SkIRect& rect, FX_DWORD color, FX_BOOL bFullCover, FX_BOOL bGroupKnockout, + virtual FX_BOOL RenderRasterizerSkia(SkPath& skPath, const SkPaint& origPaint, SkIRect& rect, FX_DWORD color, FX_BOOL bFullCover, FX_BOOL bGroupKnockout, int alpha_flag, void* pIccTransform, FX_BOOL bFill = TRUE); void SetClipMask(rasterizer_scanline_aa& rasterizer); void SetClipMask(SkPath& skPath, SkPaint* spaint); |