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

Side by Side Diff: core/src/fxge/ge/fx_ge_ps.cpp

Issue 1512763013: Get rid of most instance of 'foo != NULL' (Closed) Base URL: https://pdfium.googlesource.com/pdfium@master
Patch Set: nits Created 5 years 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 unified diff | Download patch
« no previous file with comments | « core/src/fxge/ge/fx_ge_device.cpp ('k') | core/src/fxge/ge/fx_ge_text.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2014 PDFium Authors. All rights reserved. 1 // Copyright 2014 PDFium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 // Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com 5 // Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com
6 6
7 #include "core/include/fxge/fx_ge.h" 7 #include "core/include/fxge/fx_ge.h"
8 #include "core/include/fxcodec/fx_codec.h" 8 #include "core/include/fxcodec/fx_codec.h"
9 #include "text_int.h" 9 #include "text_int.h"
10 10
(...skipping 399 matching lines...) Expand 10 before | Expand all | Expand 10 after
410 if (pIccTransform) { 410 if (pIccTransform) {
411 FXDIB_Format format = m_bCmykOutput ? FXDIB_Cmyk : FXDIB_Rgb; 411 FXDIB_Format format = m_bCmykOutput ? FXDIB_Cmyk : FXDIB_Rgb;
412 pConverted = pSource->CloneConvert(format, NULL, pIccTransform); 412 pConverted = pSource->CloneConvert(format, NULL, pIccTransform);
413 } else { 413 } else {
414 switch (pSource->GetFormat()) { 414 switch (pSource->GetFormat()) {
415 case FXDIB_1bppRgb: 415 case FXDIB_1bppRgb:
416 case FXDIB_Rgb32: 416 case FXDIB_Rgb32:
417 pConverted = pSource->CloneConvert(FXDIB_Rgb); 417 pConverted = pSource->CloneConvert(FXDIB_Rgb);
418 break; 418 break;
419 case FXDIB_8bppRgb: 419 case FXDIB_8bppRgb:
420 if (pSource->GetPalette() != NULL) { 420 if (pSource->GetPalette()) {
421 pConverted = pSource->CloneConvert(FXDIB_Rgb); 421 pConverted = pSource->CloneConvert(FXDIB_Rgb);
422 } 422 }
423 break; 423 break;
424 case FXDIB_1bppCmyk: 424 case FXDIB_1bppCmyk:
425 pConverted = pSource->CloneConvert(FXDIB_Cmyk); 425 pConverted = pSource->CloneConvert(FXDIB_Cmyk);
426 break; 426 break;
427 case FXDIB_8bppCmyk: 427 case FXDIB_8bppCmyk:
428 if (pSource->GetPalette() != NULL) { 428 if (pSource->GetPalette()) {
429 pConverted = pSource->CloneConvert(FXDIB_Cmyk); 429 pConverted = pSource->CloneConvert(FXDIB_Cmyk);
430 } 430 }
431 break; 431 break;
432 default: 432 default:
433 break; 433 break;
434 } 434 }
435 } 435 }
436 if (pConverted == NULL) { 436 if (pConverted == NULL) {
437 OUTPUT_PS("\nQ\n"); 437 OUTPUT_PS("\nQ\n");
438 return FALSE; 438 return FALSE;
(...skipping 251 matching lines...) Expand 10 before | Expand all | Expand 10 after
690 FX_DWORD dest_size; 690 FX_DWORD dest_size;
691 CCodec_ModuleMgr* pEncoders = CFX_GEModule::Get()->GetCodecModule(); 691 CCodec_ModuleMgr* pEncoders = CFX_GEModule::Get()->GetCodecModule();
692 if (pEncoders && 692 if (pEncoders &&
693 pEncoders->GetBasicModule()->A85Encode(data, len, dest_buf, dest_size)) { 693 pEncoders->GetBasicModule()->A85Encode(data, len, dest_buf, dest_size)) {
694 m_pOutput->OutputPS((const FX_CHAR*)dest_buf, dest_size); 694 m_pOutput->OutputPS((const FX_CHAR*)dest_buf, dest_size);
695 FX_Free(dest_buf); 695 FX_Free(dest_buf);
696 } else { 696 } else {
697 m_pOutput->OutputPS((const FX_CHAR*)data, len); 697 m_pOutput->OutputPS((const FX_CHAR*)data, len);
698 } 698 }
699 } 699 }
OLDNEW
« no previous file with comments | « core/src/fxge/ge/fx_ge_device.cpp ('k') | core/src/fxge/ge/fx_ge_text.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698