Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1535)

Unified Diff: fpdfsdk/fpdfview.cpp

Issue 2011563006: Remove checks for _WIN32_WCE. (Closed) Base URL: https://pdfium.googlesource.com/pdfium@master
Patch Set: nit Created 4 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « core/fxcrt/fx_basic_util.cpp ('k') | fpdfsdk/fsdk_rendercontext.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: fpdfsdk/fpdfview.cpp
diff --git a/fpdfsdk/fpdfview.cpp b/fpdfsdk/fpdfview.cpp
index 9bf983974c8e264d925647fb7ad903c2315397a0..7797165bc266cd129e4584d39112ed4af8aaf78d 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;
« no previous file with comments | « core/fxcrt/fx_basic_util.cpp ('k') | fpdfsdk/fsdk_rendercontext.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698