Move CFX_ClipRgn code into core/fxge/agg

The code is only used with AGG. Just move the file in this CL.

Change-Id: I395ddfd326b3d676ec0fca33e5172f4ed92c7e9c
Reviewed-on: https://pdfium-review.googlesource.com/c/pdfium/+/123570
Reviewed-by: Tom Sepez <tsepez@google.com>
Reviewed-by: Tom Sepez <tsepez@chromium.org>
Commit-Queue: Lei Zhang <thestig@chromium.org>
diff --git a/core/fxge/BUILD.gn b/core/fxge/BUILD.gn
index ed39f7c..55fb328 100644
--- a/core/fxge/BUILD.gn
+++ b/core/fxge/BUILD.gn
@@ -10,14 +10,14 @@
   sources = [
     "agg/cfx_agg_bitmapcomposer.cpp",
     "agg/cfx_agg_bitmapcomposer.h",
+    "agg/cfx_agg_cliprgn.cpp",
+    "agg/cfx_agg_cliprgn.h",
     "agg/cfx_agg_devicedriver.cpp",
     "agg/cfx_agg_devicedriver.h",
     "agg/cfx_agg_imagerenderer.cpp",
     "agg/cfx_agg_imagerenderer.h",
     "calculate_pitch.cpp",
     "calculate_pitch.h",
-    "cfx_cliprgn.cpp",
-    "cfx_cliprgn.h",
     "cfx_color.cpp",
     "cfx_color.h",
     "cfx_defaultrenderdevice.cpp",
diff --git a/core/fxge/agg/cfx_agg_bitmapcomposer.cpp b/core/fxge/agg/cfx_agg_bitmapcomposer.cpp
index 7673212..fcae14c 100644
--- a/core/fxge/agg/cfx_agg_bitmapcomposer.cpp
+++ b/core/fxge/agg/cfx_agg_bitmapcomposer.cpp
@@ -15,7 +15,7 @@
 #include "core/fxcrt/fx_safe_types.h"
 #include "core/fxcrt/fx_system.h"
 #include "core/fxcrt/stl_util.h"
-#include "core/fxge/cfx_cliprgn.h"
+#include "core/fxge/agg/cfx_agg_cliprgn.h"
 #include "core/fxge/dib/cfx_dibitmap.h"
 
 CFX_AggBitmapComposer::CFX_AggBitmapComposer() = default;
diff --git a/core/fxge/cfx_cliprgn.cpp b/core/fxge/agg/cfx_agg_cliprgn.cpp
similarity index 98%
rename from core/fxge/cfx_cliprgn.cpp
rename to core/fxge/agg/cfx_agg_cliprgn.cpp
index ed4c513..69daab5 100644
--- a/core/fxge/cfx_cliprgn.cpp
+++ b/core/fxge/agg/cfx_agg_cliprgn.cpp
@@ -4,7 +4,7 @@
 
 // Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com
 
-#include "core/fxge/cfx_cliprgn.h"
+#include "core/fxge/agg/cfx_agg_cliprgn.h"
 
 #include <stdint.h>
 
diff --git a/core/fxge/cfx_cliprgn.h b/core/fxge/agg/cfx_agg_cliprgn.h
similarity index 88%
rename from core/fxge/cfx_cliprgn.h
rename to core/fxge/agg/cfx_agg_cliprgn.h
index 2884ac7..d69acc0 100644
--- a/core/fxge/cfx_cliprgn.h
+++ b/core/fxge/agg/cfx_agg_cliprgn.h
@@ -4,8 +4,8 @@
 
 // Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com
 
-#ifndef CORE_FXGE_CFX_CLIPRGN_H_
-#define CORE_FXGE_CFX_CLIPRGN_H_
+#ifndef CORE_FXGE_AGG_CFX_AGG_CLIPRGN_H_
+#define CORE_FXGE_AGG_CFX_AGG_CLIPRGN_H_
 
 #include "core/fxcrt/fx_coordinates.h"
 #include "core/fxcrt/retain_ptr.h"
@@ -37,4 +37,4 @@
   RetainPtr<CFX_DIBitmap> m_Mask;
 };
 
-#endif  // CORE_FXGE_CFX_CLIPRGN_H_
+#endif  // CORE_FXGE_AGG_CFX_AGG_CLIPRGN_H_
diff --git a/core/fxge/agg/cfx_agg_devicedriver.cpp b/core/fxge/agg/cfx_agg_devicedriver.cpp
index 7ca81a4..ca0963d 100644
--- a/core/fxge/agg/cfx_agg_devicedriver.cpp
+++ b/core/fxge/agg/cfx_agg_devicedriver.cpp
@@ -22,8 +22,8 @@
 #include "core/fxcrt/stl_util.h"
 #include "core/fxcrt/unowned_ptr_exclusion.h"
 #include "core/fxcrt/zip.h"
