Move CAgg_PathData out of fx_agg_driver.h.
It is only used within fx_agg_driver.cpp, so put it inside an anonymous
namespace.
Change-Id: Ifd411b8b779429f49c631a173c26101f27b69f7c
Reviewed-on: https://pdfium-review.googlesource.com/c/pdfium/+/74392
Reviewed-by: Hui Yingst <nigi@chromium.org>
Commit-Queue: Lei Zhang <thestig@chromium.org>
diff --git a/core/fxge/agg/fx_agg_driver.cpp b/core/fxge/agg/fx_agg_driver.cpp
index 6f87e92..6dfcc61 100644
--- a/core/fxge/agg/fx_agg_driver.cpp
+++ b/core/fxge/agg/fx_agg_driver.cpp
@@ -26,6 +26,7 @@
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wimplicit-fallthrough"
#endif
+#include "third_party/agg23/agg_clip_liang_barsky.h"
#include "third_party/agg23/agg_conv_dash.h"
#include "third_party/agg23/agg_conv_stroke.h"
#include "third_party/agg23/agg_curves.h"
@@ -1036,7 +1037,16 @@
unsigned m_top;
};
-} // namespace
+class CAgg_PathData {
+ public:
+ CAgg_PathData() = default;
+ ~CAgg_PathData() = default;
+
+ void BuildPath(const CFX_PathData* pPathData,
+ const CFX_Matrix* pObject2Device);
+
+ agg::path_storage m_PathData;
+};
void CAgg_PathData::BuildPath(const CFX_PathData* pPathData,
const CFX_Matrix* pObject2Device) {
@@ -1082,6 +1092,8 @@
}
}
+} // namespace
+
CFX_AggDeviceDriver::CFX_AggDeviceDriver(
const RetainPtr<CFX_DIBitmap>& pBitmap,
bool bRgbByteOrder,
diff --git a/core/fxge/agg/fx_agg_driver.h b/core/fxge/agg/fx_agg_driver.h
index 5806aef..3457478 100644
--- a/core/fxge/agg/fx_agg_driver.h
+++ b/core/fxge/agg/fx_agg_driver.h
@@ -13,8 +13,6 @@
#include "build/build_config.h"
#include "core/fxge/cfx_fillrenderoptions.h"
#include "core/fxge/renderdevicedriver_iface.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 CFX_ClipRgn;
@@ -24,16 +22,6 @@
namespace pdfium {
-class CAgg_PathData {
- public:
- CAgg_PathData() {}
- ~CAgg_PathData() {}
- void BuildPath(const CFX_PathData* pPathData,
- const CFX_Matrix* pObject2Device);
-
- pdfium::agg::path_storage m_PathData;
-};
-
class CFX_AggDeviceDriver final : public RenderDeviceDriverIface {
public:
CFX_AggDeviceDriver(const RetainPtr<CFX_DIBitmap>& pBitmap,