summaryrefslogtreecommitdiff
path: root/core/include/fxge/fx_dib.h
diff options
context:
space:
mode:
authorTom Sepez <tsepez@chromium.org>2015-07-23 13:26:26 -0700
committerTom Sepez <tsepez@chromium.org>2015-07-23 13:26:26 -0700
commit320b2313d19869333ed453af546e61a9fc2b81c9 (patch)
tree25f2eb8a0991ac485ca6354f0d3caf7fd775e732 /core/include/fxge/fx_dib.h
parent065e9321b84fc0490f3da9099e8840c65e06868d (diff)
downloadpdfium-320b2313d19869333ed453af546e61a9fc2b81c9.tar.xz
FX_BOOL considered harmful, part 2.
Fully automatic change, execpt for cleanup in fx_system.h R=thestig@chromium.org Review URL: https://codereview.chromium.org/1254703002 .
Diffstat (limited to 'core/include/fxge/fx_dib.h')
-rw-r--r--core/include/fxge/fx_dib.h118
1 files changed, 59 insertions, 59 deletions
diff --git a/core/include/fxge/fx_dib.h b/core/include/fxge/fx_dib.h
index 27fc2f987d..554fe30602 100644
--- a/core/include/fxge/fx_dib.h
+++ b/core/include/fxge/fx_dib.h
@@ -179,13 +179,13 @@ public:
virtual const uint8_t* GetScanline(int line) const = 0;
- virtual FX_BOOL SkipToScanline(int line, IFX_Pause* pPause) const
+ virtual bool SkipToScanline(int line, IFX_Pause* pPause) const
{
- return FALSE;
+ return false;
}
virtual void DownSampleScanline(int line, uint8_t* dest_scan, int dest_bpp,
- int dest_width, FX_BOOL bFlipX, int clip_left, int clip_width) const = 0;
+ int dest_width, bool bFlipX, int clip_left, int clip_width) const = 0;
virtual void SetDownSampleSize(int width, int height) const {}
@@ -194,24 +194,24 @@ public:
return m_bpp;
}
- FX_BOOL IsAlphaMask() const
+ bool IsAlphaMask() const
{
return m_AlphaFlag == 1;
}
- FX_BOOL HasAlpha() const
+ bool HasAlpha() const
{
- return m_AlphaFlag & 2 ? TRUE : FALSE;
+ return m_AlphaFlag & 2 ? true : false;
}
- FX_BOOL IsOpaqueImage() const
+ bool IsOpaqueImage() const
{
return !(m_AlphaFlag & 3);
}
- FX_BOOL IsCmykImage() const
+ bool IsCmykImage() const
{
- return m_AlphaFlag & 4 ? TRUE : FALSE;
+ return m_AlphaFlag & 4 ? true : false;
}
@@ -248,11 +248,11 @@ public:
CFX_DIBitmap* GetAlphaMask(const FX_RECT* pClip = NULL) const;
- FX_BOOL CopyAlphaMask(const CFX_DIBSource* pAlphaMask, const FX_RECT* pClip = NULL);
+ bool CopyAlphaMask(const CFX_DIBSource* pAlphaMask, const FX_RECT* pClip = NULL);
- CFX_DIBitmap* SwapXY(FX_BOOL bXFlip, FX_BOOL bYFlip, const FX_RECT* pClip = NULL) const;
+ CFX_DIBitmap* SwapXY(bool bXFlip, bool bYFlip, const FX_RECT* pClip = NULL) const;
- CFX_DIBitmap* FlipImage(FX_BOOL bXFlip, FX_BOOL bYFlip) const;
+ CFX_DIBitmap* FlipImage(bool bXFlip, bool bYFlip) const;
void GetOverlapRect(int& dest_left, int& dest_top, int& width, int& height, int src_width,
int src_height, int& src_left, int& src_top, const CFX_ClipRgn* pClipRgn);
@@ -276,7 +276,7 @@ protected:
void BuildPalette();
- FX_BOOL BuildAlphaMask();
+ bool BuildAlphaMask();
int FindPalette(FX_DWORD color) const;
@@ -292,9 +292,9 @@ public:
CFX_DIBitmap(const CFX_DIBitmap& src);
- FX_BOOL Create(int width, int height, FXDIB_Format format, uint8_t* pBuffer = NULL, int pitch = 0);
+ bool Create(int width, int height, FXDIB_Format format, uint8_t* pBuffer = NULL, int pitch = 0);
- FX_BOOL Copy(const CFX_DIBSource* pSrc);
+ bool Copy(const CFX_DIBSource* pSrc);
virtual uint8_t* GetBuffer() const
{
@@ -307,11 +307,11 @@ public:
}
virtual void DownSampleScanline(int line, uint8_t* dest_scan, int dest_bpp,
- int dest_width, FX_BOOL bFlipX, int clip_left, int clip_width) const;
+ int dest_width, bool bFlipX, int clip_left, int clip_width) const;
void TakeOver(CFX_DIBitmap* pSrcBitmap);
- FX_BOOL ConvertFormat(FXDIB_Format format, void* pIccTransform = NULL);
+ bool ConvertFormat(FXDIB_Format format, void* pIccTransform = NULL);
void Clear(FX_DWORD color);
@@ -319,40 +319,40 @@ public:
void SetPixel(int x, int y, FX_DWORD color);
- FX_BOOL LoadChannel(FXDIB_Channel destChannel, const CFX_DIBSource* pSrcBitmap, FXDIB_Channel srcChannel);
+ bool LoadChannel(FXDIB_Channel destChannel, const CFX_DIBSource* pSrcBitmap, FXDIB_Channel srcChannel);
- FX_BOOL LoadChannel(FXDIB_Channel destChannel, int value);
+ bool LoadChannel(FXDIB_Channel destChannel, int value);
- FX_BOOL MultiplyAlpha(int alpha);
+ bool MultiplyAlpha(int alpha);
- FX_BOOL MultiplyAlpha(const CFX_DIBSource* pAlphaMask);
+ bool MultiplyAlpha(const CFX_DIBSource* pAlphaMask);
- FX_BOOL TransferBitmap(int dest_left, int dest_top, int width, int height,
+ bool TransferBitmap(int dest_left, int dest_top, int width, int height,
const CFX_DIBSource* pSrcBitmap, int src_left, int src_top, void* pIccTransform = NULL);
- FX_BOOL CompositeBitmap(int dest_left, int dest_top, int width, int height,
+ bool CompositeBitmap(int dest_left, int dest_top, int width, int height,
const CFX_DIBSource* pSrcBitmap, int src_left, int src_top,
- int blend_type = FXDIB_BLEND_NORMAL, const CFX_ClipRgn* pClipRgn = NULL, FX_BOOL bRgbByteOrder = FALSE, void* pIccTransform = NULL);
+ int blend_type = FXDIB_BLEND_NORMAL, const CFX_ClipRgn* pClipRgn = NULL, bool bRgbByteOrder = false, void* pIccTransform = NULL);
- FX_BOOL TransferMask(int dest_left, int dest_top, int width, int height,
+ bool 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 = 0, void* pIccTransform = NULL);
- FX_BOOL CompositeMask(int dest_left, int dest_top, int width, int height,
+ bool CompositeMask(int dest_left, int dest_top, int width, int height,
const CFX_DIBSource* pMask, FX_DWORD color, int src_left, int src_top,
- int blend_type = FXDIB_BLEND_NORMAL, const CFX_ClipRgn* pClipRgn = NULL, FX_BOOL bRgbByteOrder = FALSE, int alpha_flag = 0, void* pIccTransform = NULL);
+ int blend_type = FXDIB_BLEND_NORMAL, const CFX_ClipRgn* pClipRgn = NULL, bool bRgbByteOrder = false, int alpha_flag = 0, void* pIccTransform = NULL);
- FX_BOOL CompositeRect(int dest_left, int dest_top, int width, int height, FX_DWORD color, int alpha_flag = 0, void* pIccTransform = NULL);
+ bool CompositeRect(int dest_left, int dest_top, int width, int height, FX_DWORD color, int alpha_flag = 0, void* pIccTransform = NULL);
- FX_BOOL ConvertColorScale(FX_DWORD forecolor, FX_DWORD backcolor);
+ bool ConvertColorScale(FX_DWORD forecolor, FX_DWORD backcolor);
- FX_BOOL DitherFS(const FX_DWORD* pPalette, int pal_size, const FX_RECT* pRect = NULL);
+ bool DitherFS(const FX_DWORD* pPalette, int pal_size, const FX_RECT* pRect = NULL);
protected:
uint8_t* m_pBuffer;
- FX_BOOL m_bExtBuf;
+ bool m_bExtBuf;
- FX_BOOL GetGrayData(void* pIccTransform = NULL);
+ bool GetGrayData(void* pIccTransform = NULL);
};
class CFX_DIBExtractor
{
@@ -379,7 +379,7 @@ public:
~CFX_FilteredDIB();
- void LoadSrc(const CFX_DIBSource* pSrc, FX_BOOL bAutoDropSrc = FALSE);
+ void LoadSrc(const CFX_DIBSource* pSrc, bool bAutoDropSrc = false);
virtual FXDIB_Format GetDestFormat() = 0;
@@ -392,11 +392,11 @@ public:
protected:
virtual const uint8_t* GetScanline(int line) const;
virtual void DownSampleScanline(int line, uint8_t* dest_scan, int dest_bpp,
- int dest_width, FX_BOOL bFlipX, int clip_left, int clip_width) const;
+ int dest_width, bool bFlipX, int clip_left, int clip_width) const;
const CFX_DIBSource* m_pSrc;
- FX_BOOL m_bAutoDropSrc;
+ bool m_bAutoDropSrc;
uint8_t* m_pScanline;
};
@@ -407,7 +407,7 @@ public:
virtual void ComposeScanline(int line, const uint8_t* scanline, const uint8_t* scan_extra_alpha = NULL) = 0;
- virtual FX_BOOL SetInfo(int width, int height, FXDIB_Format src_format, FX_DWORD* pSrcPalette) = 0;
+ virtual bool SetInfo(int width, int height, FXDIB_Format src_format, FX_DWORD* pSrcPalette) = 0;
};
class CFX_ScanlineCompositor
{
@@ -416,8 +416,8 @@ public:
~CFX_ScanlineCompositor();
- FX_BOOL Init(FXDIB_Format dest_format, FXDIB_Format src_format, int32_t width, FX_DWORD* pSrcPalette,
- FX_DWORD mask_color, int blend_type, FX_BOOL bClip, FX_BOOL bRgbByteOrder = FALSE, int alpha_flag = 0, void* pIccTransform = NULL);
+ bool Init(FXDIB_Format dest_format, FXDIB_Format src_format, int32_t width, FX_DWORD* pSrcPalette,
+ FX_DWORD mask_color, int blend_type, bool bClip, bool bRgbByteOrder = false, int alpha_flag = 0, void* pIccTransform = NULL);
void CompositeRgbBitmapLine(uint8_t* dest_scan, const uint8_t* src_scan, int width, const uint8_t* clip_scan,
@@ -449,7 +449,7 @@ protected:
void* m_pIccTransform;
uint8_t* m_pCacheScanline;
int m_CacheSize;
- FX_BOOL m_bRgbByteOrder;
+ bool m_bRgbByteOrder;
};
class CFX_BitmapComposer : public IFX_ScanlineComposer
{
@@ -461,11 +461,11 @@ public:
void Compose(CFX_DIBitmap* pDest, const CFX_ClipRgn* pClipRgn, int bitmap_alpha,
- FX_DWORD mask_color, FX_RECT& dest_rect, FX_BOOL bVertical,
- FX_BOOL bFlipX, FX_BOOL bFlipY, FX_BOOL bRgbByteOrder = FALSE,
+ FX_DWORD mask_color, FX_RECT& dest_rect, bool bVertical,
+ bool bFlipX, bool bFlipY, bool bRgbByteOrder = false,
int alpha_flag = 0, void* pIccTransform = NULL, int blend_type = FXDIB_BLEND_NORMAL);
- virtual FX_BOOL SetInfo(int width, int height, FXDIB_Format src_format, FX_DWORD* pSrcPalette);
+ virtual bool SetInfo(int width, int height, FXDIB_Format src_format, FX_DWORD* pSrcPalette);
virtual void ComposeScanline(int line, const uint8_t* scanline, const uint8_t* scan_extra_alpha);
@@ -480,10 +480,10 @@ protected:
FX_DWORD m_MaskColor;
const CFX_DIBitmap* m_pClipMask;
CFX_ScanlineCompositor m_Compositor;
- FX_BOOL m_bVertical, m_bFlipX, m_bFlipY;
+ bool m_bVertical, m_bFlipX, m_bFlipY;
int m_AlphaFlag;
void* m_pIccTransform;
- FX_BOOL m_bRgbByteOrder;
+ bool m_bRgbByteOrder;
int m_BlendType;
void ComposeScanlineV(int line, const uint8_t* scanline, const uint8_t* scan_extra_alpha = NULL);
uint8_t* m_pScanlineV;
@@ -501,7 +501,7 @@ public:
virtual void ComposeScanline(int line, const uint8_t* scanline, const uint8_t* scan_extra_alpha);
- virtual FX_BOOL SetInfo(int width, int height, FXDIB_Format src_format, FX_DWORD* pSrcPalette);
+ virtual bool SetInfo(int width, int height, FXDIB_Format src_format, FX_DWORD* pSrcPalette);
CFX_DIBitmap* GetBitmap()
{
@@ -521,22 +521,22 @@ public:
CFX_ImageStretcher();
~CFX_ImageStretcher();
- FX_BOOL Start(IFX_ScanlineComposer* pDest, const CFX_DIBSource* pBitmap,
+ bool Start(IFX_ScanlineComposer* pDest, const CFX_DIBSource* pBitmap,
int dest_width, int dest_height, const FX_RECT& bitmap_rect,
FX_DWORD flags);
- FX_BOOL Continue(IFX_Pause* pPause);
- FX_BOOL StartQuickStretch();
- FX_BOOL StartStretch();
- FX_BOOL ContinueQuickStretch(IFX_Pause* pPause);
- FX_BOOL ContinueStretch(IFX_Pause* pPause);
+ bool Continue(IFX_Pause* pPause);
+ bool StartQuickStretch();
+ bool StartStretch();
+ bool ContinueQuickStretch(IFX_Pause* pPause);
+ bool ContinueStretch(IFX_Pause* pPause);
IFX_ScanlineComposer* m_pDest;
const CFX_DIBSource* m_pSource;
CStretchEngine* m_pStretchEngine;
FX_DWORD m_Flags;
- FX_BOOL m_bFlipX;
- FX_BOOL m_bFlipY;
+ bool m_bFlipX;
+ bool m_bFlipY;
int m_DestWidth;
int m_DestHeight;
FX_RECT m_ClipRect;
@@ -552,10 +552,10 @@ public:
CFX_ImageTransformer();
~CFX_ImageTransformer();
- FX_BOOL Start(const CFX_DIBSource* pSrc, const CFX_AffineMatrix* pMatrix,
+ bool Start(const CFX_DIBSource* pSrc, const CFX_AffineMatrix* pMatrix,
int flags, const FX_RECT* pClip);
- FX_BOOL Continue(IFX_Pause* pPause);
+ bool Continue(IFX_Pause* pPause);
CFX_AffineMatrix* m_pMatrix;
FX_RECT m_StretchClip;
@@ -575,14 +575,14 @@ public:
CFX_ImageRenderer();
~CFX_ImageRenderer();
- FX_BOOL Start(CFX_DIBitmap* pDevice, const CFX_ClipRgn* pClipRgn,
+ bool Start(CFX_DIBitmap* pDevice, const CFX_ClipRgn* pClipRgn,
const CFX_DIBSource* pSource, int bitmap_alpha,
FX_DWORD mask_color, const CFX_AffineMatrix* pMatrix,
- FX_DWORD dib_flags, FX_BOOL bRgbByteOrder = FALSE,
+ FX_DWORD dib_flags, bool bRgbByteOrder = false,
int alpha_flag = 0, void* pIccTransform = NULL,
int blend_type = FXDIB_BLEND_NORMAL);
- FX_BOOL Continue(IFX_Pause* pPause);
+ bool Continue(IFX_Pause* pPause);
protected:
CFX_DIBitmap* m_pDevice;
@@ -598,7 +598,7 @@ protected:
FX_DWORD m_Flags;
int m_AlphaFlag;
void* m_pIccTransform;
- FX_BOOL m_bRgbByteOrder;
+ bool m_bRgbByteOrder;
int m_BlendType;
};