summaryrefslogtreecommitdiff
path: root/core/fpdfapi/page/cpdf_image.h
diff options
context:
space:
mode:
Diffstat (limited to 'core/fpdfapi/page/cpdf_image.h')
-rw-r--r--core/fpdfapi/page/cpdf_image.h9
1 files changed, 5 insertions, 4 deletions
diff --git a/core/fpdfapi/page/cpdf_image.h b/core/fpdfapi/page/cpdf_image.h
index 7b7e090b49..c09ce1a46d 100644
--- a/core/fpdfapi/page/cpdf_image.h
+++ b/core/fpdfapi/page/cpdf_image.h
@@ -12,6 +12,7 @@
#include "core/fpdfapi/parser/cpdf_stream.h"
#include "core/fxcrt/cfx_maybe_owned.h"
#include "core/fxcrt/cfx_retain_ptr.h"
+#include "core/fxcrt/cfx_unowned_ptr.h"
#include "core/fxcrt/fx_system.h"
class CFX_DIBSource;
@@ -33,8 +34,8 @@ class CPDF_Image : public CFX_Retainable {
CPDF_Dictionary* GetDict() const {
return m_pStream ? m_pStream->GetDict() : nullptr;
}
- CPDF_Dictionary* GetOC() const { return m_pOC; }
- CPDF_Document* GetDocument() const { return m_pDocument; }
+ CPDF_Dictionary* GetOC() const { return m_pOC.Get(); }
+ CPDF_Document* GetDocument() const { return m_pDocument.Get(); }
int32_t GetPixelHeight() const { return m_Height; }
int32_t GetPixelWidth() const { return m_Width; }
@@ -78,10 +79,10 @@ class CPDF_Image : public CFX_Retainable {
bool m_bIsInline = false;
bool m_bIsMask = false;
bool m_bInterpolate = false;
- CPDF_Document* const m_pDocument;
+ CFX_UnownedPtr<CPDF_Document> const m_pDocument;
CFX_MaybeOwned<CPDF_Stream> m_pStream;
CFX_MaybeOwned<CPDF_Dictionary> m_pDict;
- CPDF_Dictionary* m_pOC = nullptr;
+ CFX_UnownedPtr<CPDF_Dictionary> m_pOC;
};
#endif // CORE_FPDFAPI_PAGE_CPDF_IMAGE_H_