summaryrefslogtreecommitdiff
path: root/core/fpdfapi/fpdf_page
diff options
context:
space:
mode:
authorthestig <thestig@chromium.org>2016-06-06 17:54:29 -0700
committerCommit bot <commit-bot@chromium.org>2016-06-06 17:54:29 -0700
commitb0fcfad1412c2ddaf33c74fa4b854c3c1390a509 (patch)
treee890bd15ef68a679e06b58e42f51496a050166ed /core/fpdfapi/fpdf_page
parent0abe65264043b8a1b4afbf8d3e9ce88b4a534826 (diff)
downloadpdfium-b0fcfad1412c2ddaf33c74fa4b854c3c1390a509.tar.xz
Remove unused PS generation code.
CFX_PSRenderer, IFX_PSOutput, CPSOutput, CPSPrinterDriver. Also reland commit 2d63eaa. Review-Url: https://codereview.chromium.org/2019603002
Diffstat (limited to 'core/fpdfapi/fpdf_page')
-rw-r--r--core/fpdfapi/fpdf_page/cpdf_image.cpp14
1 files changed, 7 insertions, 7 deletions
diff --git a/core/fpdfapi/fpdf_page/cpdf_image.cpp b/core/fpdfapi/fpdf_page/cpdf_image.cpp
index 84f6853b58..d7e50d8291 100644
--- a/core/fpdfapi/fpdf_page/cpdf_image.cpp
+++ b/core/fpdfapi/fpdf_page/cpdf_image.cpp
@@ -79,17 +79,18 @@ CPDF_Dictionary* CPDF_Image::InitJPEG(uint8_t* pData, uint32_t size) {
int32_t height;
int32_t num_comps;
int32_t bits;
- FX_BOOL color_trans;
+ bool color_trans;
if (!CPDF_ModuleMgr::Get()->GetJpegModule()->LoadInfo(
- pData, size, width, height, num_comps, bits, color_trans)) {
- return NULL;
+ pData, size, &width, &height, &num_comps, &bits, &color_trans)) {
+ return nullptr;
}
+
CPDF_Dictionary* pDict = new CPDF_Dictionary;
pDict->SetAtName("Type", "XObject");
pDict->SetAtName("Subtype", "Image");
pDict->SetAtInteger("Width", width);
pDict->SetAtInteger("Height", height);
- const FX_CHAR* csname = NULL;
+ const FX_CHAR* csname = nullptr;
if (num_comps == 1) {
csname = "DeviceGray";
} else if (num_comps == 3) {
@@ -114,9 +115,8 @@ CPDF_Dictionary* CPDF_Image::InitJPEG(uint8_t* pData, uint32_t size) {
m_bIsMask = FALSE;
m_Width = width;
m_Height = height;
- if (!m_pStream) {
- m_pStream = new CPDF_Stream(NULL, 0, NULL);
- }
+ if (!m_pStream)
+ m_pStream = new CPDF_Stream(nullptr, 0, nullptr);
return pDict;
}