| Index: core/fpdfapi/fpdf_render/fpdf_render.cpp
|
| diff --git a/core/fpdfapi/fpdf_render/fpdf_render.cpp b/core/fpdfapi/fpdf_render/fpdf_render.cpp
|
| index b69863b5b05ab6e38e51da65d6cf8bc7971487b3..3e332cb63b4c86f3c93fc115d05a725748e5c1ce 100644
|
| --- a/core/fpdfapi/fpdf_render/fpdf_render.cpp
|
| +++ b/core/fpdfapi/fpdf_render/fpdf_render.cpp
|
| @@ -142,7 +142,6 @@ CPDF_RenderStatus::CPDF_RenderStatus()
|
| m_HalftoneLimit(0),
|
| m_bPrint(FALSE),
|
| m_Transparency(0),
|
| - m_DitherBits(0),
|
| m_bDropObjects(FALSE),
|
| m_bStdCS(FALSE),
|
| m_GroupFamily(0),
|
| @@ -170,7 +169,6 @@ FX_BOOL CPDF_RenderStatus::Initialize(CPDF_RenderContext* pContext,
|
| FX_BOOL bLoadMask) {
|
| m_pContext = pContext;
|
| m_pDevice = pDevice;
|
| - m_DitherBits = pDevice->GetDeviceCaps(FXDC_DITHER_BITS);
|
| m_bPrint = m_pDevice->GetDeviceClass() != FXDC_DISPLAY;
|
| if (pDeviceMatrix) {
|
| m_DeviceMatrix = *pDeviceMatrix;
|
| @@ -320,28 +318,6 @@ FX_BOOL CPDF_RenderStatus::GetObjectClippedRect(const CPDF_PageObject* pObj,
|
| rect.Intersect(rtClip);
|
| return rect.IsEmpty();
|
| }
|
| -void CPDF_RenderStatus::DitherObjectArea(const CPDF_PageObject* pObj,
|
| - const CFX_Matrix* pObj2Device) {
|
| - CFX_DIBitmap* pBitmap = m_pDevice->GetBitmap();
|
| - if (!pBitmap) {
|
| - return;
|
| - }
|
| - FX_RECT rect;
|
| - if (GetObjectClippedRect(pObj, pObj2Device, FALSE, rect)) {
|
| - return;
|
| - }
|
| - if (m_DitherBits == 2) {
|
| - static FX_ARGB pal[4] = {0, 85, 170, 255};
|
| - pBitmap->DitherFS(pal, 4, &rect);
|
| - } else if (m_DitherBits == 3) {
|
| - static FX_ARGB pal[8] = {0, 36, 73, 109, 146, 182, 219, 255};
|
| - pBitmap->DitherFS(pal, 8, &rect);
|
| - } else if (m_DitherBits == 4) {
|
| - static FX_ARGB pal[16] = {0, 17, 34, 51, 68, 85, 102, 119,
|
| - 136, 153, 170, 187, 204, 221, 238, 255};
|
| - pBitmap->DitherFS(pal, 16, &rect);
|
| - }
|
| -}
|
|
|
| void CPDF_RenderStatus::ProcessObjectNoClip(const CPDF_PageObject* pObj,
|
| const CFX_Matrix* pObj2Device) {
|
| @@ -788,7 +764,7 @@ FX_BOOL CPDF_RenderStatus::ProcessTransparency(const CPDF_PageObject* pPageObj,
|
|
|
| m_pDevice->GetDIBits(oriDevice.get(), rect.left, rect.top);
|
| }
|
| - if (!bitmap_device.Create(width, height, FXDIB_Argb, 0, oriDevice.get()))
|
| + if (!bitmap_device.CreateEx(width, height, FXDIB_Argb, oriDevice.get()))
|
| return TRUE;
|
|
|
| CFX_DIBitmap* bitmap = bitmap_device.GetBitmap();
|
|
|