Remove explicit CFX_Matrix identity matrix instantiations.

Change-Id: I96c3429dbe2c572ed409706adfe3707b8b9bf51b
Reviewed-on: https://pdfium-review.googlesource.com/6176
Reviewed-by: Tom Sepez <tsepez@chromium.org>
Commit-Queue: Lei Zhang <thestig@chromium.org>
diff --git a/core/fpdftext/cpdf_textpage.cpp b/core/fpdftext/cpdf_textpage.cpp
index e3db1c6..b886012 100644
--- a/core/fpdftext/cpdf_textpage.cpp
+++ b/core/fpdftext/cpdf_textpage.cpp
@@ -590,7 +590,7 @@
         CFX_Matrix matrix;
         ProcessTextObject(pObj->AsText(), matrix, pObjList, it);
       } else if (pObj->IsForm()) {
-        CFX_Matrix formMatrix(1, 0, 0, 1, 0, 0);
+        CFX_Matrix formMatrix;
         ProcessFormObject(pObj->AsForm(), formMatrix);
       }
     }
diff --git a/fpdfsdk/cpdfsdk_widget.cpp b/fpdfsdk/cpdfsdk_widget.cpp
index 7d9357a..bd586a9 100644
--- a/fpdfsdk/cpdfsdk_widget.cpp
+++ b/fpdfsdk/cpdfsdk_widget.cpp
@@ -1723,9 +1723,8 @@
   float fHeight = rcAnnot.top - rcAnnot.bottom;
 
   switch (abs(pControl->GetRotation() % 360)) {
-    case 0:
     default:
-      mt = CFX_Matrix(1, 0, 0, 1, 0, 0);
+    case 0:
       break;
     case 90:
       mt = CFX_Matrix(0, 1, -1, 0, fWidth, 0);
diff --git a/fpdfsdk/formfiller/cffl_formfiller.cpp b/fpdfsdk/formfiller/cffl_formfiller.cpp
index 2bc240f..98b9141 100644
--- a/fpdfsdk/formfiller/cffl_formfiller.cpp
+++ b/fpdfsdk/formfiller/cffl_formfiller.cpp
@@ -386,29 +386,24 @@
 }
 
 CFX_Matrix CFFL_FormFiller::GetWindowMatrix(void* pAttachedData) {
-  if (CFFL_PrivateData* pPrivateData = (CFFL_PrivateData*)pAttachedData) {
-    if (pPrivateData->pPageView) {
-      CFX_Matrix mtPageView;
-      pPrivateData->pPageView->GetCurrentMatrix(mtPageView);
+  CFX_Matrix mt;
+  auto* pPrivateData = reinterpret_cast<CFFL_PrivateData*>(pAttachedData);
+  if (!pAttachedData || !pPrivateData->pPageView)
+    return mt;
 
-      CFX_Matrix mt = GetCurMatrix();
-      mt.Concat(mtPageView);
-
-      return mt;
-    }
-  }
-  return CFX_Matrix(1, 0, 0, 1, 0, 0);
+  CFX_Matrix mtPageView;
+  pPrivateData->pPageView->GetCurrentMatrix(mtPageView);
+  mt = GetCurMatrix();
+  mt.Concat(mtPageView);
+  return mt;
 }
 
 CFX_Matrix CFFL_FormFiller::GetCurMatrix() {
   CFX_Matrix mt;
-
   CFX_FloatRect rcDA = m_pWidget->GetPDFAnnot()->GetRect();
-
   switch (m_pWidget->GetRotate()) {
     default:
     case 0:
-      mt = CFX_Matrix(1, 0, 0, 1, 0, 0);
       break;
     case 90:
       mt = CFX_Matrix(0, 1, -1, 0, rcDA.right - rcDA.left, 0);
diff --git a/xfa/fwl/cfwl_combobox.cpp b/xfa/fwl/cfwl_combobox.cpp
index ba72d3d..cdb4f81 100644
--- a/xfa/fwl/cfwl_combobox.cpp
+++ b/xfa/fwl/cfwl_combobox.cpp
@@ -618,7 +618,7 @@
 void CFWL_ComboBox::DisForm_DrawWidget(CFX_Graphics* pGraphics,
                                        const CFX_Matrix* pMatrix) {
   IFWL_ThemeProvider* pTheme = m_pProperties->m_pThemeProvider;
-  CFX_Matrix mtOrg(1, 0, 0, 1, 0, 0);
+  CFX_Matrix mtOrg;
   if (pMatrix)
     mtOrg = *pMatrix;
 
diff --git a/xfa/fwl/theme/cfwl_checkboxtp.cpp b/xfa/fwl/theme/cfwl_checkboxtp.cpp
index 0a3ae88..6386611 100644
--- a/xfa/fwl/theme/cfwl_checkboxtp.cpp
+++ b/xfa/fwl/theme/cfwl_checkboxtp.cpp
@@ -263,7 +263,7 @@
     m_pCheckPath->BezierTo(pt5 + p1, pt1 + p2, pt1);
 
     float fScale = fCheckLen / kSignPath;
-    CFX_Matrix mt(1, 0, 0, 1, 0, 0);
+    CFX_Matrix mt;
     mt.Scale(fScale, fScale);
 
     m_pCheckPath->TransformBy(mt);