summaryrefslogtreecommitdiff
path: root/core/src/fxge/dib
diff options
context:
space:
mode:
authorJohn Abd-El-Malek <jam@chromium.org>2014-12-15 12:13:45 -0800
committerJohn Abd-El-Malek <jam@chromium.org>2014-12-15 12:13:45 -0800
commit207299b5d46e3e0612dd6a0264fb7647177312bb (patch)
tree796aeeeab94a2cac2676e3fb359078609c82f809 /core/src/fxge/dib
parent0d4fdc1bbf2c23999271617413f89f059d4a71c9 (diff)
downloadpdfium-207299b5d46e3e0612dd6a0264fb7647177312bb.tar.xz
XFA: merge patch from issue 801913002 and 804463003
Simplify PDFium by removing code that's not used in the open source repo. -remove parameter from FPDF_InitLibrary -remove a bunch of ifdefs that are unused Fix build after previous commit. TBR=tsepez@chromium.org BUG= Review URL: https://codereview.chromium.org/809513002
Diffstat (limited to 'core/src/fxge/dib')
-rw-r--r--core/src/fxge/dib/fx_dib_engine.cpp11
-rw-r--r--core/src/fxge/dib/fx_dib_main.cpp10
2 files changed, 0 insertions, 21 deletions
diff --git a/core/src/fxge/dib/fx_dib_engine.cpp b/core/src/fxge/dib/fx_dib_engine.cpp
index b436f88bd6..f4c0ef16be 100644
--- a/core/src/fxge/dib/fx_dib_engine.cpp
+++ b/core/src/fxge/dib/fx_dib_engine.cpp
@@ -311,11 +311,7 @@ FX_BOOL CStretchEngine::StartStretchHorz()
if (m_DestWidth == 0 || m_pDestScanline == NULL || m_SrcClip.Height() > (int)((1U << 29) / m_InterPitch) || m_SrcClip.Height() == 0) {
return FALSE;
}
-#ifndef _FPDFAPI_MINI_
m_pInterBuf = FX_AllocNL(unsigned char, m_SrcClip.Height() * m_InterPitch);
-#else
- m_pInterBuf = FX_Alloc(unsigned char, m_SrcClip.Height() * m_InterPitch);
-#endif
if (m_pInterBuf == NULL) {
return FALSE;
}
@@ -766,11 +762,7 @@ FX_BOOL CFX_ImageStretcher::Continue(IFX_Pause* pPause)
return ContinueStretch(pPause);
}
}
-#ifndef _FPDFAPI_MINI_
#define MAX_PROGRESSIVE_STRETCH_PIXELS 1000000
-#else
-#define MAX_PROGRESSIVE_STRETCH_PIXELS 100000
-#endif
FX_BOOL CFX_ImageStretcher::StartStretch()
{
m_pStretchEngine = FX_NEW CStretchEngine(m_pDest, m_DestFormat, m_DestWidth, m_DestHeight, m_ClipRect, m_pSource, m_Flags);
@@ -793,9 +785,6 @@ FX_BOOL CFX_ImageStretcher::ContinueStretch(IFX_Pause* pPause)
}
FX_BOOL CFX_ImageStretcher::StartQuickStretch()
{
-#ifdef _FPDFAPI_MINI_
- m_pSource->SetDownSampleSize(m_DestWidth, m_DestHeight);
-#endif
m_bFlipX = FALSE;
m_bFlipY = FALSE;
if (m_DestWidth < 0) {
diff --git a/core/src/fxge/dib/fx_dib_main.cpp b/core/src/fxge/dib/fx_dib_main.cpp
index 7e8cb0c3db..2cb41f62b7 100644
--- a/core/src/fxge/dib/fx_dib_main.cpp
+++ b/core/src/fxge/dib/fx_dib_main.cpp
@@ -431,7 +431,6 @@ FX_BOOL CFX_DIBitmap::TransferBitmap(int dest_left, int dest_top, int width, int
}
return TRUE;
}
-#ifndef _FPDFAPI_MINI_
FX_BOOL CFX_DIBitmap::TransferMask(int dest_left, int dest_top, int width, int height,
const CFX_DIBSource* pMask, FX_DWORD color, int src_left, int src_top, int alpha_flag, void* pIccTransform)
{
@@ -526,7 +525,6 @@ FX_BOOL CFX_DIBitmap::TransferMask(int dest_left, int dest_top, int width, int h
}
return TRUE;
}
-#endif
void CFX_DIBSource::CopyPalette(const FX_DWORD* pSrc, FX_DWORD size)
{
if (pSrc == NULL || GetBPP() > 8) {
@@ -1053,7 +1051,6 @@ FX_BOOL CFX_DIBitmap::MultiplyAlpha(int alpha)
}
return TRUE;
}
-#if !defined(_FPDFAPI_MINI_) || defined(_FXCORE_FEATURE_ALL_)
FX_DWORD CFX_DIBitmap::GetPixel(int x, int y) const
{
if (m_pBuffer == NULL) {
@@ -1090,7 +1087,6 @@ FX_DWORD CFX_DIBitmap::GetPixel(int x, int y) const
}
return 0;
}
-#endif
void CFX_DIBitmap::SetPixel(int x, int y, FX_DWORD color)
{
if (m_pBuffer == NULL) {
@@ -1176,9 +1172,7 @@ void CFX_DIBitmap::DownSampleScanline(int line, FX_LPBYTE dest_scan, int dest_bp
if (bFlipX) {
src_x = m_Width - src_x - 1;
}
-#ifdef FOXIT_CHROME_BUILD
src_x %= m_Width;
-#endif
dest_scan[i] = (scanline[src_x / 8] & (1 << (7 - src_x % 8))) ? 255 : 0;
}
} else if (src_Bpp == 1) {
@@ -1188,9 +1182,7 @@ void CFX_DIBitmap::DownSampleScanline(int line, FX_LPBYTE dest_scan, int dest_bp
if (bFlipX) {
src_x = m_Width - src_x - 1;
}
-#ifdef FOXIT_CHROME_BUILD
src_x %= m_Width;
-#endif
int dest_pos = i;
if (m_pPalette) {
if (!IsCmykImage()) {
@@ -1215,9 +1207,7 @@ void CFX_DIBitmap::DownSampleScanline(int line, FX_LPBYTE dest_scan, int dest_bp
for (int i = 0; i < clip_width; i ++) {
FX_DWORD dest_x = clip_left + i;
FX_DWORD src_x = bFlipX ? (m_Width - dest_x * m_Width / dest_width - 1) * src_Bpp : (dest_x * m_Width / dest_width) * src_Bpp;
-#ifdef FOXIT_CHROME_BUILD
src_x %= m_Width * src_Bpp;
-#endif
int dest_pos = i * src_Bpp;
for (int b = 0; b < src_Bpp; b ++) {
dest_scan[dest_pos + b] = scanline[src_x + b];