summaryrefslogtreecommitdiff
path: root/core/fpdfapi/fpdf_page/cpdf_pagemodule.cpp
diff options
context:
space:
mode:
authordsinclair <dsinclair@chromium.org>2016-04-26 13:13:20 -0700
committerCommit bot <commit-bot@chromium.org>2016-04-26 13:13:20 -0700
commitd647a6b2e3fbd2711273637e5a56e659a113d2e9 (patch)
tree91c3a2865fe5abeed901d4a5c392afa95205eed4 /core/fpdfapi/fpdf_page/cpdf_pagemodule.cpp
parent518fd4c5ababbfbf28e010a9c27098e8f6669e4b (diff)
downloadpdfium-d647a6b2e3fbd2711273637e5a56e659a113d2e9.tar.xz
Remove several IPDF_ interfaces and CPDF_RenderModule.
This CL removes the interfaces: * IPDF_ObjectRenderer * IPDF_OCContext * IPDF_RenderModule * IPDF_PageModule The CPDF_RenderModule was just wrapping new and delete calls. This Cl moves those up to the callers and removes the CPDF_RenderModule class. Review URL: https://codereview.chromium.org/1918323003
Diffstat (limited to 'core/fpdfapi/fpdf_page/cpdf_pagemodule.cpp')
-rw-r--r--core/fpdfapi/fpdf_page/cpdf_pagemodule.cpp19
1 files changed, 19 insertions, 0 deletions
diff --git a/core/fpdfapi/fpdf_page/cpdf_pagemodule.cpp b/core/fpdfapi/fpdf_page/cpdf_pagemodule.cpp
new file mode 100644
index 0000000000..0d2f547835
--- /dev/null
+++ b/core/fpdfapi/fpdf_page/cpdf_pagemodule.cpp
@@ -0,0 +1,19 @@
+// Copyright 2016 PDFium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+// Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com
+
+#include "core/fpdfapi/fpdf_page/cpdf_pagemodule.h"
+
+CPDF_ColorSpace* CPDF_PageModule::GetStockCS(int family) {
+ if (family == PDFCS_DEVICEGRAY)
+ return &m_StockGrayCS;
+ if (family == PDFCS_DEVICERGB)
+ return &m_StockRGBCS;
+ if (family == PDFCS_DEVICECMYK)
+ return &m_StockCMYKCS;
+ if (family == PDFCS_PATTERN)
+ return &m_StockPatternCS;
+ return nullptr;
+}