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

Side by Side Diff: core/src/fpdfapi/fpdf_render/fpdf_render_loadimage.cpp

Issue 1416783002: Merge to M46: upgrade openjpeg to commit# cf352af (Closed) Base URL: https://pdfium.googlesource.com/pdfium.git@2490
Patch Set: Fix pdfium:168 since we are already half way there Created 5 years, 2 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 unified diff | Download patch
« no previous file with comments | « no previous file | core/src/fxcodec/codec/fx_codec_jpx_opj.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 "../../../../third_party/base/nonstd_unique_ptr.h" 7 #include "../../../../third_party/base/nonstd_unique_ptr.h"
8 #include "../../../include/fpdfapi/fpdf_module.h" 8 #include "../../../include/fpdfapi/fpdf_module.h"
9 #include "../../../include/fpdfapi/fpdf_pageobj.h" 9 #include "../../../include/fpdfapi/fpdf_pageobj.h"
10 #include "../../../include/fpdfapi/fpdf_render.h" 10 #include "../../../include/fpdfapi/fpdf_render.h"
(...skipping 680 matching lines...) Expand 10 before | Expand all | Expand 10 after
691 } 691 }
692 void CPDF_DIBSource::LoadJpxBitmap() { 692 void CPDF_DIBSource::LoadJpxBitmap() {
693 ICodec_JpxModule* pJpxModule = CPDF_ModuleMgr::Get()->GetJpxModule(); 693 ICodec_JpxModule* pJpxModule = CPDF_ModuleMgr::Get()->GetJpxModule();
694 if (!pJpxModule) 694 if (!pJpxModule)
695 return; 695 return;
696 696
697 nonstd::unique_ptr<JpxBitMapContext> context( 697 nonstd::unique_ptr<JpxBitMapContext> context(
698 new JpxBitMapContext(pJpxModule)); 698 new JpxBitMapContext(pJpxModule));
699 context->set_context(pJpxModule->CreateDecoder(m_pStreamAcc->GetData(), 699 context->set_context(pJpxModule->CreateDecoder(m_pStreamAcc->GetData(),
700 m_pStreamAcc->GetSize(), 700 m_pStreamAcc->GetSize(),
701 m_pColorSpace != nullptr)); 701 m_pColorSpace == nullptr));
702 if (!context->context()) 702 if (!context->context())
703 return; 703 return;
704 704
705 FX_DWORD width = 0; 705 FX_DWORD width = 0;
706 FX_DWORD height = 0; 706 FX_DWORD height = 0;
707 FX_DWORD codestream_nComps = 0; 707 FX_DWORD codestream_nComps = 0;
708 FX_DWORD image_nComps = 0; 708 FX_DWORD image_nComps = 0;
709 pJpxModule->GetImageInfo(context->context(), width, height, codestream_nComps, 709 pJpxModule->GetImageInfo(context->context(), width, height, codestream_nComps,
710 image_nComps); 710 image_nComps);
711 if ((int)width < m_Width || (int)height < m_Height) 711 if ((int)width < m_Width || (int)height < m_Height)
(...skipping 930 matching lines...) Expand 10 before | Expand all | Expand 10 after
1642 } 1642 }
1643 FX_BOOL CPDF_ImageLoader::Continue(void* LoadHandle, IFX_Pause* pPause) { 1643 FX_BOOL CPDF_ImageLoader::Continue(void* LoadHandle, IFX_Pause* pPause) {
1644 return ((CPDF_ProgressiveImageLoaderHandle*)LoadHandle)->Continue(pPause); 1644 return ((CPDF_ProgressiveImageLoaderHandle*)LoadHandle)->Continue(pPause);
1645 } 1645 }
1646 CPDF_ImageLoader::~CPDF_ImageLoader() { 1646 CPDF_ImageLoader::~CPDF_ImageLoader() {
1647 if (!m_bCached) { 1647 if (!m_bCached) {
1648 delete m_pBitmap; 1648 delete m_pBitmap;
1649 delete m_pMask; 1649 delete m_pMask;
1650 } 1650 }
1651 } 1651 }
OLDNEW
« no previous file with comments | « no previous file | core/src/fxcodec/codec/fx_codec_jpx_opj.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698