summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--BUILD.gn20
-rw-r--r--core/src/fxge/agg/DEPS3
-rw-r--r--core/src/fxge/agg/include/fx_agg_driver.h5
-rw-r--r--core/src/fxge/agg/include/fxfx_agg_basics.h12
-rw-r--r--core/src/fxge/agg/include/fxfx_agg_clip_liang_barsky.h12
-rw-r--r--core/src/fxge/agg/include/fxfx_agg_conv_dash.h12
-rw-r--r--core/src/fxge/agg/include/fxfx_agg_conv_stroke.h12
-rw-r--r--core/src/fxge/agg/include/fxfx_agg_curves.h12
-rw-r--r--core/src/fxge/agg/include/fxfx_agg_path_storage.h12
-rw-r--r--core/src/fxge/agg/include/fxfx_agg_rasterizer_scanline_aa.h12
-rw-r--r--core/src/fxge/agg/include/fxfx_agg_renderer_scanline.h12
-rw-r--r--core/src/fxge/agg/include/fxfx_agg_rendering_buffer.h12
-rw-r--r--core/src/fxge/agg/include/fxfx_agg_scanline_u.h12
-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.cpp7
-rw-r--r--core/src/fxge/agg/src/fxfx_agg_driver.cpp7
-rw-r--r--core/src/fxge/agg/src/fxfx_agg_path_storage.cpp7
-rw-r--r--core/src/fxge/agg/src/fxfx_agg_rasterizer_scanline_aa.cpp7
-rw-r--r--core/src/fxge/agg/src/fxfx_agg_vcgen_dash.cpp7
-rw-r--r--core/src/fxge/agg/src/fxfx_agg_vcgen_stroke.cpp7
-rw-r--r--core/src/fxge/apple/fx_apple_platform.cpp17
-rw-r--r--core/src/fxge/apple/fx_quartz_device.cpp10
-rw-r--r--core/src/fxge/ge/fx_ge_linux.cpp3
-rw-r--r--core/src/fxge/win32/fx_win32_device.cpp19
-rw-r--r--pdfium.gyp24
-rw-r--r--third_party/BUILD.gn27
-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.gyp27
54 files changed, 111 insertions, 234 deletions
diff --git a/BUILD.gn b/BUILD.gn
index 4dd3875e4b..ede37b493b 100644
--- a/BUILD.gn
+++ b/BUILD.gn
@@ -592,6 +592,9 @@ static_library("fxcrt") {
}
static_library("fxge") {
+ deps = [
+ "third_party:fx_agg",
+ ]
sources = [
"core/include/fxge/fpf.h",
"core/include/fxge/fx_dib.h",
@@ -600,23 +603,8 @@ static_library("fxge") {
"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/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 e11259e07d..49556bd10b 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 5186ed449b..176526b83b 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_ext.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 a9bb1e1b72..0b8353f4b0 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"
@@ -1134,4 +1134,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 1f1eff2f1a..0db41b5adf 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;
@@ -231,4 +232,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 fd8fe4a8ad..5af2af5e65 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:
@@ -1212,4 +1214,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 241da48246..6585adfad2 100644
--- a/pdfium.gyp
+++ b/pdfium.gyp
@@ -617,7 +617,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',
@@ -626,23 +631,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 3fa287f50a..9353b112a6 100644
--- a/third_party/BUILD.gn
+++ b/third_party/BUILD.gn
@@ -30,7 +30,32 @@ static_library("bigint") {
]
}
-static_library("freetype") {
+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 += [
"//third_party/pdfium:pdfium_config",
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': [