diff options
author | thestig <thestig@chromium.org> | 2016-08-09 15:46:20 -0700 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2016-08-09 15:46:20 -0700 |
commit | dc359b03ab6a70ee52a91119ff6704cae92f4809 (patch) | |
tree | 131cb9b1846f4be24c9cb7c54b30975c6a858071 /core/fpdfapi/fpdf_page/include/cpdf_image.h | |
parent | 39ba18a64283ef3fc3c4aedf537a09835f90862e (diff) | |
download | pdfium-dc359b03ab6a70ee52a91119ff6704cae92f4809.tar.xz |
Fix a leak with FPDFPageObj_NewImgeObj().
BUG=pdfium:545
Review-Url: https://codereview.chromium.org/2194393002
Diffstat (limited to 'core/fpdfapi/fpdf_page/include/cpdf_image.h')
-rw-r--r-- | core/fpdfapi/fpdf_page/include/cpdf_image.h | 20 |
1 files changed, 8 insertions, 12 deletions
diff --git a/core/fpdfapi/fpdf_page/include/cpdf_image.h b/core/fpdfapi/fpdf_page/include/cpdf_image.h index f475e53478..ef48a04f95 100644 --- a/core/fpdfapi/fpdf_page/include/cpdf_image.h +++ b/core/fpdfapi/fpdf_page/include/cpdf_image.h @@ -28,12 +28,9 @@ class IFX_Pause; class CPDF_Image { public: explicit CPDF_Image(CPDF_Document* pDoc); + CPDF_Image(CPDF_Document* pDoc, CPDF_Stream* pStream, bool bInline); ~CPDF_Image(); - FX_BOOL LoadImageF(CPDF_Stream* pImageStream, FX_BOOL bInline); - - void Release(); - CPDF_Image* Clone(); CPDF_Dictionary* GetInlineDict() const { return m_pInlineDict; } @@ -47,9 +44,9 @@ class CPDF_Image { int32_t GetPixelHeight() const { return m_Height; } int32_t GetPixelWidth() const { return m_Width; } - FX_BOOL IsInline() { return m_bInline; } - FX_BOOL IsMask() const { return m_bIsMask; } - FX_BOOL IsInterpol() const { return m_bInterpolate; } + bool IsInline() const { return m_bInline; } + bool IsMask() const { return m_bIsMask; } + bool IsInterpol() const { return m_bInterpolate; } CFX_DIBSource* LoadDIBSource(CFX_DIBSource** ppMask = nullptr, uint32_t* pMatteColor = nullptr, @@ -59,7 +56,6 @@ class CPDF_Image { void SetInlineDict(CPDF_Dictionary* pDict) { m_pInlineDict = pDict; } void SetImage(const CFX_DIBitmap* pDIBitmap, int32_t iCompress); - void SetJpegImage(uint8_t* pImageData, uint32_t size); void SetJpegImage(IFX_FileRead* pFile); void ResetCache(CPDF_Page* pPage, const CFX_DIBitmap* pDIBitmap); @@ -81,13 +77,13 @@ class CPDF_Image { CPDF_Dictionary* InitJPEG(uint8_t* pData, uint32_t size); CPDF_Stream* m_pStream; - FX_BOOL m_bInline; + const bool m_bInline; CPDF_Dictionary* m_pInlineDict; int32_t m_Height; int32_t m_Width; - FX_BOOL m_bIsMask; - FX_BOOL m_bInterpolate; - CPDF_Document* m_pDocument; + bool m_bIsMask; + bool m_bInterpolate; + CPDF_Document* const m_pDocument; CPDF_Dictionary* m_pOC; }; |