Merge to XF: Disintermediation.
authorTom Sepez <tsepez@chromium.org>
Fri, 19 Jun 2015 20:56:28 +0000 (13:56 -0700)
committerTom Sepez <tsepez@chromium.org>
Fri, 19 Jun 2015 20:56:28 +0000 (13:56 -0700)
(cherry picked from commit 012ada613a1462f109eb59790f8e5ee91aacdb7e)
Review URL: https://codereview.chromium.org/1199553002.

TBR=thestig@chromium.org

Review URL: https://codereview.chromium.org/1197893002.

15 files changed:
BUILD.gn
core/src/fpdfapi/fpdf_parser/fpdf_parser_filters.cpp
core/src/fxcodec/codec/fx_codec_flate.cpp
core/src/fxcodec/codec/fx_codec_icc.cpp
core/src/fxcodec/codec/fx_codec_jpeg.cpp
core/src/fxcodec/codec/fx_codec_jpx_opj.cpp
core/src/fxcodec/fx_lpng/lpng_v163/pngstruct.h
core/src/fxcodec/fx_tiff/tiff_v403/tif_pixarlog.c
core/src/fxcodec/fx_tiff/tiff_v403/tif_zip.c
core/src/fxcodec/fx_zlib/include/fx_zlib.h [deleted file]
core/src/fxcodec/lcms2/fx_lcms2.h [deleted file]
core/src/fxcodec/lcms2/fx_lcms2_plugin.h [deleted file]
core/src/fxcodec/libjpeg/fx_libjpeg.h [deleted file]
pdfium.gyp
samples/image_diff_png.cc

index 050f93c..b236c7b 100644 (file)
--- a/BUILD.gn
+++ b/BUILD.gn
@@ -390,7 +390,6 @@ static_library("fxcodec") {
     "core/src/fxcodec/fx_tiff/src/fx_tif_warning.c",
     "core/src/fxcodec/fx_tiff/src/fx_tif_write.c",
     "core/src/fxcodec/fx_tiff/src/fx_tif_zip.c",
-    "core/src/fxcodec/fx_zlib/include/fx_zlib.h",
     "core/src/fxcodec/jbig2/JBig2_ArithDecoder.h",
     "core/src/fxcodec/jbig2/JBig2_ArithIntDecoder.cpp",
     "core/src/fxcodec/jbig2/JBig2_ArithIntDecoder.h",
@@ -421,11 +420,8 @@ static_library("fxcodec") {
     "core/src/fxcodec/jbig2/JBig2_SymbolDict.h",
     "core/src/fxcodec/lbmp/fx_bmp.cpp",
     "core/src/fxcodec/lbmp/fx_bmp.h",
-    "core/src/fxcodec/lcms2/fx_lcms2.h",
-    "core/src/fxcodec/lcms2/fx_lcms2_plugin.h",
     "core/src/fxcodec/lgif/fx_gif.cpp",
     "core/src/fxcodec/lgif/fx_gif.h",
-    "core/src/fxcodec/libjpeg/fx_libjpeg.h",
   ]
   configs -= [ "//build/config/compiler:chromium_code" ]
 
index ead5e24..ac48dc6 100644 (file)
@@ -4,10 +4,10 @@
 
 // Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com
 
+#include "../../../../third_party/zlib_v128/zlib.h"
 #include "../../../include/fpdfapi/fpdf_parser.h"
 #include "../../../include/fxcodec/fx_codec.h"
 #include "../../../include/fpdfapi/fpdf_module.h"
-#include "../../fxcodec/fx_zlib/include/fx_zlib.h"
 #include "filters_int.h"
 
 CFX_DataFilter::CFX_DataFilter()
index 8add31f..99643e4 100644 (file)
@@ -5,8 +5,8 @@
 // Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com
 
 #include "../../../../third_party/base/nonstd_unique_ptr.h"
+#include "../../../../third_party/zlib_v128/zlib.h"
 #include "../../../include/fxcodec/fx_codec.h"
-#include "../fx_zlib/include/fx_zlib.h"
 #include "codec_int.h"
 
 extern "C"
index f33d085..703d00a 100644 (file)
@@ -4,8 +4,8 @@
 
 // Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com
 
+#include "../../../../third_party/lcms2-2.6/include/lcms2.h"
 #include "../../../include/fxcodec/fx_codec.h"
-#include "../lcms2/fx_lcms2.h"
 #include "codec_int.h"
 
 const FX_DWORD N_COMPONENT_LAB = 3;
index 3115ca2..52f8358 100644 (file)
 #include "codec_int.h"
 
 extern "C" {
+#undef FAR
+#include "../../../../third_party/libjpeg/jpeglib.h"
+}
+
+extern "C" {
     static void _JpegScanSOI(const uint8_t*& src_buf, FX_DWORD& src_size)
     {
         if (src_size == 0) {
@@ -29,10 +34,6 @@ extern "C" {
     }
 };
 extern "C" {
-#undef FAR
-#include "../libjpeg/fx_libjpeg.h"
-}
-extern "C" {
     static void _src_do_nothing(struct jpeg_decompress_struct* cinfo) {}
 };
 extern "C" {
index 8b1759e..2d395b0 100644 (file)
@@ -7,9 +7,9 @@
 #include <algorithm>
 #include <limits>
 
+#include "../../../../third_party/lcms2-2.6/include/lcms2.h"
 #include "../../../../third_party/libopenjpeg20/openjpeg.h"
 #include "../../../include/fxcodec/fx_codec.h"
-#include "../lcms2/fx_lcms2.h"
 #include "codec_int.h"
 
 static void fx_error_callback(const char *msg, void *client_data)
index 2694705..25355c4 100644 (file)
@@ -28,7 +28,7 @@
    /* We must ensure that zlib uses 'const' in declarations. */\r
 #  define ZLIB_CONST\r
 #endif\r
-#include "../../fx_zlib/include/fx_zlib.h"\r
+#include "../../../third_party/zlib_v128/zlib.h"\r
 #ifdef const\r
    /* zlib.h sometimes #defines const to nothing, undo this. */\r
 #  undef const\r
index 9521338..eba913e 100644 (file)
@@ -89,7 +89,7 @@
  */
 
 #include "tif_predict.h"
-#include "../../fx_zlib/include/fx_zlib.h"
+#include "../../../../../third_party/zlib_v128/zlib.h"
 
 #include <stdio.h>
 #include <stdlib.h>
index f6e2358..131db72 100644 (file)
@@ -46,7 +46,7 @@
  * last found at ftp://ftp.uu.net/pub/archiving/zip/zlib/zlib-0.99.tar.gz.
  */
 #include "tif_predict.h"
-#include "../../fx_zlib/include/fx_zlib.h"
+#include "../../../../../third_party/zlib_v128/zlib.h"
 
 #include <stdio.h>
 
diff --git a/core/src/fxcodec/fx_zlib/include/fx_zlib.h b/core/src/fxcodec/fx_zlib/include/fx_zlib.h
deleted file mode 100644 (file)
index 88742f4..0000000
+++ /dev/null
@@ -1,15 +0,0 @@
-// 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_ZLIB_INCLUDE_FX_ZLIB_H_
-#define CORE_SRC_FXCODEC_FX_ZLIB_INCLUDE_FX_ZLIB_H_
-
-#ifdef _MSC_VER
-#define _CRT_SECURE_NO_WARNINGS
-#endif
-#include "../../../../../third_party/zlib_v128/zlib.h"
-
-#endif  // CORE_SRC_FXCODEC_FX_ZLIB_INCLUDE_FX_ZLIB_H_
diff --git a/core/src/fxcodec/lcms2/fx_lcms2.h b/core/src/fxcodec/lcms2/fx_lcms2.h
deleted file mode 100644 (file)
index 86b4fad..0000000
+++ /dev/null
@@ -1,12 +0,0 @@
-// 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_LCMS2_INCLUDE_FX_LCMS2_H_
-#define CORE_SRC_FXCODEC_LCMS2_INCLUDE_FX_LCMS2_H_
-
-#include "../../../../third_party/lcms2-2.6/include/lcms2.h"
-
-#endif  // CORE_SRC_FXCODEC_LCMS2_INCLUDE_FX_LCMS2_H_
diff --git a/core/src/fxcodec/lcms2/fx_lcms2_plugin.h b/core/src/fxcodec/lcms2/fx_lcms2_plugin.h
deleted file mode 100644 (file)
index 86b722d..0000000
+++ /dev/null
@@ -1,12 +0,0 @@
-// 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_LCMS2_INCLUDE_FX_LCMS2_PLUGIN_H_
-#define CORE_SRC_FXCODEC_LCMS2_INCLUDE_FX_LCMS2_PLUGIN_H_
-
-#include "../../../../third_party/lcms2-2.6/include/lcms2_plugin.h"
-
-#endif  // CORE_SRC_FXCODEC_LCMS2_INCLUDE_FX_LCMS2_PLUGIN_H_
diff --git a/core/src/fxcodec/libjpeg/fx_libjpeg.h b/core/src/fxcodec/libjpeg/fx_libjpeg.h
deleted file mode 100644 (file)
index 7cab1a4..0000000
+++ /dev/null
@@ -1,12 +0,0 @@
-// 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_LIBJPEG_FX_LIBJPEG_H_
-#define CORE_SRC_FXCODEC_LIBJPEG_FX_LIBJPEG_H_
-
-#include "../../../../third_party/libjpeg/jpeglib.h"
-
-#endif  // CORE_SRC_FXCODEC_LIBJPEG_FX_LIBJPEG_H_
index 5fb0225..f95a4a6 100644 (file)
         'core/src/fxcodec/fx_tiff/src/fx_tif_warning.c',
         'core/src/fxcodec/fx_tiff/src/fx_tif_write.c',
         'core/src/fxcodec/fx_tiff/src/fx_tif_zip.c',
-        'core/src/fxcodec/fx_zlib/include/fx_zlib.h',
         'core/src/fxcodec/jbig2/JBig2_ArithDecoder.h',
         'core/src/fxcodec/jbig2/JBig2_ArithIntDecoder.cpp',
         'core/src/fxcodec/jbig2/JBig2_ArithIntDecoder.h',
         'core/src/fxcodec/jbig2/JBig2_SymbolDict.h',
         'core/src/fxcodec/lbmp/fx_bmp.cpp',
         'core/src/fxcodec/lbmp/fx_bmp.h',
-        'core/src/fxcodec/lcms2/fx_lcms2.h',
-        'core/src/fxcodec/lcms2/fx_lcms2_plugin.h',
         'core/src/fxcodec/lgif/fx_gif.cpp',
         'core/src/fxcodec/lgif/fx_gif.h',
-        'core/src/fxcodec/libjpeg/fx_libjpeg.h',
       ],
       'msvs_settings': {
         'VCCLCompilerTool': {
index 8dd597f..7d53dec 100644 (file)
@@ -17,8 +17,8 @@
 #include <string>
 
 #include "../third_party/base/logging.h"
+#include "../third_party/zlib_v128/zlib.h"
 #include "../core/src/fxcodec/fx_lpng/include/fx_png.h"
-#include "../core/src/fxcodec/fx_zlib/include/fx_zlib.h"
 
 namespace image_diff_png {