diff options
author | Tom Sepez <tsepez@chromium.org> | 2015-06-16 16:29:44 -0700 |
---|---|---|
committer | Tom Sepez <tsepez@chromium.org> | 2015-06-16 16:29:44 -0700 |
commit | 2ca8fcbc8a7a3ef6adfac154c47068c1696205d0 (patch) | |
tree | de3f825c75b1b92908825f68af8a4e7146cf97fd | |
parent | ea44bd064a86679a47a7265020f997d6e3b88336 (diff) | |
download | pdfium-2ca8fcbc8a7a3ef6adfac154c47068c1696205d0.tar.xz |
Separate agg-authored code from fx-authored code.chromium/2439chromium/2438chromium/2437chromium/2436chromium/2435
Creates a separate library so we can apply less-strict warnings to
the code we can't change from upstream vs. the code we can change,
reducing noise in the standalone build.
Remove needless foo.{cpp,h} files that merely perform indirection
via #include "some_other_path/foo.{cpp,h}".
BUG=pdfium:166
R=brucedawson@chromium.org, thestig@chromium.org
Review URL: https://codereview.chromium.org/1152743007.
-rw-r--r-- | BUILD.gn | 20 | ||||
-rw-r--r-- | core/src/fxge/agg/DEPS | 3 | ||||
-rw-r--r-- | core/src/fxge/agg/include/fx_agg_driver.h | 5 | ||||
-rw-r--r-- | core/src/fxge/agg/include/fxfx_agg_basics.h | 12 | ||||
-rw-r--r-- | core/src/fxge/agg/include/fxfx_agg_clip_liang_barsky.h | 12 | ||||
-rw-r--r-- | core/src/fxge/agg/include/fxfx_agg_conv_dash.h | 12 | ||||
-rw-r--r-- | core/src/fxge/agg/include/fxfx_agg_conv_stroke.h | 12 | ||||
-rw-r--r-- | core/src/fxge/agg/include/fxfx_agg_curves.h | 12 | ||||
-rw-r--r-- | core/src/fxge/agg/include/fxfx_agg_path_storage.h | 12 | ||||
-rw-r--r-- | core/src/fxge/agg/include/fxfx_agg_rasterizer_scanline_aa.h | 12 | ||||
-rw-r--r-- | core/src/fxge/agg/include/fxfx_agg_renderer_scanline.h | 12 | ||||
-rw-r--r-- | core/src/fxge/agg/include/fxfx_agg_rendering_buffer.h | 12 | ||||
-rw-r--r-- | core/src/fxge/agg/include/fxfx_agg_scanline_u.h | 12 | ||||
-rw-r--r-- | core/src/fxge/agg/src/fx_agg_driver.cpp (renamed from core/src/fxge/agg/agg23/fx_agg_driver.cpp) | 16 | ||||
-rw-r--r-- | core/src/fxge/agg/src/fxfx_agg_curves.cpp | 7 | ||||
-rw-r--r-- | core/src/fxge/agg/src/fxfx_agg_driver.cpp | 7 | ||||
-rw-r--r-- | core/src/fxge/agg/src/fxfx_agg_path_storage.cpp | 7 | ||||
-rw-r--r-- | core/src/fxge/agg/src/fxfx_agg_rasterizer_scanline_aa.cpp | 7 | ||||
-rw-r--r-- | core/src/fxge/agg/src/fxfx_agg_vcgen_dash.cpp | 7 | ||||
-rw-r--r-- | core/src/fxge/agg/src/fxfx_agg_vcgen_stroke.cpp | 7 | ||||
-rw-r--r-- | core/src/fxge/apple/fx_apple_platform.cpp | 17 | ||||
-rw-r--r-- | core/src/fxge/apple/fx_quartz_device.cpp | 10 | ||||
-rw-r--r-- | core/src/fxge/ge/fx_ge_linux.cpp | 3 | ||||
-rw-r--r-- | core/src/fxge/win32/fx_win32_device.cpp | 19 | ||||
-rw-r--r-- | pdfium.gyp | 24 | ||||
-rw-r--r-- | third_party/BUILD.gn | 25 | ||||
-rw-r--r-- | third_party/agg23/agg_array.h (renamed from core/src/fxge/agg/agg23/agg_array.h) | 0 | ||||
-rw-r--r-- | third_party/agg23/agg_basics.h (renamed from core/src/fxge/agg/agg23/agg_basics.h) | 0 | ||||
-rw-r--r-- | third_party/agg23/agg_clip_liang_barsky.h (renamed from core/src/fxge/agg/agg23/agg_clip_liang_barsky.h) | 0 | ||||
-rw-r--r-- | third_party/agg23/agg_color_gray.h (renamed from core/src/fxge/agg/agg23/agg_color_gray.h) | 0 | ||||
-rw-r--r-- | third_party/agg23/agg_conv_adaptor_vcgen.h (renamed from core/src/fxge/agg/agg23/agg_conv_adaptor_vcgen.h) | 0 | ||||
-rw-r--r-- | third_party/agg23/agg_conv_dash.h (renamed from core/src/fxge/agg/agg23/agg_conv_dash.h) | 0 | ||||
-rw-r--r-- | third_party/agg23/agg_conv_stroke.h (renamed from core/src/fxge/agg/agg23/agg_conv_stroke.h) | 0 | ||||
-rw-r--r-- | third_party/agg23/agg_curves.cpp (renamed from core/src/fxge/agg/agg23/fx_agg_curves.cpp) | 2 | ||||
-rw-r--r-- | third_party/agg23/agg_curves.h (renamed from core/src/fxge/agg/agg23/agg_curves.h) | 0 | ||||
-rw-r--r-- | third_party/agg23/agg_math.h (renamed from core/src/fxge/agg/agg23/agg_math.h) | 0 | ||||
-rw-r--r-- | third_party/agg23/agg_math_stroke.h (renamed from core/src/fxge/agg/agg23/agg_math_stroke.h) | 0 | ||||
-rw-r--r-- | third_party/agg23/agg_path_storage.cpp (renamed from core/src/fxge/agg/agg23/fx_agg_path_storage.cpp) | 2 | ||||
-rw-r--r-- | third_party/agg23/agg_path_storage.h (renamed from core/src/fxge/agg/agg23/agg_path_storage.h) | 0 | ||||
-rw-r--r-- | third_party/agg23/agg_pixfmt_gray.h (renamed from core/src/fxge/agg/agg23/agg_pixfmt_gray.h) | 0 | ||||
-rw-r--r-- | third_party/agg23/agg_rasterizer_scanline_aa.cpp (renamed from core/src/fxge/agg/agg23/fx_agg_rasterizer_scanline_aa.cpp) | 2 | ||||
-rw-r--r-- | third_party/agg23/agg_rasterizer_scanline_aa.h (renamed from core/src/fxge/agg/agg23/agg_rasterizer_scanline_aa.h) | 2 | ||||
-rw-r--r-- | third_party/agg23/agg_render_scanlines.h (renamed from core/src/fxge/agg/agg23/agg_render_scanlines.h) | 0 | ||||
-rw-r--r-- | third_party/agg23/agg_renderer_base.h (renamed from core/src/fxge/agg/agg23/agg_renderer_base.h) | 0 | ||||
-rw-r--r-- | third_party/agg23/agg_renderer_scanline.h (renamed from core/src/fxge/agg/agg23/agg_renderer_scanline.h) | 0 | ||||
-rw-r--r-- | third_party/agg23/agg_rendering_buffer.h (renamed from core/src/fxge/agg/agg23/agg_rendering_buffer.h) | 0 | ||||
-rw-r--r-- | third_party/agg23/agg_scanline_u.h (renamed from core/src/fxge/agg/agg23/agg_scanline_u.h) | 0 | ||||
-rw-r--r-- | third_party/agg23/agg_shorten_path.h (renamed from core/src/fxge/agg/agg23/agg_shorten_path.h) | 0 | ||||
-rw-r--r-- | third_party/agg23/agg_vcgen_dash.cpp (renamed from core/src/fxge/agg/agg23/fx_agg_vcgen_dash.cpp) | 2 | ||||
-rw-r--r-- | third_party/agg23/agg_vcgen_dash.h (renamed from core/src/fxge/agg/agg23/agg_vcgen_dash.h) | 0 | ||||
-rw-r--r-- | third_party/agg23/agg_vcgen_stroke.cpp (renamed from core/src/fxge/agg/agg23/fx_agg_vcgen_stroke.cpp) | 2 | ||||
-rw-r--r-- | third_party/agg23/agg_vcgen_stroke.h (renamed from core/src/fxge/agg/agg23/agg_vcgen_stroke.h) | 0 | ||||
-rw-r--r-- | third_party/agg23/agg_vertex_sequence.h (renamed from core/src/fxge/agg/agg23/agg_vertex_sequence.h) | 0 | ||||
-rw-r--r-- | third_party/third_party.gyp | 27 |
54 files changed, 110 insertions, 233 deletions
@@ -558,6 +558,9 @@ static_library("fxcrt") { } static_library("fxge") { + deps = [ + "third_party:fx_agg", + ] sources = [ "core/include/fxge/fpf.h", "core/include/fxge/fx_dib.h", @@ -567,22 +570,7 @@ static_library("fxge") { "core/include/fxge/fx_ge_apple.h", "core/include/fxge/fx_ge_win32.h", "core/src/fxge/agg/include/fx_agg_driver.h", - "core/src/fxge/agg/include/fxfx_agg_basics.h", - "core/src/fxge/agg/include/fxfx_agg_clip_liang_barsky.h", - "core/src/fxge/agg/include/fxfx_agg_conv_dash.h", - "core/src/fxge/agg/include/fxfx_agg_conv_stroke.h", - "core/src/fxge/agg/include/fxfx_agg_curves.h", - "core/src/fxge/agg/include/fxfx_agg_path_storage.h", - "core/src/fxge/agg/include/fxfx_agg_rasterizer_scanline_aa.h", - "core/src/fxge/agg/include/fxfx_agg_renderer_scanline.h", - "core/src/fxge/agg/include/fxfx_agg_rendering_buffer.h", - "core/src/fxge/agg/include/fxfx_agg_scanline_u.h", - "core/src/fxge/agg/src/fxfx_agg_curves.cpp", - "core/src/fxge/agg/src/fxfx_agg_driver.cpp", - "core/src/fxge/agg/src/fxfx_agg_path_storage.cpp", - "core/src/fxge/agg/src/fxfx_agg_rasterizer_scanline_aa.cpp", - "core/src/fxge/agg/src/fxfx_agg_vcgen_dash.cpp", - "core/src/fxge/agg/src/fxfx_agg_vcgen_stroke.cpp", + "core/src/fxge/agg/src/fx_agg_driver.cpp", "core/src/fxge/android/fpf_skiafont.cpp", "core/src/fxge/android/fpf_skiafont.h", "core/src/fxge/android/fpf_skiafontmgr.cpp", diff --git a/core/src/fxge/agg/DEPS b/core/src/fxge/agg/DEPS new file mode 100644 index 0000000000..25d9e110e6 --- /dev/null +++ b/core/src/fxge/agg/DEPS @@ -0,0 +1,3 @@ +include_rules = [ + '+third_party/agg23', +] diff --git a/core/src/fxge/agg/include/fx_agg_driver.h b/core/src/fxge/agg/include/fx_agg_driver.h index 803227e044..29b56c77e4 100644 --- a/core/src/fxge/agg/include/fx_agg_driver.h +++ b/core/src/fxge/agg/include/fx_agg_driver.h @@ -7,8 +7,9 @@ #ifndef FX_AGG_DRIVER_H_ #define FX_AGG_DRIVER_H_ -#include "fxfx_agg_path_storage.h" -#include "fxfx_agg_rasterizer_scanline_aa.h" +#include "../../../../../third_party/agg23/agg_clip_liang_barsky.h" +#include "../../../../../third_party/agg23/agg_path_storage.h" +#include "../../../../../third_party/agg23/agg_rasterizer_scanline_aa.h" class CAgg_PathData { diff --git a/core/src/fxge/agg/include/fxfx_agg_basics.h b/core/src/fxge/agg/include/fxfx_agg_basics.h deleted file mode 100644 index e27a843bba..0000000000 --- a/core/src/fxge/agg/include/fxfx_agg_basics.h +++ /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 FXFX_AGG_BASICS_H_ -#define FXFX_AGG_BASICS_H_ - -#include "../agg23/agg_basics.h" - -#endif // FXFX_AGG_BASICS_H_ diff --git a/core/src/fxge/agg/include/fxfx_agg_clip_liang_barsky.h b/core/src/fxge/agg/include/fxfx_agg_clip_liang_barsky.h deleted file mode 100644 index 2b64bf900a..0000000000 --- a/core/src/fxge/agg/include/fxfx_agg_clip_liang_barsky.h +++ /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 FXFX_AGG_CLIP_LIANG_BARSKY_H_ -#define FXFX_AGG_CLIP_LIANG_BARSKY_H_ - -#include "../agg23/agg_clip_liang_barsky.h" - -#endif // FXFX_AGG_CLIP_LIANG_BARSKY_H_ diff --git a/core/src/fxge/agg/include/fxfx_agg_conv_dash.h b/core/src/fxge/agg/include/fxfx_agg_conv_dash.h deleted file mode 100644 index fb1e42dae9..0000000000 --- a/core/src/fxge/agg/include/fxfx_agg_conv_dash.h +++ /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 FXFX_AGG_CONV_DASH_H_ -#define FXFX_AGG_CONV_DASH_H_ - -#include "../agg23/agg_conv_dash.h" - -#endif // FXFX_AGG_CONV_DASH_H_ diff --git a/core/src/fxge/agg/include/fxfx_agg_conv_stroke.h b/core/src/fxge/agg/include/fxfx_agg_conv_stroke.h deleted file mode 100644 index 531df5012e..0000000000 --- a/core/src/fxge/agg/include/fxfx_agg_conv_stroke.h +++ /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 FXFX_AGG_CONV_STROKE_H_ -#define FXFX_AGG_CONV_STROKE_H_ - -#include "../agg23/agg_conv_stroke.h" - -#endif // FXFX_AGG_CONV_STROKE_H_ diff --git a/core/src/fxge/agg/include/fxfx_agg_curves.h b/core/src/fxge/agg/include/fxfx_agg_curves.h deleted file mode 100644 index 1879958eca..0000000000 --- a/core/src/fxge/agg/include/fxfx_agg_curves.h +++ /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 FXFX_AGG_CURVES_H_ -#define FXFX_AGG_CURVES_H_ - -#include "../agg23/agg_curves.h" - -#endif // FXFX_AGG_CURVES_H_ diff --git a/core/src/fxge/agg/include/fxfx_agg_path_storage.h b/core/src/fxge/agg/include/fxfx_agg_path_storage.h deleted file mode 100644 index ab7a85bca5..0000000000 --- a/core/src/fxge/agg/include/fxfx_agg_path_storage.h +++ /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 FXFX_AGG_PATH_STORAGE_H_ -#define FXFX_AGG_PATH_STORAGE_H_ - -#include "../agg23/agg_path_storage.h" - -#endif // FXFX_AGG_PATH_STORAGE_H_ diff --git a/core/src/fxge/agg/include/fxfx_agg_rasterizer_scanline_aa.h b/core/src/fxge/agg/include/fxfx_agg_rasterizer_scanline_aa.h deleted file mode 100644 index a445298f81..0000000000 --- a/core/src/fxge/agg/include/fxfx_agg_rasterizer_scanline_aa.h +++ /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 FXFX_AGG_RASTERIZER_SCANLINE_AA_H_ -#define FXFX_AGG_RASTERIZER_SCANLINE_AA_H_ - -#include "../agg23/agg_rasterizer_scanline_aa.h" - -#endif // FXFX_AGG_RASTERIZER_SCANLINE_AA_H_ diff --git a/core/src/fxge/agg/include/fxfx_agg_renderer_scanline.h b/core/src/fxge/agg/include/fxfx_agg_renderer_scanline.h deleted file mode 100644 index 1775dabe3e..0000000000 --- a/core/src/fxge/agg/include/fxfx_agg_renderer_scanline.h +++ /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 FXFX_AGG_RENDER_SCANLINE_H_ -#define FXFX_AGG_RENDER_SCANLINE_H_ - -#include "../agg23/agg_renderer_scanline.h" - -#endif // FXFX_AGG_RENDER_SCANLINE_H_ diff --git a/core/src/fxge/agg/include/fxfx_agg_rendering_buffer.h b/core/src/fxge/agg/include/fxfx_agg_rendering_buffer.h deleted file mode 100644 index 0eb48b84c0..0000000000 --- a/core/src/fxge/agg/include/fxfx_agg_rendering_buffer.h +++ /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 FXFX_AGG_RENDERING_BUFFER_H_ -#define FXFX_AGG_RENDERING_BUFFER_H_ - -#include "../agg23/agg_rendering_buffer.h" - -#endif // FXFX_AGG_RENDERING_BUFFER_H_ diff --git a/core/src/fxge/agg/include/fxfx_agg_scanline_u.h b/core/src/fxge/agg/include/fxfx_agg_scanline_u.h deleted file mode 100644 index c850f621a3..0000000000 --- a/core/src/fxge/agg/include/fxfx_agg_scanline_u.h +++ /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 FXFX_AGG_SCANLINE_U_H_ -#define FXFX_AGG_SCANLINE_U_H_ - -#include "../agg23/agg_scanline_u.h" - -#endif // FXFX_AGG_SCANLINE_U_H_ diff --git a/core/src/fxge/agg/agg23/fx_agg_driver.cpp b/core/src/fxge/agg/src/fx_agg_driver.cpp index 0198872995..18a1fa43b5 100644 --- a/core/src/fxge/agg/agg23/fx_agg_driver.cpp +++ b/core/src/fxge/agg/src/fx_agg_driver.cpp @@ -8,14 +8,14 @@ #include "../../dib/dib_int.h" #include "../../ge/text_int.h" #include "../../../../include/fxcodec/fx_codec.h" -#include "agg_pixfmt_gray.h" -#include "agg_path_storage.h" -#include "agg_scanline_u.h" -#include "agg_rasterizer_scanline_aa.h" -#include "agg_renderer_scanline.h" -#include "agg_curves.h" -#include "agg_conv_stroke.h" -#include "agg_conv_dash.h" +#include "../../../../../third_party/agg23/agg_pixfmt_gray.h" +#include "../../../../../third_party/agg23/agg_path_storage.h" +#include "../../../../../third_party/agg23/agg_scanline_u.h" +#include "../../../../../third_party/agg23/agg_rasterizer_scanline_aa.h" +#include "../../../../../third_party/agg23/agg_renderer_scanline.h" +#include "../../../../../third_party/agg23/agg_curves.h" +#include "../../../../../third_party/agg23/agg_conv_stroke.h" +#include "../../../../../third_party/agg23/agg_conv_dash.h" #include "../include/fx_agg_driver.h" void _HardClip(FX_FLOAT& x, FX_FLOAT& y) { diff --git a/core/src/fxge/agg/src/fxfx_agg_curves.cpp b/core/src/fxge/agg/src/fxfx_agg_curves.cpp deleted file mode 100644 index 83817f7680..0000000000 --- a/core/src/fxge/agg/src/fxfx_agg_curves.cpp +++ /dev/null @@ -1,7 +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 - -#include "../agg23/fx_agg_curves.cpp" diff --git a/core/src/fxge/agg/src/fxfx_agg_driver.cpp b/core/src/fxge/agg/src/fxfx_agg_driver.cpp deleted file mode 100644 index a4e6a30d44..0000000000 --- a/core/src/fxge/agg/src/fxfx_agg_driver.cpp +++ /dev/null @@ -1,7 +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 - -#include "../agg23/fx_agg_driver.cpp" diff --git a/core/src/fxge/agg/src/fxfx_agg_path_storage.cpp b/core/src/fxge/agg/src/fxfx_agg_path_storage.cpp deleted file mode 100644 index fabc526a24..0000000000 --- a/core/src/fxge/agg/src/fxfx_agg_path_storage.cpp +++ /dev/null @@ -1,7 +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 - -#include "../agg23/fx_agg_path_storage.cpp" diff --git a/core/src/fxge/agg/src/fxfx_agg_rasterizer_scanline_aa.cpp b/core/src/fxge/agg/src/fxfx_agg_rasterizer_scanline_aa.cpp deleted file mode 100644 index 229e3ba93a..0000000000 --- a/core/src/fxge/agg/src/fxfx_agg_rasterizer_scanline_aa.cpp +++ /dev/null @@ -1,7 +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 - -#include "../agg23/fx_agg_rasterizer_scanline_aa.cpp" diff --git a/core/src/fxge/agg/src/fxfx_agg_vcgen_dash.cpp b/core/src/fxge/agg/src/fxfx_agg_vcgen_dash.cpp deleted file mode 100644 index 4a259c022c..0000000000 --- a/core/src/fxge/agg/src/fxfx_agg_vcgen_dash.cpp +++ /dev/null @@ -1,7 +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 - -#include "../agg23/fx_agg_vcgen_dash.cpp" diff --git a/core/src/fxge/agg/src/fxfx_agg_vcgen_stroke.cpp b/core/src/fxge/agg/src/fxfx_agg_vcgen_stroke.cpp deleted file mode 100644 index 2311e1abd2..0000000000 --- a/core/src/fxge/agg/src/fxfx_agg_vcgen_stroke.cpp +++ /dev/null @@ -1,7 +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 - -#include "../agg23/fx_agg_vcgen_stroke.cpp" diff --git a/core/src/fxge/apple/fx_apple_platform.cpp b/core/src/fxge/apple/fx_apple_platform.cpp index 07c5b6cf98..9db807c3af 100644 --- a/core/src/fxge/apple/fx_apple_platform.cpp +++ b/core/src/fxge/apple/fx_apple_platform.cpp @@ -6,15 +6,16 @@ #include "../../../include/fxcrt/fx_system.h" #include "../../../include/fxge/fx_ge.h" + #if _FXM_PLATFORM_ == _FXM_PLATFORM_APPLE_ -#include "apple_int.h" + +#include "../../../include/fxge/fx_freetype.h" #include "../../../include/fxge/fx_ge_apple.h" -#include "../agg/include/fxfx_agg_clip_liang_barsky.h" -#include "../ge/text_int.h" -#include "../dib/dib_int.h" #include "../agg/include/fx_agg_driver.h" -#include "../../../include/fxge/fx_freetype.h" -#if _FXM_PLATFORM_ == _FXM_PLATFORM_APPLE_ +#include "../dib/dib_int.h" +#include "../ge/text_int.h" +#include "apple_int.h" + void CFX_AggDeviceDriver::InitPlatform() { CQuartz2D & quartz2d = ((CApplePlatform *) CFX_GEModule::Get()->GetPlatformData())->_quartz2d; @@ -169,5 +170,5 @@ void CFX_Font::ReleasePlatformResource() m_pPlatformFont = NULL; } } -#endif -#endif + +#endif // _FXM_PLATFORM_ == _FXM_PLATFORM_APPLE_ diff --git a/core/src/fxge/apple/fx_quartz_device.cpp b/core/src/fxge/apple/fx_quartz_device.cpp index 0638e15f78..8f0f4db6ba 100644 --- a/core/src/fxge/apple/fx_quartz_device.cpp +++ b/core/src/fxge/apple/fx_quartz_device.cpp @@ -5,12 +5,12 @@ // Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com #include "../../../include/fxcrt/fx_ext.h" +#include "../../../include/fxge/fx_freetype.h" #include "../../../include/fxge/fx_ge.h" -#include "../agg/include/fxfx_agg_clip_liang_barsky.h" -#include "../ge/text_int.h" -#include "../dib/dib_int.h" #include "../agg/include/fx_agg_driver.h" -#include "../../../include/fxge/fx_freetype.h" +#include "../dib/dib_int.h" +#include "../ge/text_int.h" + #if _FXM_PLATFORM_ == _FXM_PLATFORM_APPLE_ #include "apple_int.h" #include "../../../include/fxge/fx_ge_apple.h" @@ -1125,4 +1125,4 @@ FX_BOOL CFX_QuartzDevice::Create(int32_t width, int32_t height, FXDIB_Format for m_bOwnedBitmap = TRUE; return Attach(pBitmap); } -#endif +#endif // _FXM_PLATFORM_ == _FXM_PLATFORM_APPLE_ diff --git a/core/src/fxge/ge/fx_ge_linux.cpp b/core/src/fxge/ge/fx_ge_linux.cpp index 4bd0468ac3..631ff8e93f 100644 --- a/core/src/fxge/ge/fx_ge_linux.cpp +++ b/core/src/fxge/ge/fx_ge_linux.cpp @@ -7,6 +7,7 @@ #include "../../../include/fxge/fx_ge.h" #include "../agg/include/fx_agg_driver.h" #include "text_int.h" + #if _FXM_PLATFORM_ == _FXM_PLATFORM_LINUX_ static const struct { const FX_CHAR* m_pName; @@ -228,4 +229,4 @@ void CFX_GEModule::InitPlatform() void CFX_GEModule::DestroyPlatform() { } -#endif +#endif // _FXM_PLATFORM_ == _FXM_PLATFORM_LINUX_ diff --git a/core/src/fxge/win32/fx_win32_device.cpp b/core/src/fxge/win32/fx_win32_device.cpp index 881502999d..f9da1cc706 100644 --- a/core/src/fxge/win32/fx_win32_device.cpp +++ b/core/src/fxge/win32/fx_win32_device.cpp @@ -5,17 +5,19 @@ // Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com #include "../../../include/fxge/fx_ge.h" + #if _FX_OS_ == _FX_WIN32_DESKTOP_ || _FX_OS_ == _FX_WIN64_DESKTOP_ -#include "../../../include/fxge/fx_ge_win32.h" #include <crtdbg.h> -#include "../agg/include/fxfx_agg_clip_liang_barsky.h" + +#include "../../../include/fxcodec/fx_codec.h" +#include "../../../include/fxge/fx_freetype.h" +#include "../../../include/fxge/fx_ge_win32.h" +#include "../agg/include/fx_agg_driver.h" +#include "../dib/dib_int.h" +#include "../ge/text_int.h" #include "dwrite_int.h" #include "win32_int.h" -#include "../ge/text_int.h" -#include "../dib/dib_int.h" -#include "../agg/include/fx_agg_driver.h" -#include "../../../include/fxge/fx_freetype.h" -#include "../../../include/fxcodec/fx_codec.h" + class CWin32FontInfo final : public IFX_SystemFontInfo { public: @@ -1200,4 +1202,5 @@ CFX_WinBitmapDevice::~CFX_WinBitmapDevice() } delete GetBitmap(); } -#endif + +#endif // _FX_OS_ == _FX_WIN32_DESKTOP_ || _FX_OS_ == _FX_WIN64_ diff --git a/pdfium.gyp b/pdfium.gyp index c8894aa569..3bcd1f6696 100644 --- a/pdfium.gyp +++ b/pdfium.gyp @@ -551,7 +551,12 @@ { 'target_name': 'fxge', 'type': 'static_library', - 'ldflags': [ '-L<(PRODUCT_DIR)',], + 'ldflags': [ + '-L<(PRODUCT_DIR)', + ], + 'dependencies': [ + 'third_party/third_party.gyp:fx_agg', + ], 'sources': [ 'core/include/fxge/fpf.h', 'core/include/fxge/fx_dib.h', @@ -560,23 +565,8 @@ 'core/include/fxge/fx_ge.h', 'core/include/fxge/fx_ge_apple.h', 'core/include/fxge/fx_ge_win32.h', - 'core/src/fxge/agg/include/fxfx_agg_basics.h', - 'core/src/fxge/agg/include/fxfx_agg_clip_liang_barsky.h', - 'core/src/fxge/agg/include/fxfx_agg_conv_dash.h', - 'core/src/fxge/agg/include/fxfx_agg_conv_stroke.h', - 'core/src/fxge/agg/include/fxfx_agg_curves.h', - 'core/src/fxge/agg/include/fxfx_agg_path_storage.h', - 'core/src/fxge/agg/include/fxfx_agg_rasterizer_scanline_aa.h', - 'core/src/fxge/agg/include/fxfx_agg_renderer_scanline.h', - 'core/src/fxge/agg/include/fxfx_agg_rendering_buffer.h', - 'core/src/fxge/agg/include/fxfx_agg_scanline_u.h', 'core/src/fxge/agg/include/fx_agg_driver.h', - 'core/src/fxge/agg/src/fxfx_agg_curves.cpp', - 'core/src/fxge/agg/src/fxfx_agg_driver.cpp', - 'core/src/fxge/agg/src/fxfx_agg_path_storage.cpp', - 'core/src/fxge/agg/src/fxfx_agg_rasterizer_scanline_aa.cpp', - 'core/src/fxge/agg/src/fxfx_agg_vcgen_dash.cpp', - 'core/src/fxge/agg/src/fxfx_agg_vcgen_stroke.cpp', + 'core/src/fxge/agg/src/fx_agg_driver.cpp', 'core/src/fxge/android/fpf_skiafont.cpp', 'core/src/fxge/android/fpf_skiafont.h', 'core/src/fxge/android/fpf_skiafontmgr.cpp', diff --git a/third_party/BUILD.gn b/third_party/BUILD.gn index 18baeb2eb5..bcb7cbabee 100644 --- a/third_party/BUILD.gn +++ b/third_party/BUILD.gn @@ -30,6 +30,31 @@ source_set("bigint") { ] } +source_set("fx_agg") { + configs -= [ "//build/config/compiler:chromium_code" ] + configs += [ + "//build/config/compiler:no_chromium_code", + "//third_party/pdfium:pdfium_config", + ] + sources = [ + "agg23/agg_basics.h", + "agg23/agg_clip_liang_barsky.h", + "agg23/agg_conv_dash.h", + "agg23/agg_conv_stroke.h", + "agg23/agg_curves.cpp", + "agg23/agg_curves.h", + "agg23/agg_path_storage.cpp", + "agg23/agg_path_storage.h", + "agg23/agg_rasterizer_scanline_aa.cpp", + "agg23/agg_rasterizer_scanline_aa.h", + "agg23/agg_renderer_scanline.h", + "agg23/agg_rendering_buffer.h", + "agg23/agg_scanline_u.h", + "agg23/agg_vcgen_dash.cpp", + "agg23/agg_vcgen_stroke.cpp", + ] +} + source_set("freetype") { configs -= [ "//build/config/compiler:chromium_code" ] configs += [ diff --git a/core/src/fxge/agg/agg23/agg_array.h b/third_party/agg23/agg_array.h index 810eb4ef22..810eb4ef22 100644 --- a/core/src/fxge/agg/agg23/agg_array.h +++ b/third_party/agg23/agg_array.h diff --git a/core/src/fxge/agg/agg23/agg_basics.h b/third_party/agg23/agg_basics.h index d2fad58feb..d2fad58feb 100644 --- a/core/src/fxge/agg/agg23/agg_basics.h +++ b/third_party/agg23/agg_basics.h diff --git a/core/src/fxge/agg/agg23/agg_clip_liang_barsky.h b/third_party/agg23/agg_clip_liang_barsky.h index cfc4c91f60..cfc4c91f60 100644 --- a/core/src/fxge/agg/agg23/agg_clip_liang_barsky.h +++ b/third_party/agg23/agg_clip_liang_barsky.h diff --git a/core/src/fxge/agg/agg23/agg_color_gray.h b/third_party/agg23/agg_color_gray.h index 5db7bcaf28..5db7bcaf28 100644 --- a/core/src/fxge/agg/agg23/agg_color_gray.h +++ b/third_party/agg23/agg_color_gray.h diff --git a/core/src/fxge/agg/agg23/agg_conv_adaptor_vcgen.h b/third_party/agg23/agg_conv_adaptor_vcgen.h index 0d8d6ff99e..0d8d6ff99e 100644 --- a/core/src/fxge/agg/agg23/agg_conv_adaptor_vcgen.h +++ b/third_party/agg23/agg_conv_adaptor_vcgen.h diff --git a/core/src/fxge/agg/agg23/agg_conv_dash.h b/third_party/agg23/agg_conv_dash.h index 63b2019dde..63b2019dde 100644 --- a/core/src/fxge/agg/agg23/agg_conv_dash.h +++ b/third_party/agg23/agg_conv_dash.h diff --git a/core/src/fxge/agg/agg23/agg_conv_stroke.h b/third_party/agg23/agg_conv_stroke.h index 5a36bd73bb..5a36bd73bb 100644 --- a/core/src/fxge/agg/agg23/agg_conv_stroke.h +++ b/third_party/agg23/agg_conv_stroke.h diff --git a/core/src/fxge/agg/agg23/fx_agg_curves.cpp b/third_party/agg23/agg_curves.cpp index 861320ee70..5a2d5631d6 100644 --- a/core/src/fxge/agg/agg23/fx_agg_curves.cpp +++ b/third_party/agg23/agg_curves.cpp @@ -18,7 +18,7 @@ // mcseemagg@yahoo.com // http://www.antigrain.com //---------------------------------------------------------------------------- -#include "../../../../include/fxcrt/fx_basic.h" +#include "../../core/include/fxcrt/fx_basic.h" #include "agg_curves.h" #include "agg_math.h" namespace agg diff --git a/core/src/fxge/agg/agg23/agg_curves.h b/third_party/agg23/agg_curves.h index 495f7a6a8f..495f7a6a8f 100644 --- a/core/src/fxge/agg/agg23/agg_curves.h +++ b/third_party/agg23/agg_curves.h diff --git a/core/src/fxge/agg/agg23/agg_math.h b/third_party/agg23/agg_math.h index 31e0daf3bb..31e0daf3bb 100644 --- a/core/src/fxge/agg/agg23/agg_math.h +++ b/third_party/agg23/agg_math.h diff --git a/core/src/fxge/agg/agg23/agg_math_stroke.h b/third_party/agg23/agg_math_stroke.h index 620d675312..620d675312 100644 --- a/core/src/fxge/agg/agg23/agg_math_stroke.h +++ b/third_party/agg23/agg_math_stroke.h diff --git a/core/src/fxge/agg/agg23/fx_agg_path_storage.cpp b/third_party/agg23/agg_path_storage.cpp index 8a876210b7..f5c9843e58 100644 --- a/core/src/fxge/agg/agg23/fx_agg_path_storage.cpp +++ b/third_party/agg23/agg_path_storage.cpp @@ -22,7 +22,7 @@ // Class path_storage // //---------------------------------------------------------------------------- -#include "../../../../include/fxcrt/fx_basic.h" +#include "../../core/include/fxcrt/fx_basic.h" #include "agg_path_storage.h" #include "agg_math.h" namespace agg diff --git a/core/src/fxge/agg/agg23/agg_path_storage.h b/third_party/agg23/agg_path_storage.h index dc13851d09..dc13851d09 100644 --- a/core/src/fxge/agg/agg23/agg_path_storage.h +++ b/third_party/agg23/agg_path_storage.h diff --git a/core/src/fxge/agg/agg23/agg_pixfmt_gray.h b/third_party/agg23/agg_pixfmt_gray.h index 5a80935479..5a80935479 100644 --- a/core/src/fxge/agg/agg23/agg_pixfmt_gray.h +++ b/third_party/agg23/agg_pixfmt_gray.h diff --git a/core/src/fxge/agg/agg23/fx_agg_rasterizer_scanline_aa.cpp b/third_party/agg23/agg_rasterizer_scanline_aa.cpp index b26e2595c1..8216e60221 100644 --- a/core/src/fxge/agg/agg23/fx_agg_rasterizer_scanline_aa.cpp +++ b/third_party/agg23/agg_rasterizer_scanline_aa.cpp @@ -46,7 +46,7 @@ // All other code is very different from the original. // //---------------------------------------------------------------------------- -#include "../../../../include/fxcrt/fx_ext.h" +#include "../../core/include/fxcrt/fx_ext.h" #include <limits.h> #include "agg_rasterizer_scanline_aa.h" namespace agg diff --git a/core/src/fxge/agg/agg23/agg_rasterizer_scanline_aa.h b/third_party/agg23/agg_rasterizer_scanline_aa.h index e06322c24d..da1900d0dd 100644 --- a/core/src/fxge/agg/agg23/agg_rasterizer_scanline_aa.h +++ b/third_party/agg23/agg_rasterizer_scanline_aa.h @@ -29,7 +29,7 @@ //---------------------------------------------------------------------------- #ifndef AGG_RASTERIZER_SCANLINE_AA_INCLUDED #define AGG_RASTERIZER_SCANLINE_AA_INCLUDED -#include "../../../../include/fxge/fx_ge.h" +#include "../../core/include/fxge/fx_ge.h" #include "agg_basics.h" #include "agg_math.h" #include "agg_array.h" diff --git a/core/src/fxge/agg/agg23/agg_render_scanlines.h b/third_party/agg23/agg_render_scanlines.h index 0dfd6d259f..0dfd6d259f 100644 --- a/core/src/fxge/agg/agg23/agg_render_scanlines.h +++ b/third_party/agg23/agg_render_scanlines.h diff --git a/core/src/fxge/agg/agg23/agg_renderer_base.h b/third_party/agg23/agg_renderer_base.h index bd1b203b9a..bd1b203b9a 100644 --- a/core/src/fxge/agg/agg23/agg_renderer_base.h +++ b/third_party/agg23/agg_renderer_base.h diff --git a/core/src/fxge/agg/agg23/agg_renderer_scanline.h b/third_party/agg23/agg_renderer_scanline.h index 62d104f7f2..62d104f7f2 100644 --- a/core/src/fxge/agg/agg23/agg_renderer_scanline.h +++ b/third_party/agg23/agg_renderer_scanline.h diff --git a/core/src/fxge/agg/agg23/agg_rendering_buffer.h b/third_party/agg23/agg_rendering_buffer.h index 9c1c0c6899..9c1c0c6899 100644 --- a/core/src/fxge/agg/agg23/agg_rendering_buffer.h +++ b/third_party/agg23/agg_rendering_buffer.h diff --git a/core/src/fxge/agg/agg23/agg_scanline_u.h b/third_party/agg23/agg_scanline_u.h index 2100115329..2100115329 100644 --- a/core/src/fxge/agg/agg23/agg_scanline_u.h +++ b/third_party/agg23/agg_scanline_u.h diff --git a/core/src/fxge/agg/agg23/agg_shorten_path.h b/third_party/agg23/agg_shorten_path.h index d7eb4be018..d7eb4be018 100644 --- a/core/src/fxge/agg/agg23/agg_shorten_path.h +++ b/third_party/agg23/agg_shorten_path.h diff --git a/core/src/fxge/agg/agg23/fx_agg_vcgen_dash.cpp b/third_party/agg23/agg_vcgen_dash.cpp index 0b6c29051b..43f8edf350 100644 --- a/core/src/fxge/agg/agg23/fx_agg_vcgen_dash.cpp +++ b/third_party/agg23/agg_vcgen_dash.cpp @@ -17,7 +17,7 @@ // Line dash generator // //---------------------------------------------------------------------------- -#include "../../../../include/fxcrt/fx_basic.h" +#include "../../core/include/fxcrt/fx_basic.h" #include "agg_vcgen_dash.h" #include "agg_shorten_path.h" namespace agg diff --git a/core/src/fxge/agg/agg23/agg_vcgen_dash.h b/third_party/agg23/agg_vcgen_dash.h index 9c3aa630c2..9c3aa630c2 100644 --- a/core/src/fxge/agg/agg23/agg_vcgen_dash.h +++ b/third_party/agg23/agg_vcgen_dash.h diff --git a/core/src/fxge/agg/agg23/fx_agg_vcgen_stroke.cpp b/third_party/agg23/agg_vcgen_stroke.cpp index 425ac45aca..9b8cb66fd9 100644 --- a/core/src/fxge/agg/agg23/fx_agg_vcgen_stroke.cpp +++ b/third_party/agg23/agg_vcgen_stroke.cpp @@ -22,7 +22,7 @@ // Stroke generator // //---------------------------------------------------------------------------- -#include "../../../../include/fxcrt/fx_basic.h" +#include "../../core/include/fxcrt/fx_basic.h" #include "agg_vcgen_stroke.h" namespace agg { diff --git a/core/src/fxge/agg/agg23/agg_vcgen_stroke.h b/third_party/agg23/agg_vcgen_stroke.h index 84fadd6ed8..84fadd6ed8 100644 --- a/core/src/fxge/agg/agg23/agg_vcgen_stroke.h +++ b/third_party/agg23/agg_vcgen_stroke.h diff --git a/core/src/fxge/agg/agg23/agg_vertex_sequence.h b/third_party/agg23/agg_vertex_sequence.h index 6600bf2085..6600bf2085 100644 --- a/core/src/fxge/agg/agg23/agg_vertex_sequence.h +++ b/third_party/agg23/agg_vertex_sequence.h diff --git a/third_party/third_party.gyp b/third_party/third_party.gyp index b6978658dd..8538001e7f 100644 --- a/third_party/third_party.gyp +++ b/third_party/third_party.gyp @@ -21,6 +21,33 @@ ], }, { + 'target_name': 'fx_agg', + 'type': 'static_library', + 'sources': [ + 'agg23/agg_basics.h', + 'agg23/agg_clip_liang_barsky.h', + 'agg23/agg_conv_dash.h', + 'agg23/agg_conv_stroke.h', + 'agg23/agg_curves.cpp', + 'agg23/agg_curves.h', + 'agg23/agg_path_storage.cpp', + 'agg23/agg_path_storage.h', + 'agg23/agg_rasterizer_scanline_aa.cpp', + 'agg23/agg_rasterizer_scanline_aa.h', + 'agg23/agg_renderer_scanline.h', + 'agg23/agg_rendering_buffer.h', + 'agg23/agg_scanline_u.h', + 'agg23/agg_vcgen_dash.cpp', + 'agg23/agg_vcgen_stroke.cpp', + ], + 'conditions': [ + ['os_posix==1', { + # library contains several enum vs non-enum conditionals. + 'cflags': [ '-Wno-extra', ], + }], + ], + }, + { 'target_name': 'freetype', 'type': 'static_library', 'defines': [ |