Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(88)

Unified Diff: core/fpdfapi/fpdf_page/cpdf_image.cpp

Issue 2019603002: Remove unused PS generation code. (Closed) Base URL: https://pdfium.googlesource.com/pdfium@print_clean
Patch Set: rebase Created 4 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « core/fpdfapi/fpdf_edit/fpdf_edit_create.cpp ('k') | core/fpdfapi/fpdf_parser/fpdf_parser_decode.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: core/fpdfapi/fpdf_page/cpdf_image.cpp
diff --git a/core/fpdfapi/fpdf_page/cpdf_image.cpp b/core/fpdfapi/fpdf_page/cpdf_image.cpp
index 84f6853b580ee04f0c2f4b459c7886308869e6a9..d7e50d8291224d52c6e46df7289a1650afdcccf7 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;
}
« no previous file with comments | « core/fpdfapi/fpdf_edit/fpdf_edit_create.cpp ('k') | core/fpdfapi/fpdf_parser/fpdf_parser_decode.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698