| OLD | NEW |
| 1 // Copyright 2014 PDFium Authors. All rights reserved. | 1 // Copyright 2014 PDFium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 // Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com | 5 // Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com |
| 6 | 6 |
| 7 #include "xfa/fde/fde_render.h" | 7 #include "xfa/fde/fde_render.h" |
| 8 | 8 |
| 9 #include "xfa/fde/fde_gedevice.h" | 9 #include "xfa/fde/fde_gedevice.h" |
| 10 #include "xfa/fde/fde_object.h" | 10 #include "xfa/fde/fde_object.h" |
| (...skipping 87 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 98 } | 98 } |
| 99 | 99 |
| 100 void CFDE_RenderContext::StopRender() { | 100 void CFDE_RenderContext::StopRender() { |
| 101 m_eStatus = FDE_RENDERSTATUS_Reset; | 101 m_eStatus = FDE_RENDERSTATUS_Reset; |
| 102 m_pRenderDevice = nullptr; | 102 m_pRenderDevice = nullptr; |
| 103 m_Transform.SetIdentity(); | 103 m_Transform.SetIdentity(); |
| 104 if (m_pIterator) { | 104 if (m_pIterator) { |
| 105 m_pIterator->Release(); | 105 m_pIterator->Release(); |
| 106 m_pIterator = nullptr; | 106 m_pIterator = nullptr; |
| 107 } | 107 } |
| 108 if (m_pBrush) { | 108 delete m_pBrush; |
| 109 delete m_pBrush; | 109 m_pBrush = nullptr; |
| 110 m_pBrush = nullptr; | |
| 111 } | |
| 112 FX_Free(m_pCharPos); | 110 FX_Free(m_pCharPos); |
| 113 m_pCharPos = nullptr; | 111 m_pCharPos = nullptr; |
| 114 m_iCharPosCount = 0; | 112 m_iCharPosCount = 0; |
| 115 } | 113 } |
| 116 | 114 |
| 117 void CFDE_RenderContext::RenderText(IFDE_TextSet* pTextSet, | 115 void CFDE_RenderContext::RenderText(IFDE_TextSet* pTextSet, |
| 118 FDE_HVISUALOBJ hText) { | 116 FDE_HVISUALOBJ hText) { |
| 119 ASSERT(m_pRenderDevice); | 117 ASSERT(m_pRenderDevice); |
| 120 ASSERT(pTextSet && hText); | 118 ASSERT(pTextSet && hText); |
| 121 | 119 |
| (...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 163 m_Transform.TransformRect(rtClip); | 161 m_Transform.TransformRect(rtClip); |
| 164 const CFX_RectF& rtDevClip = m_pRenderDevice->GetClipRect(); | 162 const CFX_RectF& rtDevClip = m_pRenderDevice->GetClipRect(); |
| 165 rtClip.Intersect(rtDevClip); | 163 rtClip.Intersect(rtDevClip); |
| 166 hState = m_pRenderDevice->SaveState(); | 164 hState = m_pRenderDevice->SaveState(); |
| 167 return m_pRenderDevice->SetClipRect(rtClip); | 165 return m_pRenderDevice->SetClipRect(rtClip); |
| 168 } | 166 } |
| 169 | 167 |
| 170 void CFDE_RenderContext::RestoreClip(FDE_HDEVICESTATE hState) { | 168 void CFDE_RenderContext::RestoreClip(FDE_HDEVICESTATE hState) { |
| 171 m_pRenderDevice->RestoreState(hState); | 169 m_pRenderDevice->RestoreState(hState); |
| 172 } | 170 } |
| OLD | NEW |