aboutsummaryrefslogtreecommitdiff
path: root/core/fpdfapi/page/cpdf_shadingpattern.h
diff options
context:
space:
mode:
Diffstat (limited to 'core/fpdfapi/page/cpdf_shadingpattern.h')
-rw-r--r--core/fpdfapi/page/cpdf_shadingpattern.h14
1 files changed, 6 insertions, 8 deletions
diff --git a/core/fpdfapi/page/cpdf_shadingpattern.h b/core/fpdfapi/page/cpdf_shadingpattern.h
index 392aa2741..1e2672067 100644
--- a/core/fpdfapi/page/cpdf_shadingpattern.h
+++ b/core/fpdfapi/page/cpdf_shadingpattern.h
@@ -1,4 +1,4 @@
-// Copyright 2016 PDFium Authors. All rights reserved.
+// Copyright 2016 The PDFium Authors
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
@@ -7,14 +7,14 @@
#ifndef CORE_FPDFAPI_PAGE_CPDF_SHADINGPATTERN_H_
#define CORE_FPDFAPI_PAGE_CPDF_SHADINGPATTERN_H_
+#include <stdint.h>
+
#include <memory>
#include <vector>
#include "core/fpdfapi/page/cpdf_colorspace.h"
#include "core/fpdfapi/page/cpdf_pattern.h"
-#include "core/fxcrt/fx_system.h"
#include "core/fxcrt/retain_ptr.h"
-#include "core/fxcrt/unowned_ptr.h"
// Values used in PDFs except for |kInvalidShading| and |kMaxShading|.
// Do not change.
@@ -38,9 +38,7 @@ class CPDF_Object;
class CPDF_ShadingPattern final : public CPDF_Pattern {
public:
- template <typename T, typename... Args>
- friend RetainPtr<T> pdfium::MakeRetain(Args&&... args);
-
+ CONSTRUCT_VIA_MAKE_RETAIN;
~CPDF_ShadingPattern() override;
// CPDF_Pattern:
@@ -56,7 +54,7 @@ class CPDF_ShadingPattern final : public CPDF_Pattern {
ShadingType GetShadingType() const { return m_ShadingType; }
bool IsShadingObject() const { return m_bShading; }
- const CPDF_Object* GetShadingObject() const;
+ RetainPtr<const CPDF_Object> GetShadingObject() const;
RetainPtr<CPDF_ColorSpace> GetCS() const { return m_pCS; }
const std::vector<std::unique_ptr<CPDF_Function>>& GetFuncs() const {
return m_pFunctions;
@@ -64,7 +62,7 @@ class CPDF_ShadingPattern final : public CPDF_Pattern {
private:
CPDF_ShadingPattern(CPDF_Document* pDoc,
- CPDF_Object* pPatternObj,
+ RetainPtr<CPDF_Object> pPatternObj,
bool bShading,
const CFX_Matrix& parentMatrix);
CPDF_ShadingPattern(const CPDF_ShadingPattern&) = delete;