Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(187)

Unified Diff: xfa/fde/fde_render.cpp

Issue 2044623002: Remove FDE_HDEVICESTATE. (Closed) Base URL: https://pdfium.googlesource.com/pdfium.git@master
Patch Set: Created 4 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « xfa/fde/fde_render.h ('k') | xfa/fde/tto/fde_textout.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: xfa/fde/fde_render.cpp
diff --git a/xfa/fde/fde_render.cpp b/xfa/fde/fde_render.cpp
index 283cd80ffb99f9f6f9fb1a99cbfa3bcb54e7dac7..57ad5bff7223350b4d7dc1cc4df90c519b279bea 100644
--- a/xfa/fde/fde_render.cpp
+++ b/xfa/fde/fde_render.cpp
@@ -134,17 +134,15 @@ void CFDE_RenderContext::RenderText(IFDE_TextSet* pTextSet,
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 @@ FX_BOOL CFDE_RenderContext::ApplyClip(IFDE_VisualSet* pVisualSet,
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();
}
« no previous file with comments | « xfa/fde/fde_render.h ('k') | xfa/fde/tto/fde_textout.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698