summaryrefslogtreecommitdiff
path: root/core/fpdfapi/page/cpdf_pattern.h
diff options
context:
space:
mode:
authorTom Sepez <tsepez@chromium.org>2017-05-24 13:21:45 -0700
committerChromium commit bot <commit-bot@chromium.org>2017-05-24 22:34:21 +0000
commitedc1e4e5baac33c8f2799e82ff52fd556d3c5e02 (patch)
tree0811327da4c67fe4babb07d299619382445c8be8 /core/fpdfapi/page/cpdf_pattern.h
parent4734512572776f8fc705e28fba8a46d981372e99 (diff)
downloadpdfium-edc1e4e5baac33c8f2799e82ff52fd556d3c5e02.tar.xz
Convert to CFX_UnownedPtr, part 9
Change-Id: Ia1151e0855accda0873251938a521df1913c73fa Reviewed-on: https://pdfium-review.googlesource.com/5852 Reviewed-by: Lei Zhang <thestig@chromium.org> Commit-Queue: Tom Sepez <tsepez@chromium.org>
Diffstat (limited to 'core/fpdfapi/page/cpdf_pattern.h')
-rw-r--r--core/fpdfapi/page/cpdf_pattern.h9
1 files changed, 5 insertions, 4 deletions
diff --git a/core/fpdfapi/page/cpdf_pattern.h b/core/fpdfapi/page/cpdf_pattern.h
index 3b948aedb7..dba301b922 100644
--- a/core/fpdfapi/page/cpdf_pattern.h
+++ b/core/fpdfapi/page/cpdf_pattern.h
@@ -7,6 +7,7 @@
#ifndef CORE_FPDFAPI_PAGE_CPDF_PATTERN_H_
#define CORE_FPDFAPI_PAGE_CPDF_PATTERN_H_
+#include "core/fxcrt/cfx_unowned_ptr.h"
#include "core/fxcrt/fx_coordinates.h"
#include "core/fxcrt/fx_system.h"
@@ -25,8 +26,8 @@ class CPDF_Pattern {
virtual CPDF_ShadingPattern* AsShadingPattern() = 0;
// All the getters that return pointers return non-NULL pointers.
- CPDF_Document* document() { return m_pDocument; }
- CPDF_Object* pattern_obj() { return m_pPatternObj; }
+ CPDF_Document* document() const { return m_pDocument.Get(); }
+ CPDF_Object* pattern_obj() const { return m_pPatternObj.Get(); }
CFX_Matrix* pattern_to_form() { return &m_Pattern2Form; }
const CFX_Matrix& parent_matrix() const { return m_ParentMatrix; }
@@ -38,8 +39,8 @@ class CPDF_Pattern {
void SetPatternToFormMatrix();
private:
- CPDF_Document* const m_pDocument;
- CPDF_Object* const m_pPatternObj;
+ CFX_UnownedPtr<CPDF_Document> const m_pDocument;
+ CFX_UnownedPtr<CPDF_Object> const m_pPatternObj;
CFX_Matrix m_Pattern2Form;
const CFX_Matrix m_ParentMatrix;
};