Remove FDE_HDEVICESTATE.

The value returned is always NULL and when passed as a param is never used.

Review-Url: https://codereview.chromium.org/2044623002
diff --git a/xfa/fde/fde_gedevice.cpp b/xfa/fde/fde_gedevice.cpp
index 8370b2f..005387f 100644
--- a/xfa/fde/fde_gedevice.cpp
+++ b/xfa/fde/fde_gedevice.cpp
@@ -36,11 +36,10 @@
 int32_t CFDE_RenderDevice::GetHeight() const {
   return m_pDevice->GetHeight();
 }
-FDE_HDEVICESTATE CFDE_RenderDevice::SaveState() {
+void CFDE_RenderDevice::SaveState() {
   m_pDevice->SaveState();
-  return NULL;
 }
-void CFDE_RenderDevice::RestoreState(FDE_HDEVICESTATE hState) {
+void CFDE_RenderDevice::RestoreState() {
   m_pDevice->RestoreState(false);
   const FX_RECT& rt = m_pDevice->GetClipBox();
   m_rtClip.Set((FX_FLOAT)rt.left, (FX_FLOAT)rt.top, (FX_FLOAT)rt.Width(),
diff --git a/xfa/fde/fde_gedevice.h b/xfa/fde/fde_gedevice.h
index 872133c..4f30bd5 100644
--- a/xfa/fde/fde_gedevice.h
+++ b/xfa/fde/fde_gedevice.h
@@ -10,8 +10,6 @@
 #include "core/fxge/include/fx_ge.h"
 #include "xfa/fgas/crt/fgas_memory.h"
 
-typedef struct FDE_HDEVICESTATE_ { void* pData; } * FDE_HDEVICESTATE;
-
 class CFDE_Brush;
 class CFDE_Path;
 class CFDE_Pen;
@@ -24,8 +22,8 @@
 
   int32_t GetWidth() const;
   int32_t GetHeight() const;
-  FDE_HDEVICESTATE SaveState();
-  void RestoreState(FDE_HDEVICESTATE hState);
+  void SaveState();
+  void RestoreState();
   FX_BOOL SetClipPath(const CFDE_Path* pClip);
   CFDE_Path* GetClipPath() const;
   FX_BOOL SetClipRect(const CFX_RectF& rtClip);
diff --git a/xfa/fde/fde_render.cpp b/xfa/fde/fde_render.cpp
index 283cd80..57ad5bf 100644
--- a/xfa/fde/fde_render.cpp
+++ b/xfa/fde/fde_render.cpp
@@ -134,17 +134,15 @@
   FX_FLOAT fFontSize = pTextSet->GetFontSize(hText);
   FX_ARGB dwColor = pTextSet->GetFontColor(hText);
   m_pBrush->SetColor(dwColor);
-  FDE_HDEVICESTATE hState;
-  FX_BOOL bClip = ApplyClip(pTextSet, hText, hState);
+  FX_BOOL bClip = ApplyClip(pTextSet, hText);
   m_pRenderDevice->DrawString(m_pBrush.get(), pFont, m_pCharPos, iCount,
                               fFontSize, &m_Transform);
   if (bClip)
-    RestoreClip(hState);
+    RestoreClip();
 }
 
 FX_BOOL CFDE_RenderContext::ApplyClip(IFDE_VisualSet* pVisualSet,
-                                      FDE_HVISUALOBJ hObj,
-                                      FDE_HDEVICESTATE& hState) {
+                                      FDE_HVISUALOBJ hObj) {
   CFX_RectF rtClip;
   if (!pVisualSet->GetClip(hObj, rtClip))
     return FALSE;
@@ -155,10 +153,10 @@
   m_Transform.TransformRect(rtClip);
   const CFX_RectF& rtDevClip = m_pRenderDevice->GetClipRect();
   rtClip.Intersect(rtDevClip);
-  hState = m_pRenderDevice->SaveState();
+  m_pRenderDevice->SaveState();
   return m_pRenderDevice->SetClipRect(rtClip);
 }
 
-void CFDE_RenderContext::RestoreClip(FDE_HDEVICESTATE hState) {
-  m_pRenderDevice->RestoreState(hState);
+void CFDE_RenderContext::RestoreClip() {
+  m_pRenderDevice->RestoreState();
 }
diff --git a/xfa/fde/fde_render.h b/xfa/fde/fde_render.h
index 1a80bce..302ae2d 100644
--- a/xfa/fde/fde_render.h
+++ b/xfa/fde/fde_render.h
@@ -35,10 +35,8 @@
   FDE_RENDERSTATUS DoRender(IFX_Pause* pPause = nullptr);
   void StopRender();
   void RenderText(IFDE_TextSet* pTextSet, FDE_HVISUALOBJ hText);
-  FX_BOOL ApplyClip(IFDE_VisualSet* pVisualSet,
-                    FDE_HVISUALOBJ hObj,
-                    FDE_HDEVICESTATE& hState);
-  void RestoreClip(FDE_HDEVICESTATE hState);
+  FX_BOOL ApplyClip(IFDE_VisualSet* pVisualSet, FDE_HVISUALOBJ hObj);
+  void RestoreClip();
 
  protected:
   FDE_RENDERSTATUS m_eStatus;
diff --git a/xfa/fde/tto/fde_textout.cpp b/xfa/fde/tto/fde_textout.cpp
index 7a0107d..d9ada61 100644
--- a/xfa/fde/tto/fde_textout.cpp
+++ b/xfa/fde/tto/fde_textout.cpp
@@ -775,7 +775,7 @@
   CFDE_Brush* pBrush = new CFDE_Brush;
   pBrush->SetColor(m_TxtColor);
   CFDE_Pen* pPen = NULL;
-  FDE_HDEVICESTATE hDev = m_pRenderDevice->SaveState();
+  m_pRenderDevice->SaveState();
   if (rtClip.Width() > 0.0f && rtClip.Height() > 0.0f) {
     m_pRenderDevice->SetClipRect(rtClip);
   }
@@ -795,7 +795,7 @@
       DrawLine(pPiece, pPen);
     }
   }
-  m_pRenderDevice->RestoreState(hDev);
+  m_pRenderDevice->RestoreState();
   delete pBrush;
   delete pPen;
 }
diff --git a/xfa/fxfa/app/xfa_textlayout.cpp b/xfa/fxfa/app/xfa_textlayout.cpp
index df35c39..3c7497c 100644
--- a/xfa/fxfa/app/xfa_textlayout.cpp
+++ b/xfa/fxfa/app/xfa_textlayout.cpp
@@ -1174,7 +1174,7 @@
 
   std::unique_ptr<CFDE_RenderDevice> pDevice(
       new CFDE_RenderDevice(pFxDevice, FALSE));
-  FDE_HDEVICESTATE state = pDevice->SaveState();
+  pDevice->SaveState();
   pDevice->SetClipRect(rtClip);
 
   std::unique_ptr<CFDE_Brush> pSolidBrush(new CFDE_Brush);
@@ -1223,7 +1223,7 @@
                  tmDoc2Device);
     }
   }
-  pDevice->RestoreState(state);
+  pDevice->RestoreState();
   FX_Free(pCharPos);
   return iPieceLines;
 }