summaryrefslogtreecommitdiff
path: root/core/fpdfapi/page/cpdf_image.h
diff options
context:
space:
mode:
authorTom Sepez <tsepez@chromium.org>2017-05-24 14:07:18 -0700
committerChromium commit bot <commit-bot@chromium.org>2017-05-24 21:19:30 +0000
commit4734512572776f8fc705e28fba8a46d981372e99 (patch)
treef791427bf7d0acfb590880c8bcc1f4c4c370dba6 /core/fpdfapi/page/cpdf_image.h
parenta38f7989beacdf0a73441e4096d9ce7a196b10d3 (diff)
downloadpdfium-4734512572776f8fc705e28fba8a46d981372e99.tar.xz
Convert to CFX_UnownedPtr, part 8chromium/3110
Change-Id: I99d6b4df72e369652301c36e4046f03ef95ed07d Reviewed-on: https://pdfium-review.googlesource.com/5837 Commit-Queue: Tom Sepez <tsepez@chromium.org> Reviewed-by: Lei Zhang <thestig@chromium.org>
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_