summaryrefslogtreecommitdiff
path: root/core/fpdfapi/page/cpdf_imageobject.h
diff options
context:
space:
mode:
Diffstat (limited to 'core/fpdfapi/page/cpdf_imageobject.h')
-rw-r--r--core/fpdfapi/page/cpdf_imageobject.h11
1 files changed, 4 insertions, 7 deletions
diff --git a/core/fpdfapi/page/cpdf_imageobject.h b/core/fpdfapi/page/cpdf_imageobject.h
index 1bbfc0509c..484fb7baa6 100644
--- a/core/fpdfapi/page/cpdf_imageobject.h
+++ b/core/fpdfapi/page/cpdf_imageobject.h
@@ -27,19 +27,16 @@ class CPDF_ImageObject : public CPDF_PageObject {
const CPDF_ImageObject* AsImage() const override;
void CalcBoundingBox();
- CPDF_Image* GetImage() const { return m_pImage; }
- void SetOwnedImage(std::unique_ptr<CPDF_Image> pImage);
- void SetUnownedImage(CPDF_Image* pImage);
-
+ CFX_RetainPtr<CPDF_Image> GetImage() const { return m_pImage; }
+ void SetImage(const CFX_RetainPtr<CPDF_Image>& pImage);
void set_matrix(const CFX_Matrix& matrix) { m_Matrix = matrix; }
const CFX_Matrix& matrix() const { return m_Matrix; }
private:
- void Release();
+ void MaybePurgeCache();
CFX_Matrix m_Matrix;
- CPDF_Image* m_pImage;
- bool m_pImageOwned;
+ CFX_RetainPtr<CPDF_Image> m_pImage;
};
#endif // CORE_FPDFAPI_PAGE_CPDF_IMAGEOBJECT_H_