diff options
author | Lei Zhang <thestig@chromium.org> | 2015-09-03 14:44:16 -0700 |
---|---|---|
committer | Lei Zhang <thestig@chromium.org> | 2015-09-03 14:44:16 -0700 |
commit | 55512706477c035ee27413a7a2c9a75f31ceae34 (patch) | |
tree | 8326c0a043bca4c945978c451ea27f3936c805a6 /core | |
parent | 662816e763bbefe21c8c1b154328e131321f56b6 (diff) | |
download | pdfium-55512706477c035ee27413a7a2c9a75f31ceae34.tar.xz |
Merge to XFA: Reapply Foxit's libopenjpeg modifications.
They were lost in commit d53e6fd.
BUG=pdfium:168
TBR=tsepez@chromium.org
Review URL: https://codereview.chromium.org/1196523002 .
(cherry picked from commit 870b5b6793fa261f0c6f31f026010d2d715968bf)
Review URL: https://codereview.chromium.org/1301323007 .
Diffstat (limited to 'core')
-rw-r--r-- | core/src/fpdfapi/fpdf_render/fpdf_render_loadimage.cpp | 2 | ||||
-rw-r--r-- | core/src/fxcodec/codec/fx_codec_jpx_opj.cpp | 4 |
2 files changed, 4 insertions, 2 deletions
diff --git a/core/src/fpdfapi/fpdf_render/fpdf_render_loadimage.cpp b/core/src/fpdfapi/fpdf_render/fpdf_render_loadimage.cpp index f75453557d..0362ff2e90 100644 --- a/core/src/fpdfapi/fpdf_render/fpdf_render_loadimage.cpp +++ b/core/src/fpdfapi/fpdf_render/fpdf_render_loadimage.cpp @@ -700,7 +700,7 @@ void CPDF_DIBSource::LoadJpxBitmap() { new JpxBitMapContext(pJpxModule)); context->set_decoder(pJpxModule->CreateDecoder(m_pStreamAcc->GetData(), m_pStreamAcc->GetSize(), - m_pColorSpace != nullptr)); + m_pColorSpace == nullptr)); if (!context->decoder()) return; diff --git a/core/src/fxcodec/codec/fx_codec_jpx_opj.cpp b/core/src/fxcodec/codec/fx_codec_jpx_opj.cpp index 81de30e58a..b7e032e614 100644 --- a/core/src/fxcodec/codec/fx_codec_jpx_opj.cpp +++ b/core/src/fxcodec/codec/fx_codec_jpx_opj.cpp @@ -627,7 +627,7 @@ class CJPX_Decoder { opj_image_t* image; opj_codec_t* l_codec; opj_stream_t* l_stream; - bool m_UseColorSpace; + const bool m_UseColorSpace; }; CJPX_Decoder::CJPX_Decoder(bool use_colorspace) @@ -687,6 +687,8 @@ FX_BOOL CJPX_Decoder::Init(const unsigned char* src_data, int src_size) { image = NULL; return FALSE; } + image->pdfium_use_colorspace = m_UseColorSpace; + if (!parameters.nb_tile_to_decode) { if (!opj_set_decode_area(l_codec, image, parameters.DA_x0, parameters.DA_y0, parameters.DA_x1, parameters.DA_y1)) { |