summaryrefslogtreecommitdiff
path: root/core/fpdfapi/page/cpdf_devicecs.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'core/fpdfapi/page/cpdf_devicecs.cpp')
-rw-r--r--core/fpdfapi/page/cpdf_devicecs.cpp13
1 files changed, 11 insertions, 2 deletions
diff --git a/core/fpdfapi/page/cpdf_devicecs.cpp b/core/fpdfapi/page/cpdf_devicecs.cpp
index efd0ae4f46..9eb4123b25 100644
--- a/core/fpdfapi/page/cpdf_devicecs.cpp
+++ b/core/fpdfapi/page/cpdf_devicecs.cpp
@@ -54,14 +54,23 @@ void ReverseRGB(uint8_t* pDestBuf, const uint8_t* pSrcBuf, int pixels) {
}
}
-CPDF_DeviceCS::CPDF_DeviceCS(int family)
- : CPDF_ColorSpace(nullptr, family, ComponentsForFamily(family)) {
+CPDF_DeviceCS::CPDF_DeviceCS(int family) : CPDF_ColorSpace(nullptr, family) {
ASSERT(family == PDFCS_DEVICEGRAY || family == PDFCS_DEVICERGB ||
family == PDFCS_DEVICECMYK);
+ SetComponentsForStockCS(ComponentsForFamily(GetFamily()));
}
CPDF_DeviceCS::~CPDF_DeviceCS() {}
+uint32_t CPDF_DeviceCS::v_Load(CPDF_Document* pDoc,
+ CPDF_Array* pArray,
+ std::set<CPDF_Object*>* pVisited) {
+ // Unlike other classes that inherit from CPDF_ColorSpace, CPDF_DeviceCS is
+ // never loaded by CPDF_ColorSpace.
+ NOTREACHED();
+ return 0;
+}
+
bool CPDF_DeviceCS::GetRGB(float* pBuf, float* R, float* G, float* B) const {
switch (m_Family) {
case PDFCS_DEVICEGRAY: