summaryrefslogtreecommitdiff
path: root/core/include/fxge
diff options
context:
space:
mode:
authorTom Sepez <tsepez@chromium.org>2015-04-14 12:54:38 -0700
committerTom Sepez <tsepez@chromium.org>2015-04-14 12:54:38 -0700
commit4926900ab54a493d236291b5a24dfa4476792182 (patch)
treee53800a0569300516c934bfccbb036ce39d98cb3 /core/include/fxge
parenteddab4425614e49146f904f00da4a664ba4b581b (diff)
downloadpdfium-4926900ab54a493d236291b5a24dfa4476792182.tar.xz
Kill CFX_Object.
CFX_Object is a type that implements its own new operators that return NULL on error. There's no need for this given the |new (std::nothrow)| syntax; in fact, the current code can only work if there is no activity in the constructors. This may explain the pervasive lack of constructors and reliance on Init() methods throughout the codebase. The activity takes place in fx_memory.h, where FX_NEW is mapped onto the std::nothrow syntax. The rest is just cleanup. Down the road, we will simply throw and remove all the error-checking paths for new objects. Landing this patch first will at least show a simple path back to the old behaviour without having to re-introduce CFX_Object should someone want to do so in their own fork. R=thestig@chromium.org Review URL: https://codereview.chromium.org/1088733002
Diffstat (limited to 'core/include/fxge')
-rw-r--r--core/include/fxge/fx_dib.h16
-rw-r--r--core/include/fxge/fx_font.h20
-rw-r--r--core/include/fxge/fx_ge.h14
3 files changed, 25 insertions, 25 deletions
diff --git a/core/include/fxge/fx_dib.h b/core/include/fxge/fx_dib.h
index f7e435d966..d6e99b7f73 100644
--- a/core/include/fxge/fx_dib.h
+++ b/core/include/fxge/fx_dib.h
@@ -136,7 +136,7 @@ FX_ARGB ArgbEncode(int a, FX_COLORREF rgb);
#define FXSETFLAG_COLORTYPE(flag, val) flag = (((val)<<8)|(flag&0xffff00ff))
#define FXSETFLAG_ALPHA_FILL(flag, val) flag = ((val)|(flag&0xffffff00))
#define FXSETFLAG_ALPHA_STROKE(flag, val) flag = (((val)<<16)|(flag&0xff00ffff))
-class CFX_DIBSource : public CFX_Object
+class CFX_DIBSource
{
public:
@@ -353,7 +353,7 @@ protected:
FX_BOOL GetGrayData(void* pIccTransform = NULL);
};
-class CFX_DIBExtractor : public CFX_Object
+class CFX_DIBExtractor
{
public:
@@ -408,7 +408,7 @@ public:
virtual FX_BOOL SetInfo(int width, int height, FXDIB_Format src_format, FX_DWORD* pSrcPalette) = 0;
};
-class CFX_ScanlineCompositor : public CFX_Object
+class CFX_ScanlineCompositor
{
public:
CFX_ScanlineCompositor();
@@ -450,7 +450,7 @@ protected:
int m_CacheSize;
FX_BOOL m_bRgbByteOrder;
};
-class CFX_BitmapComposer : public IFX_ScanlineComposer, public CFX_Object
+class CFX_BitmapComposer : public IFX_ScanlineComposer
{
public:
@@ -487,7 +487,7 @@ protected:
void ComposeScanlineV(int line, FX_LPCBYTE scanline, FX_LPCBYTE scan_extra_alpha = NULL);
FX_LPBYTE m_pScanlineV, m_pClipScanV, m_pAddClipScan, m_pScanlineAlphaV;
};
-class CFX_BitmapStorer : public IFX_ScanlineComposer, public CFX_Object
+class CFX_BitmapStorer : public IFX_ScanlineComposer
{
public:
@@ -511,7 +511,7 @@ private:
CFX_DIBitmap* m_pBitmap;
};
class CStretchEngine;
-class CFX_ImageStretcher : public CFX_Object
+class CFX_ImageStretcher
{
public:
@@ -548,7 +548,7 @@ public:
FX_INT32 ContinueStretch(IFX_Pause* pPause);
};
-class CFX_ImageTransformer : public CFX_Object
+class CFX_ImageTransformer
{
public:
@@ -569,7 +569,7 @@ public:
FX_DWORD m_Flags;
int m_Status;
};
-class CFX_ImageRenderer : public CFX_Object
+class CFX_ImageRenderer
{
public:
diff --git a/core/include/fxge/fx_font.h b/core/include/fxge/fx_font.h
index bf9bb40500..6e0c1ba881 100644
--- a/core/include/fxge/fx_font.h
+++ b/core/include/fxge/fx_font.h
@@ -50,7 +50,7 @@ class CFontFileFaceInfo;
#define FXFONT_FF_SCRIPT (4<<4)
#define FXFONT_FW_NORMAL 400
#define FXFONT_FW_BOLD 700
-class CFX_Font : public CFX_Object
+class CFX_Font
{
public:
CFX_Font();
@@ -145,7 +145,7 @@ protected:
};
#define ENCODING_INTERNAL 0
#define ENCODING_UNICODE 1
-class IFX_FontEncoding : public CFX_Object
+class IFX_FontEncoding
{
public:
virtual ~IFX_FontEncoding() {}
@@ -164,7 +164,7 @@ IFX_FontEncoding* FXGE_CreateUnicodeEncoding(CFX_Font* pFont);
#define FXFONT_SUBST_NONSYMBOL 0x20
#define FXFONT_SUBST_EXACT 0x40
#define FXFONT_SUBST_STANDARD 0x80
-class CFX_SubstFont : public CFX_Object
+class CFX_SubstFont
{
public:
@@ -199,7 +199,7 @@ typedef struct {
FX_LPCBYTE m_pFontData;
FX_DWORD m_dwSize;
} FoxitFonts;
-class CFX_FontMgr : public CFX_Object
+class CFX_FontMgr
{
public:
CFX_FontMgr();
@@ -229,7 +229,7 @@ public:
FXFT_Library m_FTLibrary;
FoxitFonts m_ExternalFonts[16];
};
-class IFX_FontMapper : public CFX_Object
+class IFX_FontMapper
{
public:
@@ -293,7 +293,7 @@ private:
FXFT_Face m_FoxitFaces[14];
IFX_FontEnumerator* m_pFontEnumerator;
};
-class IFX_SystemFontInfo : public CFX_Object
+class IFX_SystemFontInfo
{
public:
static IFX_SystemFontInfo* CreateDefault();
@@ -339,14 +339,14 @@ protected:
void ScanFile(CFX_ByteString& path);
void ReportFace(CFX_ByteString& path, FXSYS_FILE* pFile, FX_DWORD filesize, FX_DWORD offset);
};
-class CFX_CountedFaceCache : public CFX_Object
+class CFX_CountedFaceCache
{
public:
CFX_FaceCache* m_Obj;
FX_DWORD m_nCount;
};
typedef CFX_MapPtrTemplate<FXFT_Face, CFX_CountedFaceCache*> CFX_FTCacheMap;
-class CFX_FontCache : public CFX_Object
+class CFX_FontCache
{
public:
~CFX_FontCache();
@@ -374,14 +374,14 @@ public:
CFX_Font* m_pFont;
};
#define FX_FONTCACHE_DEFINE(pFontCache, pFont) CFX_AutoFontCache autoFontCache((pFontCache), (pFont))
-class CFX_GlyphBitmap : public CFX_Object
+class CFX_GlyphBitmap
{
public:
int m_Top;
int m_Left;
CFX_DIBitmap m_Bitmap;
};
-class CFX_FaceCache : public CFX_Object
+class CFX_FaceCache
{
public:
~CFX_FaceCache();
diff --git a/core/include/fxge/fx_ge.h b/core/include/fxge/fx_ge.h
index 0c4bce8003..f9c4e9b9ae 100644
--- a/core/include/fxge/fx_ge.h
+++ b/core/include/fxge/fx_ge.h
@@ -23,7 +23,7 @@ class CFX_RenderDevice;
class IFX_RenderDeviceDriver;
class CCodec_ModuleMgr;
class IFXG_PaintModuleMgr;
-class CFX_GEModule : public CFX_Object
+class CFX_GEModule
{
public:
@@ -87,7 +87,7 @@ typedef struct {
#define FXPT_TYPE 0x06
#define FXFILL_ALTERNATE 1
#define FXFILL_WINDING 2
-class CFX_ClipRgn : public CFX_Object
+class CFX_ClipRgn
{
public:
@@ -146,7 +146,7 @@ inline FX_ARGB ArgbGammaInverse(FX_ARGB argb)
{
return argb;
}
-class CFX_PathData : public CFX_Object
+class CFX_PathData
{
public:
@@ -222,7 +222,7 @@ protected:
int m_AllocCount;
};
-class CFX_GraphStateData : public CFX_Object
+class CFX_GraphStateData
{
public:
@@ -305,7 +305,7 @@ typedef struct {
FX_DWORD m_ExtGID;
FX_BOOL m_bFontStyle;
} FXTEXT_CHARPOS;
-class CFX_RenderDevice : public CFX_Object
+class CFX_RenderDevice
{
public:
CFX_RenderDevice();
@@ -505,7 +505,7 @@ protected:
FX_BOOL m_bOwnedBitmap;
};
-class IFX_RenderDeviceDriver : public CFX_Object
+class IFX_RenderDeviceDriver
{
public:
@@ -644,7 +644,7 @@ protected:
~IFX_PSOutput() { }
};
class CPSFont;
-class CFX_PSRenderer : public CFX_Object
+class CFX_PSRenderer
{
public: