summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--BUILD.gn23
-rw-r--r--core/src/fxcodec/codec/codec_int.h2
-rw-r--r--core/src/fxcodec/codec/fx_codec_jpx_opj.cpp2
-rw-r--r--core/src/fxcodec/fx_libopenjpeg/include/fx_openjpeg.h16
-rw-r--r--core/src/fxcodec/fx_libopenjpeg/libopenjpeg20/CMakeLists.txt (renamed from third_party/libopenjpeg20/CMakeLists.txt)0
-rw-r--r--core/src/fxcodec/fx_libopenjpeg/libopenjpeg20/bio.c (renamed from third_party/libopenjpeg20/bio.c)0
-rw-r--r--core/src/fxcodec/fx_libopenjpeg/libopenjpeg20/bio.h (renamed from third_party/libopenjpeg20/bio.h)0
-rw-r--r--core/src/fxcodec/fx_libopenjpeg/libopenjpeg20/cio.c (renamed from third_party/libopenjpeg20/cio.c)0
-rw-r--r--core/src/fxcodec/fx_libopenjpeg/libopenjpeg20/cio.h (renamed from third_party/libopenjpeg20/cio.h)0
-rw-r--r--core/src/fxcodec/fx_libopenjpeg/libopenjpeg20/dwt.c (renamed from third_party/libopenjpeg20/dwt.c)0
-rw-r--r--core/src/fxcodec/fx_libopenjpeg/libopenjpeg20/dwt.h (renamed from third_party/libopenjpeg20/dwt.h)0
-rw-r--r--core/src/fxcodec/fx_libopenjpeg/libopenjpeg20/event.c (renamed from third_party/libopenjpeg20/event.c)0
-rw-r--r--core/src/fxcodec/fx_libopenjpeg/libopenjpeg20/event.h (renamed from third_party/libopenjpeg20/event.h)0
-rw-r--r--core/src/fxcodec/fx_libopenjpeg/libopenjpeg20/function_list.c (renamed from third_party/libopenjpeg20/function_list.c)0
-rw-r--r--core/src/fxcodec/fx_libopenjpeg/libopenjpeg20/function_list.h (renamed from third_party/libopenjpeg20/function_list.h)0
-rw-r--r--core/src/fxcodec/fx_libopenjpeg/libopenjpeg20/image.c (renamed from third_party/libopenjpeg20/image.c)0
-rw-r--r--core/src/fxcodec/fx_libopenjpeg/libopenjpeg20/image.h (renamed from third_party/libopenjpeg20/image.h)0
-rw-r--r--core/src/fxcodec/fx_libopenjpeg/libopenjpeg20/indexbox_manager.h (renamed from third_party/libopenjpeg20/indexbox_manager.h)0
-rw-r--r--core/src/fxcodec/fx_libopenjpeg/libopenjpeg20/invert.c (renamed from third_party/libopenjpeg20/invert.c)0
-rw-r--r--core/src/fxcodec/fx_libopenjpeg/libopenjpeg20/invert.h (renamed from third_party/libopenjpeg20/invert.h)0
-rw-r--r--core/src/fxcodec/fx_libopenjpeg/libopenjpeg20/j2k.c (renamed from third_party/libopenjpeg20/j2k.c)0
-rw-r--r--core/src/fxcodec/fx_libopenjpeg/libopenjpeg20/j2k.h (renamed from third_party/libopenjpeg20/j2k.h)0
-rw-r--r--core/src/fxcodec/fx_libopenjpeg/libopenjpeg20/jp2.c (renamed from third_party/libopenjpeg20/jp2.c)0
-rw-r--r--core/src/fxcodec/fx_libopenjpeg/libopenjpeg20/jp2.h (renamed from third_party/libopenjpeg20/jp2.h)0
-rw-r--r--core/src/fxcodec/fx_libopenjpeg/libopenjpeg20/mct.c (renamed from third_party/libopenjpeg20/mct.c)0
-rw-r--r--core/src/fxcodec/fx_libopenjpeg/libopenjpeg20/mct.h (renamed from third_party/libopenjpeg20/mct.h)0
-rw-r--r--core/src/fxcodec/fx_libopenjpeg/libopenjpeg20/mqc.c (renamed from third_party/libopenjpeg20/mqc.c)0
-rw-r--r--core/src/fxcodec/fx_libopenjpeg/libopenjpeg20/mqc.h (renamed from third_party/libopenjpeg20/mqc.h)0
-rw-r--r--core/src/fxcodec/fx_libopenjpeg/libopenjpeg20/openjpeg.c (renamed from third_party/libopenjpeg20/openjpeg.c)0
-rw-r--r--core/src/fxcodec/fx_libopenjpeg/libopenjpeg20/openjpeg.h (renamed from third_party/libopenjpeg20/openjpeg.h)0
-rw-r--r--core/src/fxcodec/fx_libopenjpeg/libopenjpeg20/opj_clock.c (renamed from third_party/libopenjpeg20/opj_clock.c)0
-rw-r--r--core/src/fxcodec/fx_libopenjpeg/libopenjpeg20/opj_clock.h (renamed from third_party/libopenjpeg20/opj_clock.h)0
-rw-r--r--core/src/fxcodec/fx_libopenjpeg/libopenjpeg20/opj_codec.h (renamed from third_party/libopenjpeg20/opj_codec.h)0
-rw-r--r--core/src/fxcodec/fx_libopenjpeg/libopenjpeg20/opj_config.h (renamed from third_party/libopenjpeg20/opj_config.h)0
-rw-r--r--core/src/fxcodec/fx_libopenjpeg/libopenjpeg20/opj_config.h.cmake.in (renamed from third_party/libopenjpeg20/opj_config.h.cmake.in)0
-rw-r--r--core/src/fxcodec/fx_libopenjpeg/libopenjpeg20/opj_config_private.h (renamed from third_party/libopenjpeg20/opj_config_private.h)0
-rw-r--r--core/src/fxcodec/fx_libopenjpeg/libopenjpeg20/opj_includes.h (renamed from third_party/libopenjpeg20/opj_includes.h)0
-rw-r--r--core/src/fxcodec/fx_libopenjpeg/libopenjpeg20/opj_intmath.h (renamed from third_party/libopenjpeg20/opj_intmath.h)0
-rw-r--r--core/src/fxcodec/fx_libopenjpeg/libopenjpeg20/opj_inttypes.h (renamed from third_party/libopenjpeg20/opj_inttypes.h)0
-rw-r--r--core/src/fxcodec/fx_libopenjpeg/libopenjpeg20/opj_malloc.h (renamed from third_party/libopenjpeg20/opj_malloc.h)0
-rw-r--r--core/src/fxcodec/fx_libopenjpeg/libopenjpeg20/opj_stdint.h (renamed from third_party/libopenjpeg20/opj_stdint.h)0
-rw-r--r--core/src/fxcodec/fx_libopenjpeg/libopenjpeg20/pi.c (renamed from third_party/libopenjpeg20/pi.c)0
-rw-r--r--core/src/fxcodec/fx_libopenjpeg/libopenjpeg20/pi.h (renamed from third_party/libopenjpeg20/pi.h)0
-rw-r--r--core/src/fxcodec/fx_libopenjpeg/libopenjpeg20/raw.c (renamed from third_party/libopenjpeg20/raw.c)0
-rw-r--r--core/src/fxcodec/fx_libopenjpeg/libopenjpeg20/raw.h (renamed from third_party/libopenjpeg20/raw.h)0
-rw-r--r--core/src/fxcodec/fx_libopenjpeg/libopenjpeg20/t1.c (renamed from third_party/libopenjpeg20/t1.c)0
-rw-r--r--core/src/fxcodec/fx_libopenjpeg/libopenjpeg20/t1.h (renamed from third_party/libopenjpeg20/t1.h)0
-rw-r--r--core/src/fxcodec/fx_libopenjpeg/libopenjpeg20/t1_generate_luts.c (renamed from third_party/libopenjpeg20/t1_generate_luts.c)0
-rw-r--r--core/src/fxcodec/fx_libopenjpeg/libopenjpeg20/t1_luts.h (renamed from third_party/libopenjpeg20/t1_luts.h)0
-rw-r--r--core/src/fxcodec/fx_libopenjpeg/libopenjpeg20/t2.c (renamed from third_party/libopenjpeg20/t2.c)0
-rw-r--r--core/src/fxcodec/fx_libopenjpeg/libopenjpeg20/t2.h (renamed from third_party/libopenjpeg20/t2.h)0
-rw-r--r--core/src/fxcodec/fx_libopenjpeg/libopenjpeg20/tcd.c (renamed from third_party/libopenjpeg20/tcd.c)0
-rw-r--r--core/src/fxcodec/fx_libopenjpeg/libopenjpeg20/tcd.h (renamed from third_party/libopenjpeg20/tcd.h)0
-rw-r--r--core/src/fxcodec/fx_libopenjpeg/libopenjpeg20/tgt.c (renamed from third_party/libopenjpeg20/tgt.c)0
-rw-r--r--core/src/fxcodec/fx_libopenjpeg/libopenjpeg20/tgt.h (renamed from third_party/libopenjpeg20/tgt.h)0
-rw-r--r--core/src/fxcodec/fx_libopenjpeg/src/fx_bio.c10
-rw-r--r--core/src/fxcodec/fx_libopenjpeg/src/fx_cio.c10
-rw-r--r--core/src/fxcodec/fx_libopenjpeg/src/fx_dwt.c10
-rw-r--r--core/src/fxcodec/fx_libopenjpeg/src/fx_event.c10
-rw-r--r--core/src/fxcodec/fx_libopenjpeg/src/fx_function_list.c10
-rw-r--r--core/src/fxcodec/fx_libopenjpeg/src/fx_image.c10
-rw-r--r--core/src/fxcodec/fx_libopenjpeg/src/fx_invert.c10
-rw-r--r--core/src/fxcodec/fx_libopenjpeg/src/fx_j2k.c10
-rw-r--r--core/src/fxcodec/fx_libopenjpeg/src/fx_j2k_lib.c9
-rw-r--r--core/src/fxcodec/fx_libopenjpeg/src/fx_jpt.c9
-rw-r--r--core/src/fxcodec/fx_libopenjpeg/src/fx_mct.c10
-rw-r--r--core/src/fxcodec/fx_libopenjpeg/src/fx_mqc.c10
-rw-r--r--core/src/fxcodec/fx_libopenjpeg/src/fx_openjpeg.c10
-rw-r--r--core/src/fxcodec/fx_libopenjpeg/src/fx_openjpeg_jp2.c10
-rw-r--r--core/src/fxcodec/fx_libopenjpeg/src/fx_opj_clock.c10
-rw-r--r--core/src/fxcodec/fx_libopenjpeg/src/fx_pi.c10
-rw-r--r--core/src/fxcodec/fx_libopenjpeg/src/fx_raw.c10
-rw-r--r--core/src/fxcodec/fx_libopenjpeg/src/fx_t1.c10
-rw-r--r--core/src/fxcodec/fx_libopenjpeg/src/fx_t1_generate_luts.c10
-rw-r--r--core/src/fxcodec/fx_libopenjpeg/src/fx_t2.c10
-rw-r--r--core/src/fxcodec/fx_libopenjpeg/src/fx_tcd.c10
-rw-r--r--core/src/fxcodec/fx_libopenjpeg/src/fx_tgt.c10
-rw-r--r--pdfium.gyp23
-rw-r--r--third_party/BUILD.gn36
-rw-r--r--third_party/third_party.gyp28
80 files changed, 283 insertions, 65 deletions
diff --git a/BUILD.gn b/BUILD.gn
index 76e05d6360..97a475d22f 100644
--- a/BUILD.gn
+++ b/BUILD.gn
@@ -338,7 +338,6 @@ static_library("fxcodec") {
deps = [
"third_party:fx_lcms2",
"third_party:fx_libjpeg",
- "third_party:fx_libopenjpeg",
]
sources = [
"core/include/fxcodec/fx_codec.h",
@@ -353,6 +352,28 @@ static_library("fxcodec") {
"core/src/fxcodec/codec/fx_codec_jbig_enc.cpp",
"core/src/fxcodec/codec/fx_codec_jpeg.cpp",
"core/src/fxcodec/codec/fx_codec_jpx_opj.cpp",
+ "core/src/fxcodec/fx_libopenjpeg/include/fx_openjpeg.h",
+ "core/src/fxcodec/fx_libopenjpeg/src/fx_bio.c",
+ "core/src/fxcodec/fx_libopenjpeg/src/fx_cio.c",
+ "core/src/fxcodec/fx_libopenjpeg/src/fx_dwt.c",
+ "core/src/fxcodec/fx_libopenjpeg/src/fx_event.c",
+ "core/src/fxcodec/fx_libopenjpeg/src/fx_function_list.c",
+ "core/src/fxcodec/fx_libopenjpeg/src/fx_image.c",
+ "core/src/fxcodec/fx_libopenjpeg/src/fx_invert.c",
+ "core/src/fxcodec/fx_libopenjpeg/src/fx_j2k.c",
+ "core/src/fxcodec/fx_libopenjpeg/src/fx_j2k_lib.c",
+ "core/src/fxcodec/fx_libopenjpeg/src/fx_jpt.c",
+ "core/src/fxcodec/fx_libopenjpeg/src/fx_mct.c",
+ "core/src/fxcodec/fx_libopenjpeg/src/fx_mqc.c",
+ "core/src/fxcodec/fx_libopenjpeg/src/fx_openjpeg.c",
+ "core/src/fxcodec/fx_libopenjpeg/src/fx_openjpeg_jp2.c",
+ "core/src/fxcodec/fx_libopenjpeg/src/fx_opj_clock.c",
+ "core/src/fxcodec/fx_libopenjpeg/src/fx_pi.c",
+ "core/src/fxcodec/fx_libopenjpeg/src/fx_raw.c",
+ "core/src/fxcodec/fx_libopenjpeg/src/fx_t1.c",
+ "core/src/fxcodec/fx_libopenjpeg/src/fx_t2.c",
+ "core/src/fxcodec/fx_libopenjpeg/src/fx_tcd.c",
+ "core/src/fxcodec/fx_libopenjpeg/src/fx_tgt.c",
"core/src/fxcodec/fx_zlib/include/fx_zlib.h",
"core/src/fxcodec/fx_zlib/src/fx_zlib_adler32.c",
"core/src/fxcodec/fx_zlib/src/fx_zlib_compress.c",
diff --git a/core/src/fxcodec/codec/codec_int.h b/core/src/fxcodec/codec/codec_int.h
index d0d969cddc..1c70c12333 100644
--- a/core/src/fxcodec/codec/codec_int.h
+++ b/core/src/fxcodec/codec/codec_int.h
@@ -10,9 +10,9 @@
#include <limits.h>
#include <list>
-#include "../../../../third_party/libopenjpeg20/openjpeg.h" // For OPJ_SIZE_T.
#include "../../../include/fxcodec/fx_codec.h"
#include "../jbig2/JBig2_Context.h"
+#include "../fx_libopenjpeg/libopenjpeg20/openjpeg.h" // For OPJ_SIZE_T.
class CCodec_BasicModule : public ICodec_BasicModule
{
diff --git a/core/src/fxcodec/codec/fx_codec_jpx_opj.cpp b/core/src/fxcodec/codec/fx_codec_jpx_opj.cpp
index 8b1759e3ad..4457f1835a 100644
--- a/core/src/fxcodec/codec/fx_codec_jpx_opj.cpp
+++ b/core/src/fxcodec/codec/fx_codec_jpx_opj.cpp
@@ -7,8 +7,8 @@
#include <algorithm>
#include <limits>
-#include "../../../../third_party/libopenjpeg20/openjpeg.h"
#include "../../../include/fxcodec/fx_codec.h"
+#include "../fx_libopenjpeg/libopenjpeg20/openjpeg.h"
#include "../lcms2/fx_lcms2.h"
#include "codec_int.h"
diff --git a/core/src/fxcodec/fx_libopenjpeg/include/fx_openjpeg.h b/core/src/fxcodec/fx_libopenjpeg/include/fx_openjpeg.h
new file mode 100644
index 0000000000..5725a57e75
--- /dev/null
+++ b/core/src/fxcodec/fx_libopenjpeg/include/fx_openjpeg.h
@@ -0,0 +1,16 @@
+// Copyright 2014 PDFium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+// Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com
+
+#ifndef CORE_SRC_FXCODEC_FX_LIBOPENJPEG_INCLUDE_FX_OPENJPEG_H_
+#define CORE_SRC_FXCODEC_FX_LIBOPENJPEG_INCLUDE_FX_OPENJPEG_H_
+
+#ifdef _MSC_VER
+#define _CRT_SECURE_NO_WARNINGS
+#endif
+
+#include "../libopenjpeg20/openjpeg.h"
+
+#endif // CORE_SRC_FXCODEC_FX_LIBOPENJPEG_INCLUDE_FX_OPENJPEG_H_
diff --git a/third_party/libopenjpeg20/CMakeLists.txt b/core/src/fxcodec/fx_libopenjpeg/libopenjpeg20/CMakeLists.txt
index 7f16834660..7f16834660 100644
--- a/third_party/libopenjpeg20/CMakeLists.txt
+++ b/core/src/fxcodec/fx_libopenjpeg/libopenjpeg20/CMakeLists.txt
diff --git a/third_party/libopenjpeg20/bio.c b/core/src/fxcodec/fx_libopenjpeg/libopenjpeg20/bio.c
index 3ce6492753..3ce6492753 100644
--- a/third_party/libopenjpeg20/bio.c
+++ b/core/src/fxcodec/fx_libopenjpeg/libopenjpeg20/bio.c
diff --git a/third_party/libopenjpeg20/bio.h b/core/src/fxcodec/fx_libopenjpeg/libopenjpeg20/bio.h
index fba2428476..fba2428476 100644
--- a/third_party/libopenjpeg20/bio.h
+++ b/core/src/fxcodec/fx_libopenjpeg/libopenjpeg20/bio.h
diff --git a/third_party/libopenjpeg20/cio.c b/core/src/fxcodec/fx_libopenjpeg/libopenjpeg20/cio.c
index c455bf7711..c455bf7711 100644
--- a/third_party/libopenjpeg20/cio.c
+++ b/core/src/fxcodec/fx_libopenjpeg/libopenjpeg20/cio.c
diff --git a/third_party/libopenjpeg20/cio.h b/core/src/fxcodec/fx_libopenjpeg/libopenjpeg20/cio.h
index 6dfa5bb847..6dfa5bb847 100644
--- a/third_party/libopenjpeg20/cio.h
+++ b/core/src/fxcodec/fx_libopenjpeg/libopenjpeg20/cio.h
diff --git a/third_party/libopenjpeg20/dwt.c b/core/src/fxcodec/fx_libopenjpeg/libopenjpeg20/dwt.c
index bea4574257..bea4574257 100644
--- a/third_party/libopenjpeg20/dwt.c
+++ b/core/src/fxcodec/fx_libopenjpeg/libopenjpeg20/dwt.c
diff --git a/third_party/libopenjpeg20/dwt.h b/core/src/fxcodec/fx_libopenjpeg/libopenjpeg20/dwt.h
index f8b57bc0c7..f8b57bc0c7 100644
--- a/third_party/libopenjpeg20/dwt.h
+++ b/core/src/fxcodec/fx_libopenjpeg/libopenjpeg20/dwt.h
diff --git a/third_party/libopenjpeg20/event.c b/core/src/fxcodec/fx_libopenjpeg/libopenjpeg20/event.c
index b6034b42d0..b6034b42d0 100644
--- a/third_party/libopenjpeg20/event.c
+++ b/core/src/fxcodec/fx_libopenjpeg/libopenjpeg20/event.c
diff --git a/third_party/libopenjpeg20/event.h b/core/src/fxcodec/fx_libopenjpeg/libopenjpeg20/event.h
index 88e0395b4f..88e0395b4f 100644
--- a/third_party/libopenjpeg20/event.h
+++ b/core/src/fxcodec/fx_libopenjpeg/libopenjpeg20/event.h
diff --git a/third_party/libopenjpeg20/function_list.c b/core/src/fxcodec/fx_libopenjpeg/libopenjpeg20/function_list.c
index b9a8b4a7d2..b9a8b4a7d2 100644
--- a/third_party/libopenjpeg20/function_list.c
+++ b/core/src/fxcodec/fx_libopenjpeg/libopenjpeg20/function_list.c
diff --git a/third_party/libopenjpeg20/function_list.h b/core/src/fxcodec/fx_libopenjpeg/libopenjpeg20/function_list.h
index 749ad9e457..749ad9e457 100644
--- a/third_party/libopenjpeg20/function_list.h
+++ b/core/src/fxcodec/fx_libopenjpeg/libopenjpeg20/function_list.h
diff --git a/third_party/libopenjpeg20/image.c b/core/src/fxcodec/fx_libopenjpeg/libopenjpeg20/image.c
index 8e68668e42..8e68668e42 100644
--- a/third_party/libopenjpeg20/image.c
+++ b/core/src/fxcodec/fx_libopenjpeg/libopenjpeg20/image.c
diff --git a/third_party/libopenjpeg20/image.h b/core/src/fxcodec/fx_libopenjpeg/libopenjpeg20/image.h
index e0e2772d40..e0e2772d40 100644
--- a/third_party/libopenjpeg20/image.h
+++ b/core/src/fxcodec/fx_libopenjpeg/libopenjpeg20/image.h
diff --git a/third_party/libopenjpeg20/indexbox_manager.h b/core/src/fxcodec/fx_libopenjpeg/libopenjpeg20/indexbox_manager.h
index ec5525f530..ec5525f530 100644
--- a/third_party/libopenjpeg20/indexbox_manager.h
+++ b/core/src/fxcodec/fx_libopenjpeg/libopenjpeg20/indexbox_manager.h
diff --git a/third_party/libopenjpeg20/invert.c b/core/src/fxcodec/fx_libopenjpeg/libopenjpeg20/invert.c
index 4c1ee780d3..4c1ee780d3 100644
--- a/third_party/libopenjpeg20/invert.c
+++ b/core/src/fxcodec/fx_libopenjpeg/libopenjpeg20/invert.c
diff --git a/third_party/libopenjpeg20/invert.h b/core/src/fxcodec/fx_libopenjpeg/libopenjpeg20/invert.h
index 2fae8e54bd..2fae8e54bd 100644
--- a/third_party/libopenjpeg20/invert.h
+++ b/core/src/fxcodec/fx_libopenjpeg/libopenjpeg20/invert.h
diff --git a/third_party/libopenjpeg20/j2k.c b/core/src/fxcodec/fx_libopenjpeg/libopenjpeg20/j2k.c
index 7b4bc58a6c..7b4bc58a6c 100644
--- a/third_party/libopenjpeg20/j2k.c
+++ b/core/src/fxcodec/fx_libopenjpeg/libopenjpeg20/j2k.c
diff --git a/third_party/libopenjpeg20/j2k.h b/core/src/fxcodec/fx_libopenjpeg/libopenjpeg20/j2k.h
index 10e22aa6b4..10e22aa6b4 100644
--- a/third_party/libopenjpeg20/j2k.h
+++ b/core/src/fxcodec/fx_libopenjpeg/libopenjpeg20/j2k.h
diff --git a/third_party/libopenjpeg20/jp2.c b/core/src/fxcodec/fx_libopenjpeg/libopenjpeg20/jp2.c
index aafbe199d6..aafbe199d6 100644
--- a/third_party/libopenjpeg20/jp2.c
+++ b/core/src/fxcodec/fx_libopenjpeg/libopenjpeg20/jp2.c
diff --git a/third_party/libopenjpeg20/jp2.h b/core/src/fxcodec/fx_libopenjpeg/libopenjpeg20/jp2.h
index 1e41fb6f6d..1e41fb6f6d 100644
--- a/third_party/libopenjpeg20/jp2.h
+++ b/core/src/fxcodec/fx_libopenjpeg/libopenjpeg20/jp2.h
diff --git a/third_party/libopenjpeg20/mct.c b/core/src/fxcodec/fx_libopenjpeg/libopenjpeg20/mct.c
index a0da099660..a0da099660 100644
--- a/third_party/libopenjpeg20/mct.c
+++ b/core/src/fxcodec/fx_libopenjpeg/libopenjpeg20/mct.c
diff --git a/third_party/libopenjpeg20/mct.h b/core/src/fxcodec/fx_libopenjpeg/libopenjpeg20/mct.h
index 1c1f4d0c4d..1c1f4d0c4d 100644
--- a/third_party/libopenjpeg20/mct.h
+++ b/core/src/fxcodec/fx_libopenjpeg/libopenjpeg20/mct.h
diff --git a/third_party/libopenjpeg20/mqc.c b/core/src/fxcodec/fx_libopenjpeg/libopenjpeg20/mqc.c
index 075594b939..075594b939 100644
--- a/third_party/libopenjpeg20/mqc.c
+++ b/core/src/fxcodec/fx_libopenjpeg/libopenjpeg20/mqc.c
diff --git a/third_party/libopenjpeg20/mqc.h b/core/src/fxcodec/fx_libopenjpeg/libopenjpeg20/mqc.h
index 69a2d46029..69a2d46029 100644
--- a/third_party/libopenjpeg20/mqc.h
+++ b/core/src/fxcodec/fx_libopenjpeg/libopenjpeg20/mqc.h
diff --git a/third_party/libopenjpeg20/openjpeg.c b/core/src/fxcodec/fx_libopenjpeg/libopenjpeg20/openjpeg.c
index 4907c0cf45..4907c0cf45 100644
--- a/third_party/libopenjpeg20/openjpeg.c
+++ b/core/src/fxcodec/fx_libopenjpeg/libopenjpeg20/openjpeg.c
diff --git a/third_party/libopenjpeg20/openjpeg.h b/core/src/fxcodec/fx_libopenjpeg/libopenjpeg20/openjpeg.h
index 4a8e75ce5a..4a8e75ce5a 100644
--- a/third_party/libopenjpeg20/openjpeg.h
+++ b/core/src/fxcodec/fx_libopenjpeg/libopenjpeg20/openjpeg.h
diff --git a/third_party/libopenjpeg20/opj_clock.c b/core/src/fxcodec/fx_libopenjpeg/libopenjpeg20/opj_clock.c
index 0df99ef04d..0df99ef04d 100644
--- a/third_party/libopenjpeg20/opj_clock.c
+++ b/core/src/fxcodec/fx_libopenjpeg/libopenjpeg20/opj_clock.c
diff --git a/third_party/libopenjpeg20/opj_clock.h b/core/src/fxcodec/fx_libopenjpeg/libopenjpeg20/opj_clock.h
index 6f5168b572..6f5168b572 100644
--- a/third_party/libopenjpeg20/opj_clock.h
+++ b/core/src/fxcodec/fx_libopenjpeg/libopenjpeg20/opj_clock.h
diff --git a/third_party/libopenjpeg20/opj_codec.h b/core/src/fxcodec/fx_libopenjpeg/libopenjpeg20/opj_codec.h
index 6bd791fa7a..6bd791fa7a 100644
--- a/third_party/libopenjpeg20/opj_codec.h
+++ b/core/src/fxcodec/fx_libopenjpeg/libopenjpeg20/opj_codec.h
diff --git a/third_party/libopenjpeg20/opj_config.h b/core/src/fxcodec/fx_libopenjpeg/libopenjpeg20/opj_config.h
index 37bc9ba3c3..37bc9ba3c3 100644
--- a/third_party/libopenjpeg20/opj_config.h
+++ b/core/src/fxcodec/fx_libopenjpeg/libopenjpeg20/opj_config.h
diff --git a/third_party/libopenjpeg20/opj_config.h.cmake.in b/core/src/fxcodec/fx_libopenjpeg/libopenjpeg20/opj_config.h.cmake.in
index 5f762ca3da..5f762ca3da 100644
--- a/third_party/libopenjpeg20/opj_config.h.cmake.in
+++ b/core/src/fxcodec/fx_libopenjpeg/libopenjpeg20/opj_config.h.cmake.in
diff --git a/third_party/libopenjpeg20/opj_config_private.h b/core/src/fxcodec/fx_libopenjpeg/libopenjpeg20/opj_config_private.h
index 7d7e3ea463..7d7e3ea463 100644
--- a/third_party/libopenjpeg20/opj_config_private.h
+++ b/core/src/fxcodec/fx_libopenjpeg/libopenjpeg20/opj_config_private.h
diff --git a/third_party/libopenjpeg20/opj_includes.h b/core/src/fxcodec/fx_libopenjpeg/libopenjpeg20/opj_includes.h
index e3d4686488..e3d4686488 100644
--- a/third_party/libopenjpeg20/opj_includes.h
+++ b/core/src/fxcodec/fx_libopenjpeg/libopenjpeg20/opj_includes.h
diff --git a/third_party/libopenjpeg20/opj_intmath.h b/core/src/fxcodec/fx_libopenjpeg/libopenjpeg20/opj_intmath.h
index 4e299469de..4e299469de 100644
--- a/third_party/libopenjpeg20/opj_intmath.h
+++ b/core/src/fxcodec/fx_libopenjpeg/libopenjpeg20/opj_intmath.h
diff --git a/third_party/libopenjpeg20/opj_inttypes.h b/core/src/fxcodec/fx_libopenjpeg/libopenjpeg20/opj_inttypes.h
index e74aed6a17..e74aed6a17 100644
--- a/third_party/libopenjpeg20/opj_inttypes.h
+++ b/core/src/fxcodec/fx_libopenjpeg/libopenjpeg20/opj_inttypes.h
diff --git a/third_party/libopenjpeg20/opj_malloc.h b/core/src/fxcodec/fx_libopenjpeg/libopenjpeg20/opj_malloc.h
index 5007b0c9e2..5007b0c9e2 100644
--- a/third_party/libopenjpeg20/opj_malloc.h
+++ b/core/src/fxcodec/fx_libopenjpeg/libopenjpeg20/opj_malloc.h
diff --git a/third_party/libopenjpeg20/opj_stdint.h b/core/src/fxcodec/fx_libopenjpeg/libopenjpeg20/opj_stdint.h
index b8556a1938..b8556a1938 100644
--- a/third_party/libopenjpeg20/opj_stdint.h
+++ b/core/src/fxcodec/fx_libopenjpeg/libopenjpeg20/opj_stdint.h
diff --git a/third_party/libopenjpeg20/pi.c b/core/src/fxcodec/fx_libopenjpeg/libopenjpeg20/pi.c
index 393a1e5540..393a1e5540 100644
--- a/third_party/libopenjpeg20/pi.c
+++ b/core/src/fxcodec/fx_libopenjpeg/libopenjpeg20/pi.c
diff --git a/third_party/libopenjpeg20/pi.h b/core/src/fxcodec/fx_libopenjpeg/libopenjpeg20/pi.h
index f239679f5b..f239679f5b 100644
--- a/third_party/libopenjpeg20/pi.h
+++ b/core/src/fxcodec/fx_libopenjpeg/libopenjpeg20/pi.h
diff --git a/third_party/libopenjpeg20/raw.c b/core/src/fxcodec/fx_libopenjpeg/libopenjpeg20/raw.c
index 2498761c42..2498761c42 100644
--- a/third_party/libopenjpeg20/raw.c
+++ b/core/src/fxcodec/fx_libopenjpeg/libopenjpeg20/raw.c
diff --git a/third_party/libopenjpeg20/raw.h b/core/src/fxcodec/fx_libopenjpeg/libopenjpeg20/raw.h
index 572c666176..572c666176 100644
--- a/third_party/libopenjpeg20/raw.h
+++ b/core/src/fxcodec/fx_libopenjpeg/libopenjpeg20/raw.h
diff --git a/third_party/libopenjpeg20/t1.c b/core/src/fxcodec/fx_libopenjpeg/libopenjpeg20/t1.c
index 8cb230f48e..8cb230f48e 100644
--- a/third_party/libopenjpeg20/t1.c
+++ b/core/src/fxcodec/fx_libopenjpeg/libopenjpeg20/t1.c
diff --git a/third_party/libopenjpeg20/t1.h b/core/src/fxcodec/fx_libopenjpeg/libopenjpeg20/t1.h
index 3bc0ad9ea7..3bc0ad9ea7 100644
--- a/third_party/libopenjpeg20/t1.h
+++ b/core/src/fxcodec/fx_libopenjpeg/libopenjpeg20/t1.h
diff --git a/third_party/libopenjpeg20/t1_generate_luts.c b/core/src/fxcodec/fx_libopenjpeg/libopenjpeg20/t1_generate_luts.c
index 1997d39977..1997d39977 100644
--- a/third_party/libopenjpeg20/t1_generate_luts.c
+++ b/core/src/fxcodec/fx_libopenjpeg/libopenjpeg20/t1_generate_luts.c
diff --git a/third_party/libopenjpeg20/t1_luts.h b/core/src/fxcodec/fx_libopenjpeg/libopenjpeg20/t1_luts.h
index 37776b65a1..37776b65a1 100644
--- a/third_party/libopenjpeg20/t1_luts.h
+++ b/core/src/fxcodec/fx_libopenjpeg/libopenjpeg20/t1_luts.h
diff --git a/third_party/libopenjpeg20/t2.c b/core/src/fxcodec/fx_libopenjpeg/libopenjpeg20/t2.c
index 6f0ac91569..6f0ac91569 100644
--- a/third_party/libopenjpeg20/t2.c
+++ b/core/src/fxcodec/fx_libopenjpeg/libopenjpeg20/t2.c
diff --git a/third_party/libopenjpeg20/t2.h b/core/src/fxcodec/fx_libopenjpeg/libopenjpeg20/t2.h
index 931141e057..931141e057 100644
--- a/third_party/libopenjpeg20/t2.h
+++ b/core/src/fxcodec/fx_libopenjpeg/libopenjpeg20/t2.h
diff --git a/third_party/libopenjpeg20/tcd.c b/core/src/fxcodec/fx_libopenjpeg/libopenjpeg20/tcd.c
index f62312027d..f62312027d 100644
--- a/third_party/libopenjpeg20/tcd.c
+++ b/core/src/fxcodec/fx_libopenjpeg/libopenjpeg20/tcd.c
diff --git a/third_party/libopenjpeg20/tcd.h b/core/src/fxcodec/fx_libopenjpeg/libopenjpeg20/tcd.h
index 9bef0fe7d9..9bef0fe7d9 100644
--- a/third_party/libopenjpeg20/tcd.h
+++ b/core/src/fxcodec/fx_libopenjpeg/libopenjpeg20/tcd.h
diff --git a/third_party/libopenjpeg20/tgt.c b/core/src/fxcodec/fx_libopenjpeg/libopenjpeg20/tgt.c
index 6143c08a65..6143c08a65 100644
--- a/third_party/libopenjpeg20/tgt.c
+++ b/core/src/fxcodec/fx_libopenjpeg/libopenjpeg20/tgt.c
diff --git a/third_party/libopenjpeg20/tgt.h b/core/src/fxcodec/fx_libopenjpeg/libopenjpeg20/tgt.h
index 3d152f8a90..3d152f8a90 100644
--- a/third_party/libopenjpeg20/tgt.h
+++ b/core/src/fxcodec/fx_libopenjpeg/libopenjpeg20/tgt.h
diff --git a/core/src/fxcodec/fx_libopenjpeg/src/fx_bio.c b/core/src/fxcodec/fx_libopenjpeg/src/fx_bio.c
new file mode 100644
index 0000000000..57ed6f83a5
--- /dev/null
+++ b/core/src/fxcodec/fx_libopenjpeg/src/fx_bio.c
@@ -0,0 +1,10 @@
+// Copyright 2014 PDFium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+// Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com
+
+#ifdef _MSC_VER
+#define _CRT_SECURE_NO_WARNINGS
+#endif
+#include "../libopenjpeg20/bio.c"
diff --git a/core/src/fxcodec/fx_libopenjpeg/src/fx_cio.c b/core/src/fxcodec/fx_libopenjpeg/src/fx_cio.c
new file mode 100644
index 0000000000..5f70ee540c
--- /dev/null
+++ b/core/src/fxcodec/fx_libopenjpeg/src/fx_cio.c
@@ -0,0 +1,10 @@
+// Copyright 2014 PDFium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+// Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com
+
+#ifdef _MSC_VER
+#define _CRT_SECURE_NO_WARNINGS
+#endif
+#include "../libopenjpeg20/cio.c"
diff --git a/core/src/fxcodec/fx_libopenjpeg/src/fx_dwt.c b/core/src/fxcodec/fx_libopenjpeg/src/fx_dwt.c
new file mode 100644
index 0000000000..2dd428f1b7
--- /dev/null
+++ b/core/src/fxcodec/fx_libopenjpeg/src/fx_dwt.c
@@ -0,0 +1,10 @@
+// Copyright 2014 PDFium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+// Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com
+
+#ifdef _MSC_VER
+#define _CRT_SECURE_NO_WARNINGS
+#endif
+#include "../libopenjpeg20/dwt.c"
diff --git a/core/src/fxcodec/fx_libopenjpeg/src/fx_event.c b/core/src/fxcodec/fx_libopenjpeg/src/fx_event.c
new file mode 100644
index 0000000000..a7d9bcae10
--- /dev/null
+++ b/core/src/fxcodec/fx_libopenjpeg/src/fx_event.c
@@ -0,0 +1,10 @@
+// Copyright 2014 PDFium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+// Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com
+
+#ifdef _MSC_VER
+#define _CRT_SECURE_NO_WARNINGS
+#endif
+#include "../libopenjpeg20/event.c"
diff --git a/core/src/fxcodec/fx_libopenjpeg/src/fx_function_list.c b/core/src/fxcodec/fx_libopenjpeg/src/fx_function_list.c
new file mode 100644
index 0000000000..499b1419dd
--- /dev/null
+++ b/core/src/fxcodec/fx_libopenjpeg/src/fx_function_list.c
@@ -0,0 +1,10 @@
+// Copyright 2014 PDFium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+// Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com
+
+#ifdef _MSC_VER
+#define _CRT_SECURE_NO_WARNINGS
+#endif
+#include "../libopenjpeg20/function_list.c"
diff --git a/core/src/fxcodec/fx_libopenjpeg/src/fx_image.c b/core/src/fxcodec/fx_libopenjpeg/src/fx_image.c
new file mode 100644
index 0000000000..46b0faab35
--- /dev/null
+++ b/core/src/fxcodec/fx_libopenjpeg/src/fx_image.c
@@ -0,0 +1,10 @@
+// Copyright 2014 PDFium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+// Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com
+
+#ifdef _MSC_VER
+#define _CRT_SECURE_NO_WARNINGS
+#endif
+#include "../libopenjpeg20/image.c"
diff --git a/core/src/fxcodec/fx_libopenjpeg/src/fx_invert.c b/core/src/fxcodec/fx_libopenjpeg/src/fx_invert.c
new file mode 100644
index 0000000000..daa89ab2c3
--- /dev/null
+++ b/core/src/fxcodec/fx_libopenjpeg/src/fx_invert.c
@@ -0,0 +1,10 @@
+// Copyright 2014 PDFium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+// Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com
+
+#ifdef _MSC_VER
+#define _CRT_SECURE_NO_WARNINGS
+#endif
+#include "../libopenjpeg20/invert.c"
diff --git a/core/src/fxcodec/fx_libopenjpeg/src/fx_j2k.c b/core/src/fxcodec/fx_libopenjpeg/src/fx_j2k.c
new file mode 100644
index 0000000000..c3ae6d42d6
--- /dev/null
+++ b/core/src/fxcodec/fx_libopenjpeg/src/fx_j2k.c
@@ -0,0 +1,10 @@
+// Copyright 2014 PDFium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+// Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com
+
+#ifdef _MSC_VER
+#define _CRT_SECURE_NO_WARNINGS
+#endif
+#include "../libopenjpeg20/j2k.c"
diff --git a/core/src/fxcodec/fx_libopenjpeg/src/fx_j2k_lib.c b/core/src/fxcodec/fx_libopenjpeg/src/fx_j2k_lib.c
new file mode 100644
index 0000000000..0aa62a05ba
--- /dev/null
+++ b/core/src/fxcodec/fx_libopenjpeg/src/fx_j2k_lib.c
@@ -0,0 +1,9 @@
+// Copyright 2014 PDFium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+// Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com
+
+#ifdef _MSC_VER
+#define _CRT_SECURE_NO_WARNINGS
+#endif
diff --git a/core/src/fxcodec/fx_libopenjpeg/src/fx_jpt.c b/core/src/fxcodec/fx_libopenjpeg/src/fx_jpt.c
new file mode 100644
index 0000000000..0aa62a05ba
--- /dev/null
+++ b/core/src/fxcodec/fx_libopenjpeg/src/fx_jpt.c
@@ -0,0 +1,9 @@
+// Copyright 2014 PDFium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+// Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com
+
+#ifdef _MSC_VER
+#define _CRT_SECURE_NO_WARNINGS
+#endif
diff --git a/core/src/fxcodec/fx_libopenjpeg/src/fx_mct.c b/core/src/fxcodec/fx_libopenjpeg/src/fx_mct.c
new file mode 100644
index 0000000000..d2a3861a98
--- /dev/null
+++ b/core/src/fxcodec/fx_libopenjpeg/src/fx_mct.c
@@ -0,0 +1,10 @@
+// Copyright 2014 PDFium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+// Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com
+
+#ifdef _MSC_VER
+#define _CRT_SECURE_NO_WARNINGS
+#endif
+#include "../libopenjpeg20/mct.c"
diff --git a/core/src/fxcodec/fx_libopenjpeg/src/fx_mqc.c b/core/src/fxcodec/fx_libopenjpeg/src/fx_mqc.c
new file mode 100644
index 0000000000..bda851de93
--- /dev/null
+++ b/core/src/fxcodec/fx_libopenjpeg/src/fx_mqc.c
@@ -0,0 +1,10 @@
+// Copyright 2014 PDFium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+// Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com
+
+#ifdef _MSC_VER
+#define _CRT_SECURE_NO_WARNINGS
+#endif
+#include "../libopenjpeg20/mqc.c"
diff --git a/core/src/fxcodec/fx_libopenjpeg/src/fx_openjpeg.c b/core/src/fxcodec/fx_libopenjpeg/src/fx_openjpeg.c
new file mode 100644
index 0000000000..8addb90bb9
--- /dev/null
+++ b/core/src/fxcodec/fx_libopenjpeg/src/fx_openjpeg.c
@@ -0,0 +1,10 @@
+// Copyright 2014 PDFium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+// Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com
+
+#ifdef _MSC_VER
+#define _CRT_SECURE_NO_WARNINGS
+#endif
+#include "../libopenjpeg20/openjpeg.c"
diff --git a/core/src/fxcodec/fx_libopenjpeg/src/fx_openjpeg_jp2.c b/core/src/fxcodec/fx_libopenjpeg/src/fx_openjpeg_jp2.c
new file mode 100644
index 0000000000..4271dd0b86
--- /dev/null
+++ b/core/src/fxcodec/fx_libopenjpeg/src/fx_openjpeg_jp2.c
@@ -0,0 +1,10 @@
+// Copyright 2014 PDFium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+// Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com
+
+#ifdef _MSC_VER
+#define _CRT_SECURE_NO_WARNINGS
+#endif
+#include "../libopenjpeg20/jp2.c"
diff --git a/core/src/fxcodec/fx_libopenjpeg/src/fx_opj_clock.c b/core/src/fxcodec/fx_libopenjpeg/src/fx_opj_clock.c
new file mode 100644
index 0000000000..1aed471673
--- /dev/null
+++ b/core/src/fxcodec/fx_libopenjpeg/src/fx_opj_clock.c
@@ -0,0 +1,10 @@
+// Copyright 2014 PDFium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+// Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com
+
+#ifdef _MSC_VER
+#define _CRT_SECURE_NO_WARNINGS
+#endif
+#include "../libopenjpeg20/opj_clock.c"
diff --git a/core/src/fxcodec/fx_libopenjpeg/src/fx_pi.c b/core/src/fxcodec/fx_libopenjpeg/src/fx_pi.c
new file mode 100644
index 0000000000..034a1208bb
--- /dev/null
+++ b/core/src/fxcodec/fx_libopenjpeg/src/fx_pi.c
@@ -0,0 +1,10 @@
+// Copyright 2014 PDFium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+// Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com
+
+#ifdef _MSC_VER
+#define _CRT_SECURE_NO_WARNINGS
+#endif
+#include "../libopenjpeg20/pi.c"
diff --git a/core/src/fxcodec/fx_libopenjpeg/src/fx_raw.c b/core/src/fxcodec/fx_libopenjpeg/src/fx_raw.c
new file mode 100644
index 0000000000..c475df2b65
--- /dev/null
+++ b/core/src/fxcodec/fx_libopenjpeg/src/fx_raw.c
@@ -0,0 +1,10 @@
+// Copyright 2014 PDFium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+// Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com
+
+#ifdef _MSC_VER
+#define _CRT_SECURE_NO_WARNINGS
+#endif
+#include "../libopenjpeg20/raw.c"
diff --git a/core/src/fxcodec/fx_libopenjpeg/src/fx_t1.c b/core/src/fxcodec/fx_libopenjpeg/src/fx_t1.c
new file mode 100644
index 0000000000..ada8ae22ac
--- /dev/null
+++ b/core/src/fxcodec/fx_libopenjpeg/src/fx_t1.c
@@ -0,0 +1,10 @@
+// Copyright 2014 PDFium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+// Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com
+
+#ifdef _MSC_VER
+#define _CRT_SECURE_NO_WARNINGS
+#endif
+#include "../libopenjpeg20/t1.c"
diff --git a/core/src/fxcodec/fx_libopenjpeg/src/fx_t1_generate_luts.c b/core/src/fxcodec/fx_libopenjpeg/src/fx_t1_generate_luts.c
new file mode 100644
index 0000000000..a4b8890154
--- /dev/null
+++ b/core/src/fxcodec/fx_libopenjpeg/src/fx_t1_generate_luts.c
@@ -0,0 +1,10 @@
+// Copyright 2014 PDFium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+// Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com
+
+#ifdef _MSC_VER
+#define _CRT_SECURE_NO_WARNINGS
+#endif
+#include "../libopenjpeg20/t1_generate_luts.c"
diff --git a/core/src/fxcodec/fx_libopenjpeg/src/fx_t2.c b/core/src/fxcodec/fx_libopenjpeg/src/fx_t2.c
new file mode 100644
index 0000000000..4e5ca50783
--- /dev/null
+++ b/core/src/fxcodec/fx_libopenjpeg/src/fx_t2.c
@@ -0,0 +1,10 @@
+// Copyright 2014 PDFium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+// Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com
+
+#ifdef _MSC_VER
+#define _CRT_SECURE_NO_WARNINGS
+#endif
+#include "../libopenjpeg20/t2.c"
diff --git a/core/src/fxcodec/fx_libopenjpeg/src/fx_tcd.c b/core/src/fxcodec/fx_libopenjpeg/src/fx_tcd.c
new file mode 100644
index 0000000000..8d575701ec
--- /dev/null
+++ b/core/src/fxcodec/fx_libopenjpeg/src/fx_tcd.c
@@ -0,0 +1,10 @@
+// Copyright 2014 PDFium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+// Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com
+
+#ifdef _MSC_VER
+#define _CRT_SECURE_NO_WARNINGS
+#endif
+#include "../libopenjpeg20/tcd.c"
diff --git a/core/src/fxcodec/fx_libopenjpeg/src/fx_tgt.c b/core/src/fxcodec/fx_libopenjpeg/src/fx_tgt.c
new file mode 100644
index 0000000000..283dc54b79
--- /dev/null
+++ b/core/src/fxcodec/fx_libopenjpeg/src/fx_tgt.c
@@ -0,0 +1,10 @@
+// Copyright 2014 PDFium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+// Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com
+
+#ifdef _MSC_VER
+#define _CRT_SECURE_NO_WARNINGS
+#endif
+#include "../libopenjpeg20/tgt.c"
diff --git a/pdfium.gyp b/pdfium.gyp
index 54ce6ade25..8b19c83d08 100644
--- a/pdfium.gyp
+++ b/pdfium.gyp
@@ -327,7 +327,6 @@
'dependencies': [
'third_party/third_party.gyp:fx_lcms2',
'third_party/third_party.gyp:fx_libjpeg',
- 'third_party/third_party.gyp:fx_libopenjpeg',
],
'ldflags': [ '-L<(PRODUCT_DIR)',],
'sources': [
@@ -343,6 +342,28 @@
'core/src/fxcodec/codec/fx_codec_jbig_enc.cpp',
'core/src/fxcodec/codec/fx_codec_jpeg.cpp',
'core/src/fxcodec/codec/fx_codec_jpx_opj.cpp',
+ 'core/src/fxcodec/fx_libopenjpeg/include/fx_openjpeg.h',
+ 'core/src/fxcodec/fx_libopenjpeg/src/fx_bio.c',
+ 'core/src/fxcodec/fx_libopenjpeg/src/fx_cio.c',
+ 'core/src/fxcodec/fx_libopenjpeg/src/fx_dwt.c',
+ 'core/src/fxcodec/fx_libopenjpeg/src/fx_event.c',
+ 'core/src/fxcodec/fx_libopenjpeg/src/fx_function_list.c',
+ 'core/src/fxcodec/fx_libopenjpeg/src/fx_image.c',
+ 'core/src/fxcodec/fx_libopenjpeg/src/fx_invert.c',
+ 'core/src/fxcodec/fx_libopenjpeg/src/fx_j2k.c',
+ 'core/src/fxcodec/fx_libopenjpeg/src/fx_j2k_lib.c',
+ 'core/src/fxcodec/fx_libopenjpeg/src/fx_jpt.c',
+ 'core/src/fxcodec/fx_libopenjpeg/src/fx_mct.c',
+ 'core/src/fxcodec/fx_libopenjpeg/src/fx_mqc.c',
+ 'core/src/fxcodec/fx_libopenjpeg/src/fx_openjpeg.c',
+ 'core/src/fxcodec/fx_libopenjpeg/src/fx_openjpeg_jp2.c',
+ 'core/src/fxcodec/fx_libopenjpeg/src/fx_opj_clock.c',
+ 'core/src/fxcodec/fx_libopenjpeg/src/fx_pi.c',
+ 'core/src/fxcodec/fx_libopenjpeg/src/fx_raw.c',
+ 'core/src/fxcodec/fx_libopenjpeg/src/fx_t1.c',
+ 'core/src/fxcodec/fx_libopenjpeg/src/fx_t2.c',
+ 'core/src/fxcodec/fx_libopenjpeg/src/fx_tcd.c',
+ 'core/src/fxcodec/fx_libopenjpeg/src/fx_tgt.c',
'core/src/fxcodec/fx_zlib/include/fx_zlib.h',
'core/src/fxcodec/fx_zlib/src/fx_zlib_adler32.c',
'core/src/fxcodec/fx_zlib/src/fx_zlib_compress.c',
diff --git a/third_party/BUILD.gn b/third_party/BUILD.gn
index 666afe557d..11da543683 100644
--- a/third_party/BUILD.gn
+++ b/third_party/BUILD.gn
@@ -13,8 +13,8 @@ group("third_party") {
source_set("bigint") {
configs -= [ "//build/config/compiler:chromium_code" ]
configs += [
- "//build/config/compiler:no_chromium_code",
"//third_party/pdfium:pdfium_config",
+ "//build/config/compiler:no_chromium_code",
]
sources = [
"bigint/BigInteger.cc",
@@ -33,8 +33,8 @@ source_set("bigint") {
source_set("freetype") {
configs -= [ "//build/config/compiler:chromium_code" ]
configs += [
- "//build/config/compiler:no_chromium_code",
"//third_party/pdfium:pdfium_config",
+ "//build/config/compiler:no_chromium_code",
]
defines = [ "FT2_BUILD_LIBRARY" ]
sources = [
@@ -196,41 +196,11 @@ source_set("fx_libjpeg") {
]
}
-source_set("fx_libopenjpeg") {
- configs -= [ "//build/config/compiler:chromium_code" ]
- configs += [
- "//build/config/compiler:no_chromium_code",
- "//third_party/pdfium:pdfium_config",
- ]
- defines = [ "_CRT_SECURE_NO_WARNINGS" ]
- sources = [
- "libopenjpeg20/bio.c",
- "libopenjpeg20/cio.c",
- "libopenjpeg20/dwt.c",
- "libopenjpeg20/event.c",
- "libopenjpeg20/function_list.c",
- "libopenjpeg20/image.c",
- "libopenjpeg20/invert.c",
- "libopenjpeg20/j2k.c",
- "libopenjpeg20/jp2.c",
- "libopenjpeg20/mct.c",
- "libopenjpeg20/mqc.c",
- "libopenjpeg20/openjpeg.c",
- "libopenjpeg20/opj_clock.c",
- "libopenjpeg20/pi.c",
- "libopenjpeg20/raw.c",
- "libopenjpeg20/t1.c",
- "libopenjpeg20/t2.c",
- "libopenjpeg20/tcd.c",
- "libopenjpeg20/tgt.c",
- ]
-}
-
source_set("pdfium_base") {
configs -= [ "//build/config/compiler:chromium_code" ]
configs += [
- "//build/config/compiler:no_chromium_code",
"//third_party/pdfium:pdfium_config",
+ "//build/config/compiler:no_chromium_code",
]
sources = [
"base/logging.h",
diff --git a/third_party/third_party.gyp b/third_party/third_party.gyp
index a385036e49..6dbff565a4 100644
--- a/third_party/third_party.gyp
+++ b/third_party/third_party.gyp
@@ -200,34 +200,6 @@
],
},
{
- 'target_name': 'fx_libopenjpeg',
- 'type': 'static_library',
- 'defines': [
- '_CRT_SECURE_NO_WARNINGS',
- ],
- 'sources': [
- 'libopenjpeg20/bio.c',
- 'libopenjpeg20/cio.c',
- 'libopenjpeg20/dwt.c',
- 'libopenjpeg20/event.c',
- 'libopenjpeg20/function_list.c',
- 'libopenjpeg20/image.c',
- 'libopenjpeg20/invert.c',
- 'libopenjpeg20/j2k.c',
- 'libopenjpeg20/jp2.c',
- 'libopenjpeg20/mct.c',
- 'libopenjpeg20/mqc.c',
- 'libopenjpeg20/openjpeg.c',
- 'libopenjpeg20/opj_clock.c',
- 'libopenjpeg20/pi.c',
- 'libopenjpeg20/raw.c',
- 'libopenjpeg20/t1.c',
- 'libopenjpeg20/t2.c',
- 'libopenjpeg20/tcd.c',
- 'libopenjpeg20/tgt.c',
- ],
- },
- {
'target_name': 'pdfium_base',
'type': 'none',
'sources': [