summaryrefslogtreecommitdiff
path: root/core/fpdfapi/render/cpdf_renderstatus.h
diff options
context:
space:
mode:
authorLei Zhang <thestig@chromium.org>2018-05-09 20:13:42 +0000
committerChromium commit bot <commit-bot@chromium.org>2018-05-09 20:13:42 +0000
commit54ef2cb9eb5b145c6e973e95ccb488e121556ad7 (patch)
tree1cfd20ec575e8d825693256a17ca0f55b53f6b57 /core/fpdfapi/render/cpdf_renderstatus.h
parenta44b288c4132711d0d9dbcc6885fc98525748ad7 (diff)
downloadpdfium-54ef2cb9eb5b145c6e973e95ccb488e121556ad7.tar.xz
Mark numerious pointers as const.
They are mostly CPDF_Object* and derived classes, but others that should be are marked const as well. Change-Id: Ib3344d7d8db90940df8edc97c0dd6c59da080541 Reviewed-on: https://pdfium-review.googlesource.com/32180 Commit-Queue: Lei Zhang <thestig@chromium.org> Reviewed-by: Henrique Nakashima <hnakashima@chromium.org>
Diffstat (limited to 'core/fpdfapi/render/cpdf_renderstatus.h')
-rw-r--r--core/fpdfapi/render/cpdf_renderstatus.h13
1 files changed, 8 insertions, 5 deletions
diff --git a/core/fpdfapi/render/cpdf_renderstatus.h b/core/fpdfapi/render/cpdf_renderstatus.h
index 7058c0f9b9..5618196ce6 100644
--- a/core/fpdfapi/render/cpdf_renderstatus.h
+++ b/core/fpdfapi/render/cpdf_renderstatus.h
@@ -50,7 +50,7 @@ class CPDF_RenderStatus {
const CPDF_RenderOptions* pOptions,
int transparency,
bool bDropObjects,
- CPDF_Dictionary* pFormResource = nullptr,
+ const CPDF_Dictionary* pFormResource = nullptr,
bool bStdCS = false,
CPDF_Type3Char* pType3Char = nullptr,
FX_ARGB fill_color = 0,
@@ -71,7 +71,9 @@ class CPDF_RenderStatus {
bool IsPrint() const { return m_bPrint; }
bool IsStopped() const { return m_bStopped; }
CPDF_RenderContext* GetContext() const { return m_pContext.Get(); }
- CPDF_Dictionary* GetFormResource() const { return m_pFormResource.Get(); }
+ const CPDF_Dictionary* GetFormResource() const {
+ return m_pFormResource.Get();
+ }
CPDF_Dictionary* GetPageResource() const { return m_pPageResource.Get(); }
CFX_RenderDevice* GetRenderDevice() const { return m_pDevice; }
const CPDF_RenderOptions* GetRenderOptions() const { return &m_Options; }
@@ -80,7 +82,8 @@ class CPDF_RenderStatus {
void DebugVerifyDeviceIsPreMultiplied() const;
#endif
- RetainPtr<CPDF_TransferFunc> GetTransferFunc(CPDF_Object* pObject) const;
+ RetainPtr<CPDF_TransferFunc> GetTransferFunc(
+ const CPDF_Object* pObject) const;
FX_ARGB GetFillArgb(CPDF_PageObject* pObj, bool bType3 = false) const;
void DrawTilingPattern(CPDF_TilingPattern* pPattern,
CPDF_PageObject* pPageObj,
@@ -145,7 +148,7 @@ class CPDF_RenderStatus {
bool bBackAlphaRequired,
int* left,
int* top);
- RetainPtr<CFX_DIBitmap> LoadSMask(CPDF_Dictionary* pSMaskDict,
+ RetainPtr<CFX_DIBitmap> LoadSMask(const CPDF_Dictionary* pSMaskDict,
FX_RECT* pClipRect,
const CFX_Matrix* pMatrix);
// Optionally write the colorspace family value into |pCSFamily|.
@@ -161,7 +164,7 @@ class CPDF_RenderStatus {
const CFX_Matrix* pObj2Device) const;
CPDF_RenderOptions m_Options;
- UnownedPtr<CPDF_Dictionary> m_pFormResource;
+ UnownedPtr<const CPDF_Dictionary> m_pFormResource;
UnownedPtr<CPDF_Dictionary> m_pPageResource;
std::vector<CPDF_Type3Font*> m_Type3FontCache;
UnownedPtr<CPDF_RenderContext> m_pContext;