+#include "core/fxge/agg/cfx_agg_cliprgn.h"
 #include "core/fxge/agg/cfx_agg_imagerenderer.h"
-#include "core/fxge/cfx_cliprgn.h"
 #include "core/fxge/cfx_defaultrenderdevice.h"
 #include "core/fxge/cfx_graphstatedata.h"
 #include "core/fxge/cfx_path.h"
diff --git a/core/fxge/agg/cfx_agg_imagerenderer.cpp b/core/fxge/agg/cfx_agg_imagerenderer.cpp
index 9f34425..20aa508 100644
--- a/core/fxge/agg/cfx_agg_imagerenderer.cpp
+++ b/core/fxge/agg/cfx_agg_imagerenderer.cpp
@@ -12,7 +12,7 @@
 #include <utility>
 
 #include "core/fxcrt/fx_system.h"
-#include "core/fxge/cfx_cliprgn.h"
+#include "core/fxge/agg/cfx_agg_cliprgn.h"
 #include "core/fxge/dib/cfx_dibitmap.h"
 #include "core/fxge/dib/cfx_imagestretcher.h"
 #include "core/fxge/dib/cfx_imagetransformer.h"
diff --git a/core/fxge/apple/fx_apple_impl.cpp b/core/fxge/apple/fx_apple_impl.cpp
index 5b598fb..713d93f 100644
--- a/core/fxge/apple/fx_apple_impl.cpp
+++ b/core/fxge/apple/fx_apple_impl.cpp
@@ -12,9 +12,9 @@
 #include "core/fxcrt/data_vector.h"
 #include "core/fxcrt/fx_system.h"
 #include "core/fxcrt/span.h"
+#include "core/fxge/agg/cfx_agg_cliprgn.h"
 #include "core/fxge/agg/cfx_agg_devicedriver.h"
 #include "core/fxge/apple/fx_apple_platform.h"
-#include "core/fxge/cfx_cliprgn.h"
 #include "core/fxge/cfx_font.h"
 #include "core/fxge/cfx_gemodule.h"
 #include "core/fxge/cfx_glyphbitmap.h"
diff --git a/core/fxge/dib/cfx_dibbase.cpp b/core/fxge/dib/cfx_dibbase.cpp
index dbefd0f..55f2469 100644
--- a/core/fxge/dib/cfx_dibbase.cpp
+++ b/core/fxge/dib/cfx_dibbase.cpp
@@ -23,8 +23,8 @@
 #include "core/fxcrt/span_util.h"
 #include "core/fxcrt/stl_util.h"
 #include "core/fxcrt/zip.h"
+#include "core/fxge/agg/cfx_agg_cliprgn.h"
 #include "core/fxge/calculate_pitch.h"
-#include "core/fxge/cfx_cliprgn.h"
 #include "core/fxge/dib/cfx_bitmapstorer.h"
 #include "core/fxge/dib/cfx_dibitmap.h"
 #include "core/fxge/dib/cfx_imagestretcher.h"
diff --git a/core/fxge/dib/cfx_dibitmap.cpp b/core/fxge/dib/cfx_dibitmap.cpp
index f15b28a..7a04392 100644
--- a/core/fxge/dib/cfx_dibitmap.cpp
+++ b/core/fxge/dib/cfx_dibitmap.cpp
@@ -24,8 +24,8 @@
 #include "core/fxcrt/span.h"
 #include "core/fxcrt/span_util.h"
 #include "core/fxcrt/stl_util.h"
+#include "core/fxge/agg/cfx_agg_cliprgn.h"
 #include "core/fxge/calculate_pitch.h"
-#include "core/fxge/cfx_cliprgn.h"
 #include "core/fxge/cfx_defaultrenderdevice.h"
 #include "core/fxge/dib/cfx_scanlinecompositor.h"
 
diff --git a/testing/fuzzers/pdf_scanlinecompositor_fuzzer.cc b/testing/fuzzers/pdf_scanlinecompositor_fuzzer.cc
index c054587..f6499da 100644
--- a/testing/fuzzers/pdf_scanlinecompositor_fuzzer.cc
+++ b/testing/fuzzers/pdf_scanlinecompositor_fuzzer.cc
@@ -7,7 +7,7 @@
 #include <utility>
 
 #include "core/fxcrt/fx_safe_types.h"
-#include "core/fxge/cfx_cliprgn.h"
+#include "core/fxge/agg/cfx_agg_cliprgn.h"
 #include "core/fxge/dib/cfx_dibitmap.h"
 #include "core/fxge/dib/fx_dib.h"
 #include "testing/fuzzers/pdfium_fuzzer_util.h"