diff options
author | thestig <thestig@chromium.org> | 2016-05-26 20:15:19 -0700 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2016-05-26 20:15:19 -0700 |
commit | befa4506dc9d2a679c526aff96c09bcb0e9daecb (patch) | |
tree | 3c1d3e11d9802b2db95e35f4ab81ff449492ee10 /core/fxge/agg | |
parent | 7aed76f53137a71491040c776ab2f8931e91061b (diff) | |
download | pdfium-befa4506dc9d2a679c526aff96c09bcb0e9daecb.tar.xz |
Remove default arguments from CFX_FxgeDevice.
Remove unused dithering code.
Review-Url: https://codereview.chromium.org/2010813003
Diffstat (limited to 'core/fxge/agg')
-rw-r--r-- | core/fxge/agg/fx_agg_driver.cpp | 16 | ||||
-rw-r--r-- | core/fxge/agg/fx_agg_driver.h | 2 |
2 files changed, 5 insertions, 13 deletions
diff --git a/core/fxge/agg/fx_agg_driver.cpp b/core/fxge/agg/fx_agg_driver.cpp index 86326f6caf..d7a9ddb530 100644 --- a/core/fxge/agg/fx_agg_driver.cpp +++ b/core/fxge/agg/fx_agg_driver.cpp @@ -189,17 +189,15 @@ IFX_RenderDeviceDriver* IFX_RenderDeviceDriver::CreateFxgeDriver( FX_BOOL bRgbByteOrder, CFX_DIBitmap* pOriDevice, FX_BOOL bGroupKnockout) { - return new CFX_AggDeviceDriver(pBitmap, 0, bRgbByteOrder, pOriDevice, + return new CFX_AggDeviceDriver(pBitmap, bRgbByteOrder, pOriDevice, bGroupKnockout); } CFX_AggDeviceDriver::CFX_AggDeviceDriver(CFX_DIBitmap* pBitmap, - int dither_bits, FX_BOOL bRgbByteOrder, CFX_DIBitmap* pOriDevice, FX_BOOL bGroupKnockout) { m_pBitmap = pBitmap; - m_DitherBits = dither_bits; m_pClipRgn = nullptr; m_pPlatformBitmap = nullptr; m_pPlatformGraphics = nullptr; @@ -270,8 +268,6 @@ int CFX_AggDeviceDriver::GetDeviceCaps(int caps_id) { } return flags; } - case FXDC_DITHER_BITS: - return m_DitherBits; } return 0; } @@ -1784,16 +1780,15 @@ CFX_FxgeDevice::CFX_FxgeDevice() { } bool CFX_FxgeDevice::Attach(CFX_DIBitmap* pBitmap, - int dither_bits, bool bRgbByteOrder, CFX_DIBitmap* pOriDevice, bool bGroupKnockout) { - if (!pBitmap) { + if (!pBitmap) return false; - } + SetBitmap(pBitmap); IFX_RenderDeviceDriver* pDriver = new CFX_AggDeviceDriver( - pBitmap, dither_bits, bRgbByteOrder, pOriDevice, bGroupKnockout); + pBitmap, bRgbByteOrder, pOriDevice, bGroupKnockout); SetDeviceDriver(pDriver); return true; } @@ -1801,7 +1796,6 @@ bool CFX_FxgeDevice::Attach(CFX_DIBitmap* pBitmap, bool CFX_FxgeDevice::Create(int width, int height, FXDIB_Format format, - int dither_bits, CFX_DIBitmap* pOriDevice) { m_bOwnedBitmap = true; CFX_DIBitmap* pBitmap = new CFX_DIBitmap; @@ -1811,7 +1805,7 @@ bool CFX_FxgeDevice::Create(int width, } SetBitmap(pBitmap); IFX_RenderDeviceDriver* pDriver = - new CFX_AggDeviceDriver(pBitmap, dither_bits, FALSE, pOriDevice, FALSE); + new CFX_AggDeviceDriver(pBitmap, FALSE, pOriDevice, FALSE); SetDeviceDriver(pDriver); return true; } diff --git a/core/fxge/agg/fx_agg_driver.h b/core/fxge/agg/fx_agg_driver.h index a33bc09937..3462b61bb2 100644 --- a/core/fxge/agg/fx_agg_driver.h +++ b/core/fxge/agg/fx_agg_driver.h @@ -28,7 +28,6 @@ class CAgg_PathData { class CFX_AggDeviceDriver : public IFX_RenderDeviceDriver { public: CFX_AggDeviceDriver(CFX_DIBitmap* pBitmap, - int dither_bits, FX_BOOL bRgbByteOrder, CFX_DIBitmap* pOriDevice, FX_BOOL bGroupKnockout); @@ -144,7 +143,6 @@ class CFX_AggDeviceDriver : public IFX_RenderDeviceDriver { void* m_pPlatformBitmap; void* m_pDwRenderTartget; int m_FillFlags; - int m_DitherBits; FX_BOOL m_bRgbByteOrder; CFX_DIBitmap* m_pOriDevice; FX_BOOL m_bGroupKnockout; |