CXFA_GEPattern::m_matrix is always the identity matrix.

It is only instantiated in one place, with the optional
matrix argument to the constructor omitted.

Change-Id: I741e3afc6dce0cf87a90cfab2cea4eb3074684d9
Reviewed-on: https://pdfium-review.googlesource.com/c/48532
Reviewed-by: Lei Zhang <thestig@chromium.org>
Commit-Queue: Tom Sepez <tsepez@chromium.org>
diff --git a/xfa/fxfa/parser/cxfa_pattern.cpp b/xfa/fxfa/parser/cxfa_pattern.cpp
index 9b0a995..6bd8420 100644
--- a/xfa/fxfa/parser/cxfa_pattern.cpp
+++ b/xfa/fxfa/parser/cxfa_pattern.cpp
@@ -77,7 +77,7 @@
       break;
   }
 
-  CXFA_GEPattern pattern(iHatch, crEnd, crStart, nullptr);
+  CXFA_GEPattern pattern(iHatch, crEnd, crStart);
 
   pGS->SaveGraphState();
   pGS->SetFillColor(CXFA_GEColor(&pattern, 0x0));
diff --git a/xfa/fxgraphics/cxfa_gepattern.cpp b/xfa/fxgraphics/cxfa_gepattern.cpp
index 0cd41b4..5a98a5f 100644
--- a/xfa/fxgraphics/cxfa_gepattern.cpp
+++ b/xfa/fxgraphics/cxfa_gepattern.cpp
@@ -8,11 +8,7 @@
 
 CXFA_GEPattern::CXFA_GEPattern(FX_HatchStyle hatchStyle,
                                const FX_ARGB foreArgb,
-                               const FX_ARGB backArgb,
-                               CFX_Matrix* matrix)
-    : m_hatchStyle(hatchStyle), m_foreArgb(foreArgb), m_backArgb(backArgb) {
-  if (matrix)
-    m_matrix = *matrix;
-}
+                               const FX_ARGB backArgb)
+    : m_hatchStyle(hatchStyle), m_foreArgb(foreArgb), m_backArgb(backArgb) {}
 
 CXFA_GEPattern::~CXFA_GEPattern() {}
diff --git a/xfa/fxgraphics/cxfa_gepattern.h b/xfa/fxgraphics/cxfa_gepattern.h
index 499d4ff..d811ec9 100644
--- a/xfa/fxgraphics/cxfa_gepattern.h
+++ b/xfa/fxgraphics/cxfa_gepattern.h
@@ -18,16 +18,13 @@
  public:
   CXFA_GEPattern(FX_HatchStyle hatchStyle,
                  const FX_ARGB foreArgb,
-                 const FX_ARGB backArgb,
-                 CFX_Matrix* matrix);
+                 const FX_ARGB backArgb);
 
   virtual ~CXFA_GEPattern();
 
  private:
   friend class CXFA_Graphics;
 
-  CFX_Matrix m_matrix;
-
   const FX_HatchStyle m_hatchStyle;
   const FX_ARGB m_foreArgb;
   const FX_ARGB m_backArgb;
diff --git a/xfa/fxgraphics/cxfa_graphics.cpp b/xfa/fxgraphics/cxfa_graphics.cpp
index 96ab7a0..1980e0d 100644
--- a/xfa/fxgraphics/cxfa_graphics.cpp
+++ b/xfa/fxgraphics/cxfa_graphics.cpp
@@ -242,7 +242,6 @@
 void CXFA_Graphics::FillPathWithPattern(const CXFA_GEPath* path,
                                         FX_FillMode fillMode,
                                         const CFX_Matrix& matrix) {
-  CXFA_GEPattern* pattern = m_info.fillColor.GetPattern();
   RetainPtr<CFX_DIBitmap> bitmap = m_renderDevice->GetBitmap();
   int32_t width = bitmap->GetWidth();
   int32_t height = bitmap->GetHeight();
@@ -270,7 +269,7 @@
   }
   CFX_RenderDevice::StateRestorer restorer(m_renderDevice);
   m_renderDevice->SetClip_PathFill(path->GetPathData(), &matrix, fillMode);
-  SetDIBitsWithMatrix(bmp, pattern->m_matrix);
+  SetDIBitsWithMatrix(bmp, CFX_Matrix());
 }
 
 void CXFA_Graphics::FillPathWithShading(const CXFA_GEPath* path,