summaryrefslogtreecommitdiff
path: root/core/include
diff options
context:
space:
mode:
authorTom Sepez <tsepez@chromium.org>2015-07-23 16:07:32 -0700
committerTom Sepez <tsepez@chromium.org>2015-07-23 16:07:32 -0700
commit1f3442ce5c035d22e2cc9fffc203892f2f749373 (patch)
tree7c66063cf1e29cc48c81ca84e9d766a2e23f4b95 /core/include
parent2f2ffece124e4ed4b96d2846263015d4b5ad6c00 (diff)
downloadpdfium-1f3442ce5c035d22e2cc9fffc203892f2f749373.tar.xz
Merge to XFA: FX_BOOL combo patch.
Original Review URL: https://codereview.chromium.org/1257503002 Original Review URL: https://codereview.chromium.org/1253603002 Manual merge for: core/include/fxge/fx_font.h core/src/fxcodec/codec/codec_int.h fpdfsdk/src/javascript/PublicMethods.cpp R=thestig@chromium.org Review URL: https://codereview.chromium.org/1248153004 .
Diffstat (limited to 'core/include')
-rw-r--r--core/include/fpdfapi/fpdf_page.h47
-rw-r--r--core/include/fxge/fx_dib.h57
-rw-r--r--core/include/fxge/fx_font.h29
3 files changed, 57 insertions, 76 deletions
diff --git a/core/include/fpdfapi/fpdf_page.h b/core/include/fpdfapi/fpdf_page.h
index 7aed626fae..bd8b5c9878 100644
--- a/core/include/fpdfapi/fpdf_page.h
+++ b/core/include/fpdfapi/fpdf_page.h
@@ -24,37 +24,20 @@ class CPDF_StreamContentParser;
#define PDFTRANS_GROUP 0x0100
#define PDFTRANS_ISOLATED 0x0200
#define PDFTRANS_KNOCKOUT 0x0400
-#define PDF_CONTENT_NOT_PARSED 0
-#define PDF_CONTENT_PARSING 1
-#define PDF_CONTENT_PARSED 2
+
class CPDF_PageObjects
{
public:
-
CPDF_PageObjects(FX_BOOL bReleaseMembers = TRUE);
-
~CPDF_PageObjects();
-
-
-
void ContinueParse(IFX_Pause* pPause);
- int GetParseState() const
- {
- return m_ParseState;
- }
-
FX_BOOL IsParsed() const
{
- return m_ParseState == PDF_CONTENT_PARSED;
+ return m_ParseState == CONTENT_PARSED;
}
- int EstimateParseProgress() const;
-
-
-
-
FX_POSITION GetFirstObjectPosition() const
{
return m_ObjectList.GetHeadPosition();
@@ -89,10 +72,6 @@ public:
CPDF_PageObject* GetObjectByIndex(int index) const;
-
-
-
-
FX_POSITION InsertObject(FX_POSITION posInsertAfter, CPDF_PageObject* pNewObject);
void Transform(const CFX_AffineMatrix& matrix);
@@ -105,17 +84,11 @@ public:
CFX_FloatRect CalcBoundingBox() const;
CPDF_Dictionary* m_pFormDict;
-
CPDF_Stream* m_pFormStream;
-
CPDF_Document* m_pDocument;
-
CPDF_Dictionary* m_pPageResources;
-
CPDF_Dictionary* m_pResources;
-
CFX_FloatRect m_BBox;
-
int m_Transparency;
protected:
@@ -123,18 +96,22 @@ protected:
friend class CPDF_StreamContentParser;
friend class CPDF_AllStates;
- CFX_PtrList m_ObjectList;
-
- FX_BOOL m_bBackgroundAlphaNeeded;
+ enum ParseState {
+ CONTENT_NOT_PARSED,
+ CONTENT_PARSING,
+ CONTENT_PARSED
+ };
- FX_BOOL m_bReleaseMembers;
void LoadTransInfo();
void ClearCacheObjects();
+ CFX_PtrList m_ObjectList;
+ FX_BOOL m_bBackgroundAlphaNeeded;
+ FX_BOOL m_bReleaseMembers;
CPDF_ContentParser* m_pParser;
-
- FX_BOOL m_ParseState;
+ ParseState m_ParseState;
};
+
class CPDF_Page : public CPDF_PageObjects, public CFX_PrivateData
{
public:
diff --git a/core/include/fxge/fx_dib.h b/core/include/fxge/fx_dib.h
index 2d7330e0c3..27fc2f987d 100644
--- a/core/include/fxge/fx_dib.h
+++ b/core/include/fxge/fx_dib.h
@@ -518,54 +518,51 @@ class CStretchEngine;
class CFX_ImageStretcher
{
public:
-
CFX_ImageStretcher();
-
~CFX_ImageStretcher();
- int32_t Start(IFX_ScanlineComposer* pDest, const CFX_DIBSource* pBitmap,
- int dest_width, int dest_height, const FX_RECT& bitmap_rect, FX_DWORD flags);
+ FX_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);
- int32_t Continue(IFX_Pause* pPause);
IFX_ScanlineComposer* m_pDest;
const CFX_DIBSource* m_pSource;
CStretchEngine* m_pStretchEngine;
FX_DWORD m_Flags;
- FX_BOOL m_bFlipX,
- m_bFlipY;
- int m_DestWidth,
- m_DestHeight;
+ FX_BOOL m_bFlipX;
+ FX_BOOL m_bFlipY;
+ int m_DestWidth;
+ int m_DestHeight;
FX_RECT m_ClipRect;
int m_LineIndex;
int m_DestBPP;
uint8_t* m_pScanline;
uint8_t* m_pMaskScanline;
FXDIB_Format m_DestFormat;
-
- int32_t StartQuickStretch();
-
- int32_t StartStretch();
-
- int32_t ContinueQuickStretch(IFX_Pause* pPause);
-
- int32_t ContinueStretch(IFX_Pause* pPause);
};
class CFX_ImageTransformer
{
public:
-
CFX_ImageTransformer();
-
~CFX_ImageTransformer();
- int32_t Start(const CFX_DIBSource* pSrc, const CFX_AffineMatrix* pMatrix, int flags, const FX_RECT* pClip);
+ FX_BOOL Start(const CFX_DIBSource* pSrc, const CFX_AffineMatrix* pMatrix,
+ int flags, const FX_RECT* pClip);
+ FX_BOOL Continue(IFX_Pause* pPause);
- int32_t Continue(IFX_Pause* pPause);
CFX_AffineMatrix* m_pMatrix;
FX_RECT m_StretchClip;
- int m_ResultLeft, m_ResultTop, m_ResultWidth, m_ResultHeight;
+ int m_ResultLeft;
+ int m_ResultTop;
+ int m_ResultWidth;
+ int m_ResultHeight;
CFX_AffineMatrix m_dest2stretch;
CFX_ImageStretcher m_Stretcher;
CFX_BitmapStorer m_Storer;
@@ -575,18 +572,18 @@ public:
class CFX_ImageRenderer
{
public:
-
CFX_ImageRenderer();
-
~CFX_ImageRenderer();
- int32_t 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, int alpha_flag = 0, void* pIccTransform = NULL,
- int blend_type = FXDIB_BLEND_NORMAL);
+ FX_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,
+ int alpha_flag = 0, void* pIccTransform = NULL,
+ int blend_type = FXDIB_BLEND_NORMAL);
+
+ FX_BOOL Continue(IFX_Pause* pPause);
- int32_t Continue(IFX_Pause* pPause);
protected:
CFX_DIBitmap* m_pDevice;
const CFX_ClipRgn* m_pClipRgn;
diff --git a/core/include/fxge/fx_font.h b/core/include/fxge/fx_font.h
index 0d911c7281..0f7c18eb04 100644
--- a/core/include/fxge/fx_font.h
+++ b/core/include/fxge/fx_font.h
@@ -336,7 +336,7 @@ public:
virtual void Release() = 0;
virtual FX_BOOL EnumFontList(CFX_FontMapper* pMapper) = 0;
- virtual void* MapFont(int weight, FX_BOOL bItalic, int charset, int pitch_family, const FX_CHAR* face, FX_BOOL& bExact) = 0;
+ virtual void* MapFont(int weight, FX_BOOL bItalic, int charset, int pitch_family, const FX_CHAR* face, int& iExact) = 0;
virtual void* MapFontByUnicode(FX_DWORD dwUnicode, int weight, FX_BOOL bItalic, int pitch_family)
{
return NULL;
@@ -362,16 +362,23 @@ class CFX_FolderFontInfo : public IFX_SystemFontInfo
public:
CFX_FolderFontInfo();
virtual ~CFX_FolderFontInfo();
- void AddPath(const CFX_ByteStringC& path);
- virtual void Release();
- virtual FX_BOOL EnumFontList(CFX_FontMapper* pMapper);
- virtual void* MapFont(int weight, FX_BOOL bItalic, int charset, int pitch_family, const FX_CHAR* face, FX_BOOL& bExact);
- virtual void* MapFontByUnicode(FX_DWORD dwUnicode, int weight, FX_BOOL bItalic, int pitch_family);
- virtual void* GetFont(const FX_CHAR* face);
- virtual FX_DWORD GetFontData(void* hFont, FX_DWORD table, uint8_t* buffer, FX_DWORD size);
- virtual void DeleteFont(void* hFont);
- virtual FX_BOOL GetFaceName(void* hFont, CFX_ByteString& name);
- virtual FX_BOOL GetFontCharset(void* hFont, int& charset);
+
+ void AddPath(const CFX_ByteStringC& path);
+
+ // IFX_SytemFontInfo:
+ void Release() override;
+ FX_BOOL EnumFontList(CFX_FontMapper* pMapper) override;
+ void* MapFont(int weight, FX_BOOL bItalic, int charset, int pitch_family,
+ const FX_CHAR* face, int& bExact) override;
+ void* MapFontByUnicode(FX_DWORD dwUnicode, int weight, FX_BOOL bItalic,
+ int pitch_family) override;
+ void* GetFont(const FX_CHAR* face) override;
+ FX_DWORD GetFontData(void* hFont, FX_DWORD table,
+ uint8_t* buffer, FX_DWORD size) override;
+ void DeleteFont(void* hFont) override;
+ FX_BOOL GetFaceName(void* hFont, CFX_ByteString& name) override;
+ FX_BOOL GetFontCharset(void* hFont, int& charset) override;
+
protected:
CFX_MapByteStringToPtr m_FontList;
CFX_ByteStringArray m_PathList;