summaryrefslogtreecommitdiff
path: root/core/fpdfapi/page/cpdf_colorspace.h
diff options
context:
space:
mode:
authorHenrique Nakashima <hnakashima@chromium.org>2017-08-30 17:02:01 -0400
committerChromium commit bot <commit-bot@chromium.org>2017-08-31 19:34:56 +0000
commitce9ad1bee792856c2d9e940ecffff97145e18d32 (patch)
tree8410b6a25c2f99f91c2bab98d9d764c11ed159b5 /core/fpdfapi/page/cpdf_colorspace.h
parent670c4fdea0acb9663145b96bec1fbf76279781df (diff)
downloadpdfium-ce9ad1bee792856c2d9e940ecffff97145e18d32.tar.xz
Fix colorspace loading for mutually referencing colorspaces.
For example, Indexed colorspace A uses ICC Based colorspace B as its "base". B declares A as its "Alternate" fallback. Bug: chromium:759012 Change-Id: I4b78e68b9a77456050ecae4452837495546bf93d Reviewed-on: https://pdfium-review.googlesource.com/12471 Commit-Queue: Henrique Nakashima <hnakashima@chromium.org> Reviewed-by: dsinclair <dsinclair@chromium.org> Reviewed-by: Ryan Harrison <rharrison@chromium.org>
Diffstat (limited to 'core/fpdfapi/page/cpdf_colorspace.h')
-rw-r--r--core/fpdfapi/page/cpdf_colorspace.h9
1 files changed, 8 insertions, 1 deletions
diff --git a/core/fpdfapi/page/cpdf_colorspace.h b/core/fpdfapi/page/cpdf_colorspace.h
index a518689ded..31dd32629b 100644
--- a/core/fpdfapi/page/cpdf_colorspace.h
+++ b/core/fpdfapi/page/cpdf_colorspace.h
@@ -8,6 +8,7 @@
#define CORE_FPDFAPI_PAGE_CPDF_COLORSPACE_H_
#include <memory>
+#include <set>
#include "core/fpdfapi/page/cpdf_pattern.h"
#include "core/fxcrt/cfx_unowned_ptr.h"
@@ -44,6 +45,10 @@ class CPDF_ColorSpace {
static CPDF_ColorSpace* ColorspaceFromName(const CFX_ByteString& name);
static std::unique_ptr<CPDF_ColorSpace> Load(CPDF_Document* pDoc,
CPDF_Object* pCSObj);
+ static std::unique_ptr<CPDF_ColorSpace> Load(
+ CPDF_Document* pDoc,
+ CPDF_Object* pCSObj,
+ std::set<CPDF_Object*>* pVisited);
void Release();
@@ -74,7 +79,9 @@ class CPDF_ColorSpace {
CPDF_ColorSpace(CPDF_Document* pDoc, int family, uint32_t nComponents);
virtual ~CPDF_ColorSpace();
- virtual bool v_Load(CPDF_Document* pDoc, CPDF_Array* pArray);
+ virtual bool v_Load(CPDF_Document* pDoc,
+ CPDF_Array* pArray,
+ std::set<CPDF_Object*>* pVisited);
CFX_UnownedPtr<CPDF_Document> const m_pDocument;
int m_Family;