summaryrefslogtreecommitdiff
path: root/xfa/fxgraphics
diff options
context:
space:
mode:
Diffstat (limited to 'xfa/fxgraphics')
-rw-r--r--xfa/fxgraphics/cfx_graphics.cpp7
1 files changed, 2 insertions, 5 deletions
diff --git a/xfa/fxgraphics/cfx_graphics.cpp b/xfa/fxgraphics/cfx_graphics.cpp
index a3821dd067..b7595eea8d 100644
--- a/xfa/fxgraphics/cfx_graphics.cpp
+++ b/xfa/fxgraphics/cfx_graphics.cpp
@@ -375,11 +375,9 @@ void CFX_Graphics::FillPathWithPattern(CFX_Path* path,
m_info.fillColor->m_info.pattern->m_foreArgb);
}
}
-
- m_renderDevice->SaveState();
+ CFX_RenderDevice::StateRestorer restorer(m_renderDevice);
m_renderDevice->SetClip_PathFill(path->GetPathData(), matrix, fillMode);
SetDIBitsWithMatrix(bmp, &pattern->m_matrix);
- m_renderDevice->RestoreState(false);
}
void CFX_Graphics::FillPathWithShading(CFX_Path* path,
@@ -494,10 +492,9 @@ void CFX_Graphics::FillPathWithShading(CFX_Path* path,
}
}
if (result) {
- m_renderDevice->SaveState();
+ CFX_RenderDevice::StateRestorer restorer(m_renderDevice);
m_renderDevice->SetClip_PathFill(path->GetPathData(), matrix, fillMode);
SetDIBitsWithMatrix(bmp, matrix);
- m_renderDevice->RestoreState(false);
}
}