summaryrefslogtreecommitdiff
path: root/core/src/fxge/dib
diff options
context:
space:
mode:
authorNico Weber <thakis@chromium.org>2014-07-29 08:55:54 -0700
committerNico Weber <thakis@chromium.org>2014-07-29 08:55:54 -0700
commitc77e8f73397613f278eaeef2cae44debc6a684c8 (patch)
tree325d52616e193459f3cb248ce910852333d5d59d /core/src/fxge/dib
parent3b07e751353a12d1b4605abfa96881c8eae1bbe5 (diff)
downloadpdfium-c77e8f73397613f278eaeef2cae44debc6a684c8.tar.xz
Remove a few unused variables, functions, and tables.
Found by clang's -Wunused-variable, -Wunused-function, -Wunused-const-variable. BUG=none R=bo_xu@foxitsoftware.com Review URL: https://codereview.chromium.org/404653005
Diffstat (limited to 'core/src/fxge/dib')
-rw-r--r--core/src/fxge/dib/fx_dib_composite.cpp1
-rw-r--r--core/src/fxge/dib/fx_dib_engine.cpp16
-rw-r--r--core/src/fxge/dib/fx_dib_main.cpp1
-rw-r--r--core/src/fxge/dib/fx_dib_transform.cpp1
4 files changed, 7 insertions, 12 deletions
diff --git a/core/src/fxge/dib/fx_dib_composite.cpp b/core/src/fxge/dib/fx_dib_composite.cpp
index da555de9d5..375b7c110e 100644
--- a/core/src/fxge/dib/fx_dib_composite.cpp
+++ b/core/src/fxge/dib/fx_dib_composite.cpp
@@ -2951,7 +2951,6 @@ inline void _CompositeRow_Argb2Rgb_Blend_RgbByteOrder(FX_LPBYTE dest_scan, FX_LP
}
inline void _CompositeRow_Rgb2Argb_NoBlend_NoClip_RgbByteOrder(FX_LPBYTE dest_scan, FX_LPCBYTE src_scan, int width, int src_Bpp)
{
- int src_gap = src_Bpp - 3;
for (int col = 0; col < width; col ++) {
if (src_Bpp == 4) {
FXARGB_SETRGBORDERDIB(dest_scan, 0xff000000 | FXARGB_GETDIB(src_scan));
diff --git a/core/src/fxge/dib/fx_dib_engine.cpp b/core/src/fxge/dib/fx_dib_engine.cpp
index 803d906ff9..b436f88bd6 100644
--- a/core/src/fxge/dib/fx_dib_engine.cpp
+++ b/core/src/fxge/dib/fx_dib_engine.cpp
@@ -421,7 +421,7 @@ FX_BOOL CStretchEngine::ContinueStretchHorz(IFX_Pause* pPause)
case 5: {
for (int col = m_DestClip.left; col < m_DestClip.right; col ++) {
PixelWeight* pPixelWeights = m_WeightTable.GetPixelWeight(col);
- int dest_r_y = 0, dest_g_m = 0, dest_b_c = 0, dest_k = 0;
+ int dest_r_y = 0, dest_g_m = 0, dest_b_c = 0;
for (int j = pPixelWeights->m_SrcStart; j <= pPixelWeights->m_SrcEnd; j ++) {
int pixel_weight = pPixelWeights->m_Weights[j - pPixelWeights->m_SrcStart];
unsigned long argb_cmyk = m_pSrcPalette[src_scan[j]];
@@ -449,7 +449,7 @@ FX_BOOL CStretchEngine::ContinueStretchHorz(IFX_Pause* pPause)
case 6: {
for (int col = m_DestClip.left; col < m_DestClip.right; col ++) {
PixelWeight* pPixelWeights = m_WeightTable.GetPixelWeight(col);
- int dest_a = 0, dest_r_y = 0, dest_g_m = 0, dest_b_c = 0, dest_k = 0;
+ int dest_a = 0, dest_r_y = 0, dest_g_m = 0, dest_b_c = 0;
for (int j = pPixelWeights->m_SrcStart; j <= pPixelWeights->m_SrcEnd; j ++) {
int pixel_weight = pPixelWeights->m_Weights[j - pPixelWeights->m_SrcStart];
pixel_weight = pixel_weight * src_scan_mask[j] / 255;
@@ -466,7 +466,6 @@ FX_BOOL CStretchEngine::ContinueStretchHorz(IFX_Pause* pPause)
dest_a += pixel_weight;
}
if (m_Flags & FXDIB_BICUBIC_INTERPOL) {
- dest_k = dest_k < 0 ? 0 : dest_k > 16711680 ? 16711680 : dest_k;
dest_b_c = dest_b_c < 0 ? 0 : dest_b_c > 16711680 ? 16711680 : dest_b_c;
dest_g_m = dest_g_m < 0 ? 0 : dest_g_m > 16711680 ? 16711680 : dest_g_m;
dest_r_y = dest_r_y < 0 ? 0 : dest_r_y > 16711680 ? 16711680 : dest_r_y;
@@ -482,7 +481,7 @@ FX_BOOL CStretchEngine::ContinueStretchHorz(IFX_Pause* pPause)
case 7: {
for (int col = m_DestClip.left; col < m_DestClip.right; col ++) {
PixelWeight* pPixelWeights = m_WeightTable.GetPixelWeight(col);
- int dest_r_y = 0, dest_g_m = 0, dest_b_c = 0, dest_k = 0;
+ int dest_r_y = 0, dest_g_m = 0, dest_b_c = 0;
for (int j = pPixelWeights->m_SrcStart; j <= pPixelWeights->m_SrcEnd; j ++) {
int pixel_weight = pPixelWeights->m_Weights[j - pPixelWeights->m_SrcStart];
FX_LPCBYTE src_pixel = src_scan + j * Bpp;
@@ -505,7 +504,7 @@ FX_BOOL CStretchEngine::ContinueStretchHorz(IFX_Pause* pPause)
case 8: {
for (int col = m_DestClip.left; col < m_DestClip.right; col ++) {
PixelWeight* pPixelWeights = m_WeightTable.GetPixelWeight(col);
- int dest_a = 0, dest_r_y = 0, dest_g_m = 0, dest_b_c = 0, dest_k = 0;
+ int dest_a = 0, dest_r_y = 0, dest_g_m = 0, dest_b_c = 0;
for (int j = pPixelWeights->m_SrcStart; j <= pPixelWeights->m_SrcEnd; j ++) {
int pixel_weight = pPixelWeights->m_Weights[j - pPixelWeights->m_SrcStart];
FX_LPCBYTE src_pixel = src_scan + j * Bpp;
@@ -601,7 +600,7 @@ void CStretchEngine::StretchVert()
case 7: {
for (int col = m_DestClip.left; col < m_DestClip.right; col ++) {
unsigned char* src_scan = m_pInterBuf + (col - m_DestClip.left) * DestBpp;
- int dest_r_y = 0, dest_g_m = 0, dest_b_c = 0, dest_k = 0;
+ int dest_r_y = 0, dest_g_m = 0, dest_b_c = 0;
for (int j = pPixelWeights->m_SrcStart; j <= pPixelWeights->m_SrcEnd; j ++) {
int pixel_weight = pPixelWeights->m_Weights[j - pPixelWeights->m_SrcStart];
FX_LPCBYTE src_pixel = src_scan + (j - m_SrcClip.top) * m_InterPitch;
@@ -629,7 +628,7 @@ void CStretchEngine::StretchVert()
if (m_DestFormat != FXDIB_Argb) {
src_scan_mask = m_pExtraAlphaBuf + (col - m_DestClip.left);
}
- int dest_a = 0, dest_k = 0, dest_r_y = 0, dest_g_m = 0, dest_b_c = 0;
+ int dest_a = 0, dest_r_y = 0, dest_g_m = 0, dest_b_c = 0;
for (int j = pPixelWeights->m_SrcStart; j <= pPixelWeights->m_SrcEnd; j ++) {
int pixel_weight = pPixelWeights->m_Weights[j - pPixelWeights->m_SrcStart];
FX_LPCBYTE src_pixel = src_scan + (j - m_SrcClip.top) * m_InterPitch;
@@ -835,7 +834,7 @@ FX_BOOL CFX_ImageStretcher::ContinueQuickStretch(IFX_Pause* pPause)
return FALSE;
}
int result_width = m_ClipRect.Width(), result_height = m_ClipRect.Height();
- int src_width = m_pSource->GetWidth(), src_height = m_pSource->GetHeight();
+ int src_height = m_pSource->GetHeight();
for (; m_LineIndex < result_height; m_LineIndex ++) {
int dest_y, src_y;
if (m_bFlipY) {
@@ -855,7 +854,6 @@ FX_BOOL CFX_ImageStretcher::ContinueQuickStretch(IFX_Pause* pPause)
return TRUE;
}
m_pSource->DownSampleScanline(src_y, m_pScanline, m_DestBPP, m_DestWidth, m_bFlipX, m_ClipRect.left, result_width);
- FX_LPBYTE scan_extra_alpha = NULL;
if (m_pMaskScanline) {
m_pSource->m_pAlphaMask->DownSampleScanline(src_y, m_pMaskScanline, 1, m_DestWidth, m_bFlipX, m_ClipRect.left, result_width);
}
diff --git a/core/src/fxge/dib/fx_dib_main.cpp b/core/src/fxge/dib/fx_dib_main.cpp
index 3e1e8cf91b..7e8cb0c3db 100644
--- a/core/src/fxge/dib/fx_dib_main.cpp
+++ b/core/src/fxge/dib/fx_dib_main.cpp
@@ -447,7 +447,6 @@ FX_BOOL CFX_DIBitmap::TransferMask(int dest_left, int dest_top, int width, int h
if (width == 0 || height == 0) {
return TRUE;
}
- int src_pitch = pMask->GetPitch();
int src_bpp = pMask->GetBPP();
int alpha;
FX_DWORD dst_color;
diff --git a/core/src/fxge/dib/fx_dib_transform.cpp b/core/src/fxge/dib/fx_dib_transform.cpp
index 16d791b4ee..65afdd6b3a 100644
--- a/core/src/fxge/dib/fx_dib_transform.cpp
+++ b/core/src/fxge/dib/fx_dib_transform.cpp
@@ -538,7 +538,6 @@ FX_BOOL CFX_ImageTransformer::Continue(IFX_Pause* pPause)
int Bpp = m_Storer.GetBitmap()->GetBPP() / 8;
int destBpp = pTransformed->GetBPP() / 8;
if (Bpp == 1) {
- FX_BOOL bHasAlpha = m_Storer.GetBitmap()->HasAlpha();
FX_DWORD argb[256];
FX_ARGB* pPal = m_Storer.GetBitmap()->GetPalette();
if (pPal) {