Fix some nits in SkiaState.

- Mark some methods as const.
- Remove a parameter to MatrixChanged(). It's always the same member
  variable.

Change-Id: Ia538f4684703b18ea2b068e247d5e4791d3e29ad
Reviewed-on: https://pdfium-review.googlesource.com/c/pdfium/+/55230
Reviewed-by: Tom Sepez <tsepez@chromium.org>
Commit-Queue: Lei Zhang <thestig@chromium.org>
diff --git a/core/fxge/skia/fx_skia_device.cpp b/core/fxge/skia/fx_skia_device.cpp
index 923dd3c..170518b 100644
--- a/core/fxge/skia/fx_skia_device.cpp
+++ b/core/fxge/skia/fx_skia_device.cpp
@@ -784,7 +784,7 @@
   bool HasRSX(int nChars,
               const TextCharPos* pCharPos,
               float* scaleXPtr,
-              bool* oneAtATimePtr) {
+              bool* oneAtATimePtr) const {
     bool useRSXform = false;
     bool oneAtATime = false;
     float scaleX = 1;
@@ -944,7 +944,7 @@
     m_type = Accumulator::kNone;
   }
 
-  bool IsEmpty() { return !m_commands.count(); }
+  bool IsEmpty() const { return !m_commands.count(); }
 
   bool SetClipFill(const CFX_PathData* pPathData,
                    const CFX_Matrix* pMatrix,
@@ -1085,9 +1085,8 @@
                    int fill_mode,
                    BlendMode blend_type,
                    bool group_knockout) const {
-    return MatrixChanged(pMatrix, m_drawMatrix) ||
-           StateChanged(pState, m_drawState) || fill_color != m_fillColor ||
-           stroke_color != m_strokeColor ||
+    return MatrixChanged(pMatrix) || StateChanged(pState, m_drawState) ||
+           fill_color != m_fillColor || stroke_color != m_strokeColor ||
            ((fill_mode & 3) == FXFILL_ALTERNATE) !=
                (m_skPath.getFillType() == SkPath::kEvenOdd_FillType) ||
            blend_type != m_blendType || group_knockout != m_groupKnockout;
@@ -1100,18 +1099,17 @@
                    uint32_t color) const {
     CFX_TypeFace* typeface =
         pFont->GetFace() ? pFont->GetDeviceCache() : nullptr;
-    return typeface != m_pTypeFace || MatrixChanged(pMatrix, m_drawMatrix) ||
+    return typeface != m_pTypeFace || MatrixChanged(pMatrix) ||
            font_size != m_fontSize || scaleX != m_scaleX ||
            color != m_fillColor;
   }
 
-  bool MatrixChanged(const CFX_Matrix* pMatrix,
-                     const CFX_Matrix& refMatrix) const {
+  bool MatrixChanged(const CFX_Matrix* pMatrix) const {
     CFX_Matrix identityMatrix;
     if (!pMatrix)
       pMatrix = &identityMatrix;
-    return pMatrix->a != refMatrix.a || pMatrix->b != refMatrix.b ||
-           pMatrix->c != refMatrix.c || pMatrix->d != refMatrix.d;
+    return pMatrix->a != m_drawMatrix.a || pMatrix->b != m_drawMatrix.b ||
+           pMatrix->c != m_drawMatrix.c || pMatrix->d != m_drawMatrix.d;
   }
 
   bool StateChanged(const CFX_GraphStateData* pState,