summaryrefslogtreecommitdiff
path: root/core/src/fpdfapi/fpdf_render
diff options
context:
space:
mode:
Diffstat (limited to 'core/src/fpdfapi/fpdf_render')
-rw-r--r--core/src/fpdfapi/fpdf_render/fpdf_render_cache.cpp12
-rw-r--r--core/src/fpdfapi/fpdf_render/fpdf_render_loadimage.cpp3
-rw-r--r--core/src/fpdfapi/fpdf_render/fpdf_render_pattern.cpp5
3 files changed, 6 insertions, 14 deletions
diff --git a/core/src/fpdfapi/fpdf_render/fpdf_render_cache.cpp b/core/src/fpdfapi/fpdf_render/fpdf_render_cache.cpp
index eb08bca8a7..45b6970e2a 100644
--- a/core/src/fpdfapi/fpdf_render/fpdf_render_cache.cpp
+++ b/core/src/fpdfapi/fpdf_render/fpdf_render_cache.cpp
@@ -171,16 +171,16 @@ void CPDF_PageRenderCache::ResetBitmap(CPDF_Stream* pStream, const CFX_DIBitmap*
m_nCacheSize = pImageCache->EstimateSize() - oldsize;
}
CPDF_ImageCache::CPDF_ImageCache(CPDF_Document* pDoc, CPDF_Stream* pStream)
- : m_pDocument(pDoc)
- , m_pStream(pStream)
- , m_pCachedBitmap(NULL)
- , m_pCachedMask(NULL)
- , m_dwCacheSize(0)
- , m_dwTimeCount(0)
+ : m_dwTimeCount(0)
, m_pCurBitmap(NULL)
, m_pCurMask(NULL)
, m_MatteColor(0)
, m_pRenderStatus(NULL)
+ , m_pDocument(pDoc)
+ , m_pStream(pStream)
+ , m_pCachedBitmap(NULL)
+ , m_pCachedMask(NULL)
+ , m_dwCacheSize(0)
{
}
CPDF_ImageCache::~CPDF_ImageCache()
diff --git a/core/src/fpdfapi/fpdf_render/fpdf_render_loadimage.cpp b/core/src/fpdfapi/fpdf_render/fpdf_render_loadimage.cpp
index 81cff01f50..7f442eb15c 100644
--- a/core/src/fpdfapi/fpdf_render/fpdf_render_loadimage.cpp
+++ b/core/src/fpdfapi/fpdf_render/fpdf_render_loadimage.cpp
@@ -945,7 +945,6 @@ void CPDF_DIBSource::TranslateScanline24bpp(FX_LPBYTE dest_scan, FX_LPCBYTE src_
if (m_bDefaultDecode) {
if (m_Family == PDFCS_DEVICERGB || m_Family == PDFCS_CALRGB) {
if (m_bpc == 16) {
- FX_LPBYTE dest_pos = dest_scan;
FX_LPCBYTE src_pos = src_scan;
for (int col = 0; col < m_Width; col ++) {
*dest_scan++ = src_pos[4];
@@ -954,7 +953,6 @@ void CPDF_DIBSource::TranslateScanline24bpp(FX_LPBYTE dest_scan, FX_LPCBYTE src_
src_pos += 6;
}
} else if (m_bpc == 8) {
- FX_LPBYTE dest_pos = dest_scan;
FX_LPCBYTE src_pos = src_scan;
for (int column = 0; column < m_Width; column ++) {
*dest_scan++ = src_pos[2];
@@ -1360,7 +1358,6 @@ void CPDF_DIBSource::DownSampleScanline(int line, FX_LPBYTE dest_scan, int dest_
if (src_x % 2) {
src_bit_pos = 4;
}
- int value = (1 << bpc) - 1;
for (FX_DWORD i = 0; i < m_nComponents; i ++) {
temp[i] = (FX_BYTE)(_GetBits8(pSrcPixel, src_bit_pos, bpc) * unit_To8Bpc);
src_bit_pos += bpc;
diff --git a/core/src/fpdfapi/fpdf_render/fpdf_render_pattern.cpp b/core/src/fpdfapi/fpdf_render/fpdf_render_pattern.cpp
index ba0ca84ec4..7ffd186f72 100644
--- a/core/src/fpdfapi/fpdf_render/fpdf_render_pattern.cpp
+++ b/core/src/fpdfapi/fpdf_render/fpdf_render_pattern.cpp
@@ -71,7 +71,6 @@ static void _DrawAxialShading(CFX_DIBitmap* pBitmap, CFX_AffineMatrix* pObject2B
rgb_array[i] = FXARGB_TODIB(FXARGB_MAKE(alpha, FXSYS_round(R * 255), FXSYS_round(G * 255), FXSYS_round(B * 255)));
}
int pitch = pBitmap->GetPitch();
- int Bpp = pBitmap->GetBPP() / 8;
for (int row = 0; row < height; row ++) {
FX_DWORD* dib_buf = (FX_DWORD*)(pBitmap->GetBuffer() + row * pitch);
for (int column = 0; column < width; column ++) {
@@ -156,7 +155,6 @@ static void _DrawRadialShading(CFX_DIBitmap* pBitmap, CFX_AffineMatrix* pObject2
int width = pBitmap->GetWidth();
int height = pBitmap->GetHeight();
int pitch = pBitmap->GetPitch();
- int Bpp = pBitmap->GetBPP() / 8;
FX_BOOL bDecreasing = FALSE;
if (start_r > end_r) {
int length = (int)FXSYS_sqrt((FXSYS_Mul(start_x - end_x, start_x - end_x) + FXSYS_Mul(start_y - end_y, start_y - end_y)));
@@ -245,7 +243,6 @@ static void _DrawFuncShading(CFX_DIBitmap* pBitmap, CFX_AffineMatrix* pObject2Bi
int width = pBitmap->GetWidth();
int height = pBitmap->GetHeight();
int pitch = pBitmap->GetPitch();
- int Bpp = pBitmap->GetBPP() / 8;
int total_results = 0;
for (int j = 0; j < nFuncs; j ++) {
if (pFuncs[j]) {
@@ -743,8 +740,6 @@ static void _DrawCoonPatchMeshes(FX_BOOL bTensor, CFX_DIBitmap* pBitmap, CFX_Aff
void CPDF_RenderStatus::DrawShading(CPDF_ShadingPattern* pPattern, CFX_AffineMatrix* pMatrix,
FX_RECT& clip_rect, int alpha, FX_BOOL bAlphaMode)
{
- int width = clip_rect.Width();
- int height = clip_rect.Height();
CPDF_Function** pFuncs = pPattern->m_pFunctions;
int nFuncs = pPattern->m_nFuncs;
CPDF_Dictionary* pDict = pPattern->m_pShadingObj->GetDict();