diff options
author | Bo Xu <bo_xu@foxitsoftware.com> | 2014-05-24 12:20:17 -0700 |
---|---|---|
committer | Bo Xu <bo_xu@foxitsoftware.com> | 2014-05-24 12:20:17 -0700 |
commit | 5dc4f24637d353d4d777c251f6d8c5746e062e7e (patch) | |
tree | 3b456ac537c2ff58afa268bd4a543a482dbdc1f1 /core/src/fxge/dib | |
parent | 4201b2a5f38a6335d012aa4dc4cd19f6989d05f1 (diff) | |
download | pdfium-5dc4f24637d353d4d777c251f6d8c5746e062e7e.tar.xz |
Fix warnings in android build, fix font rendering issue, fix issue 357588: wrong characters representation, and addjust some code indent
BUG=
R=jam@chromium.org
Review URL: https://codereview.chromium.org/294353002
Diffstat (limited to 'core/src/fxge/dib')
-rw-r--r-- | core/src/fxge/dib/fx_dib_composite.cpp | 2 | ||||
-rw-r--r-- | core/src/fxge/dib/fx_dib_convert.cpp | 3 | ||||
-rw-r--r-- | core/src/fxge/dib/fx_dib_main.cpp | 3 | ||||
-rw-r--r-- | core/src/fxge/dib/fx_dib_transform.cpp | 8 |
4 files changed, 9 insertions, 7 deletions
diff --git a/core/src/fxge/dib/fx_dib_composite.cpp b/core/src/fxge/dib/fx_dib_composite.cpp index 1bbe07725b..da555de9d5 100644 --- a/core/src/fxge/dib/fx_dib_composite.cpp +++ b/core/src/fxge/dib/fx_dib_composite.cpp @@ -3805,7 +3805,6 @@ void CFX_ScanlineCompositor::CompositeRgbBitmapLine(FX_LPBYTE dest_scan, FX_LPCB { int src_Bpp = (m_SrcFormat & 0xff) >> 3; int dest_Bpp = (m_DestFormat & 0xff) >> 3; - int dest_Size = width * dest_Bpp + 4; if (m_bRgbByteOrder) { switch (m_Transparency) { case 0: @@ -3886,6 +3885,7 @@ void CFX_ScanlineCompositor::CompositeRgbBitmapLine(FX_LPBYTE dest_scan, FX_LPCB } } } else { + int dest_Size = width * dest_Bpp + 4; if (dest_Size > m_CacheSize) { m_pCacheScanline = FX_Realloc(FX_BYTE, m_pCacheScanline, dest_Size); if (!m_pCacheScanline) { diff --git a/core/src/fxge/dib/fx_dib_convert.cpp b/core/src/fxge/dib/fx_dib_convert.cpp index 0120721e35..2a74452626 100644 --- a/core/src/fxge/dib/fx_dib_convert.cpp +++ b/core/src/fxge/dib/fx_dib_convert.cpp @@ -452,7 +452,7 @@ FX_BOOL _ConvertBuffer_RgbOrCmyk2Gray(FX_LPBYTE dest_buf, int dest_pitch, int wi src_scan += 4; } } - } else + } else { for (int row = 0; row < height; row ++) { FX_LPBYTE dest_scan = dest_buf + row * dest_pitch; FX_LPCBYTE src_scan = pSrcBitmap->GetScanline(src_top + row) + src_left * Bpp; @@ -461,6 +461,7 @@ FX_BOOL _ConvertBuffer_RgbOrCmyk2Gray(FX_LPBYTE dest_buf, int dest_pitch, int wi src_scan += Bpp; } } + } } return TRUE; } diff --git a/core/src/fxge/dib/fx_dib_main.cpp b/core/src/fxge/dib/fx_dib_main.cpp index 9b27a13daf..7644e39f02 100644 --- a/core/src/fxge/dib/fx_dib_main.cpp +++ b/core/src/fxge/dib/fx_dib_main.cpp @@ -1326,7 +1326,7 @@ FX_BOOL CFX_DIBitmap::ConvertColorScale(FX_DWORD forecolor, FX_DWORD backcolor) *scanline ++ = bk + (fk - bk) * gray / 255; } } - } else + } else { for (int row = 0; row < m_Height; row ++) { FX_LPBYTE scanline = m_pBuffer + row * m_Pitch; int gap = m_bpp / 8 - 2; @@ -1338,6 +1338,7 @@ FX_BOOL CFX_DIBitmap::ConvertColorScale(FX_DWORD forecolor, FX_DWORD backcolor) scanline += gap; } } + } return TRUE; } FX_BOOL CFX_DIBitmap::DitherFS(const FX_DWORD* pPalette, int pal_size, const FX_RECT* pRect) diff --git a/core/src/fxge/dib/fx_dib_transform.cpp b/core/src/fxge/dib/fx_dib_transform.cpp index 80475cbb1f..16d791b4ee 100644 --- a/core/src/fxge/dib/fx_dib_transform.cpp +++ b/core/src/fxge/dib/fx_dib_transform.cpp @@ -420,13 +420,13 @@ FX_BOOL CFX_ImageTransformer::Continue(IFX_Pause* pPause) } } else if (m_Flags & FXDIB_BICUBIC_INTERPOL) { CFX_BilinearMatrix result2stretch_fix(result2stretch, 8); - int pos_pixel[8]; for (int row = 0; row < m_ResultHeight; row ++) { FX_BYTE* dest_pos_mask = (FX_BYTE*)pTransformed->m_pAlphaMask->GetScanline(row); for (int col = 0; col < m_ResultWidth; col ++) { int src_col_l, src_row_l, res_x, res_y; result2stretch_fix.Transform(col, row, src_col_l, src_row_l, res_x, res_y); if (src_col_l >= 0 && src_col_l <= stretch_width && src_row_l >= 0 && src_row_l <= stretch_height) { + int pos_pixel[8]; int u_w[4], v_w[4]; if (src_col_l == stretch_width) { src_col_l--; @@ -493,13 +493,13 @@ FX_BOOL CFX_ImageTransformer::Continue(IFX_Pause* pPause) } } else if (m_Flags & FXDIB_BICUBIC_INTERPOL) { CFX_BilinearMatrix result2stretch_fix(result2stretch, 8); - int pos_pixel[8]; for (int row = 0; row < m_ResultHeight; row ++) { FX_LPBYTE dest_scan = (FX_LPBYTE)pTransformed->GetScanline(row); for (int col = 0; col < m_ResultWidth; col ++) { int src_col_l, src_row_l, res_x, res_y; result2stretch_fix.Transform(col, row, src_col_l, src_row_l, res_x, res_y); if (src_col_l >= 0 && src_col_l <= stretch_width && src_row_l >= 0 && src_row_l <= stretch_height) { + int pos_pixel[8]; int u_w[4], v_w[4]; if (src_col_l == stretch_width) { src_col_l--; @@ -593,13 +593,13 @@ FX_BOOL CFX_ImageTransformer::Continue(IFX_Pause* pPause) } } else if (m_Flags & FXDIB_BICUBIC_INTERPOL) { CFX_BilinearMatrix result2stretch_fix(result2stretch, 8); - int pos_pixel[8]; for (int row = 0; row < m_ResultHeight; row ++) { FX_BYTE* dest_pos = (FX_BYTE*)pTransformed->GetScanline(row); for (int col = 0; col < m_ResultWidth; col ++) { int src_col_l, src_row_l, res_x, res_y; result2stretch_fix.Transform(col, row, src_col_l, src_row_l, res_x, res_y); if (src_col_l >= 0 && src_col_l <= stretch_width && src_row_l >= 0 && src_row_l <= stretch_height) { + int pos_pixel[8]; int u_w[4], v_w[4]; if (src_col_l == stretch_width) { src_col_l--; @@ -706,13 +706,13 @@ FX_BOOL CFX_ImageTransformer::Continue(IFX_Pause* pPause) } } else if (m_Flags & FXDIB_BICUBIC_INTERPOL) { CFX_BilinearMatrix result2stretch_fix(result2stretch, 8); - int pos_pixel[8]; for (int row = 0; row < m_ResultHeight; row ++) { FX_BYTE* dest_pos = (FX_BYTE*)pTransformed->GetScanline(row); for (int col = 0; col < m_ResultWidth; col ++) { int src_col_l, src_row_l, res_x, res_y, r_pos_k_r = 0; result2stretch_fix.Transform(col, row, src_col_l, src_row_l, res_x, res_y); if (src_col_l >= 0 && src_col_l <= stretch_width && src_row_l >= 0 && src_row_l <= stretch_height) { + int pos_pixel[8]; int u_w[4], v_w[4]; if (src_col_l == stretch_width) { src_col_l--; |