summaryrefslogtreecommitdiff
path: root/fpdfsdk
diff options
context:
space:
mode:
authorthestig <thestig@chromium.org>2016-05-26 16:33:01 -0700
committerCommit bot <commit-bot@chromium.org>2016-05-26 16:33:01 -0700
commit3bd3841291b46bd7ae31cfb8dc8035e5b4ed4e40 (patch)
tree46aba6b22f524abe514b56a3e0980a2047051fb3 /fpdfsdk
parent2f1e05a44bbc38a4afea3fde8c8018dc127b8659 (diff)
downloadpdfium-3bd3841291b46bd7ae31cfb8dc8035e5b4ed4e40.tar.xz
Remove checks for _WIN32_WCE.
Review-Url: https://codereview.chromium.org/2011563006
Diffstat (limited to 'fpdfsdk')
-rw-r--r--fpdfsdk/fpdfview.cpp45
-rw-r--r--fpdfsdk/fsdk_rendercontext.cpp14
-rw-r--r--fpdfsdk/include/fsdk_rendercontext.h4
3 files changed, 1 insertions, 62 deletions
diff --git a/fpdfsdk/fpdfview.cpp b/fpdfsdk/fpdfview.cpp
index 9bf983974c..7797165bc2 100644
--- a/fpdfsdk/fpdfview.cpp
+++ b/fpdfsdk/fpdfview.cpp
@@ -537,7 +537,6 @@ DLLEXPORT void STDCALL FPDF_RenderPage(HDC dc,
CRenderContext* pContext = new CRenderContext;
pPage->SetRenderContext(std::unique_ptr<CFX_Deletable>(pContext));
-#if !defined(_WIN32_WCE)
CFX_DIBitmap* pBitmap = nullptr;
FX_BOOL bBackgroundAlphaNeeded = pPage->BackgroundAlphaNeeded();
FX_BOOL bHasImageMask = pPage->HasImageMask();
@@ -572,50 +571,6 @@ DLLEXPORT void STDCALL FPDF_RenderPage(HDC dc,
}
}
}
-#else
- // get clip region
- RECT rect, cliprect;
- rect.left = start_x;
- rect.top = start_y;
- rect.right = start_x + size_x;
- rect.bottom = start_y + size_y;
- GetClipBox(dc, &cliprect);
- IntersectRect(&rect, &rect, &cliprect);
- int width = rect.right - rect.left;
- int height = rect.bottom - rect.top;
-
- // Create a DIB section
- LPVOID pBuffer;
- BITMAPINFOHEADER bmih;
- FXSYS_memset(&bmih, 0, sizeof bmih);
- bmih.biSize = sizeof bmih;
- bmih.biBitCount = 24;
- bmih.biHeight = -height;
- bmih.biPlanes = 1;
- bmih.biWidth = width;
- pContext->m_hBitmap = CreateDIBSection(dc, (BITMAPINFO*)&bmih, DIB_RGB_COLORS,
- &pBuffer, NULL, 0);
- FXSYS_memset(pBuffer, 0xff, height * ((width * 3 + 3) / 4 * 4));
-
- // Create a device with this external buffer
- pContext->m_pBitmap = new CFX_DIBitmap;
- pContext->m_pBitmap->Create(width, height, FXDIB_Rgb, (uint8_t*)pBuffer);
- pContext->m_pDevice = new CPDF_FxgeDevice;
- ((CPDF_FxgeDevice*)pContext->m_pDevice)->Attach(pContext->m_pBitmap);
-
- // output to bitmap device
- FPDF_RenderPage_Retail(pContext, page, start_x - rect.left,
- start_y - rect.top, size_x, size_y, rotate, flags);
-
- // Now output to real device
- HDC hMemDC = CreateCompatibleDC(dc);
- HGDIOBJ hOldBitmap = SelectObject(hMemDC, pContext->m_hBitmap);
-
- BitBlt(dc, rect.left, rect.top, width, height, hMemDC, 0, 0, SRCCOPY);
- SelectObject(hMemDC, hOldBitmap);
- DeleteDC(hMemDC);
-
-#endif // !defined(_WIN32_WCE)
if (bBackgroundAlphaNeeded || bHasImageMask)
delete pBitmap;
diff --git a/fpdfsdk/fsdk_rendercontext.cpp b/fpdfsdk/fsdk_rendercontext.cpp
index eb630dd60f..3ba60778a7 100644
--- a/fpdfsdk/fsdk_rendercontext.cpp
+++ b/fpdfsdk/fsdk_rendercontext.cpp
@@ -15,10 +15,6 @@ void CRenderContext::Clear() {
m_pRenderer = NULL;
m_pAnnots = NULL;
m_pOptions = NULL;
-#ifdef _WIN32_WCE
- m_pBitmap = NULL;
- m_hBitmap = NULL;
-#endif
}
CRenderContext::~CRenderContext() {
@@ -28,11 +24,6 @@ CRenderContext::~CRenderContext() {
delete m_pAnnots;
delete m_pOptions->m_pOCContext;
delete m_pOptions;
-#ifdef _WIN32_WCE
- delete m_pBitmap;
- if (m_hBitmap)
- DeleteObject(m_hBitmap);
-#endif
}
IFSDK_PAUSE_Adapter::IFSDK_PAUSE_Adapter(IFSDK_PAUSE* IPause) {
@@ -42,8 +33,5 @@ IFSDK_PAUSE_Adapter::IFSDK_PAUSE_Adapter(IFSDK_PAUSE* IPause) {
IFSDK_PAUSE_Adapter::~IFSDK_PAUSE_Adapter() {}
FX_BOOL IFSDK_PAUSE_Adapter::NeedToPauseNow() {
- if (m_IPause->NeedToPauseNow) {
- return m_IPause->NeedToPauseNow(m_IPause);
- }
- return FALSE;
+ return m_IPause->NeedToPauseNow && m_IPause->NeedToPauseNow(m_IPause);
}
diff --git a/fpdfsdk/include/fsdk_rendercontext.h b/fpdfsdk/include/fsdk_rendercontext.h
index 1bcd076466..c2ae45eef5 100644
--- a/fpdfsdk/include/fsdk_rendercontext.h
+++ b/fpdfsdk/include/fsdk_rendercontext.h
@@ -25,10 +25,6 @@ class CRenderContext : public CFX_Deletable {
CPDF_ProgressiveRenderer* m_pRenderer;
CPDF_AnnotList* m_pAnnots;
CPDF_RenderOptions* m_pOptions;
-#ifdef _WIN32_WCE
- CFX_DIBitmap* m_pBitmap;
- HBITMAP m_hBitmap;
-#endif
};
class IFSDK_PAUSE_Adapter : public IFX_Pause {