From 73b492a5d775c05d8c186c8478d1003edfffd34c Mon Sep 17 00:00:00 2001 From: Dan Sinclair Date: Mon, 14 Aug 2017 17:23:25 -0400 Subject: Remove CFDE_RenderDevice This CL removes CFDE_RenderDevice. For most of the proxy'd calls we call the CFX_RenderDevice directly now. To set the clip rect an overload was added to accept a CFX_RectF and handle the casting to FX_RECT. The one needed method, DrawString, is move to a static on CFDE_TextOut. Change-Id: I95ea7e1fa1fd4702074b797c06423c9c9cb51db9 Reviewed-on: https://pdfium-review.googlesource.com/10951 Reviewed-by: Tom Sepez Commit-Queue: dsinclair --- xfa/fxfa/cxfa_fwltheme.cpp | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) (limited to 'xfa/fxfa/cxfa_fwltheme.cpp') diff --git a/xfa/fxfa/cxfa_fwltheme.cpp b/xfa/fxfa/cxfa_fwltheme.cpp index 89ce0dbfbc..85e48a5123 100644 --- a/xfa/fxfa/cxfa_fwltheme.cpp +++ b/xfa/fxfa/cxfa_fwltheme.cpp @@ -110,14 +110,13 @@ void CXFA_FWLTheme::DrawText(CFWL_ThemeText* pParams) { if (!pRenderDevice) return; - m_pTextOut->SetRenderDevice(pRenderDevice); CFX_Matrix mtPart = pParams->m_matrix; CFX_Matrix* pMatrix = pGraphics->GetMatrix(); if (pMatrix) { mtPart.Concat(*pMatrix); } m_pTextOut->SetMatrix(mtPart); - m_pTextOut->DrawLogicText(pParams->m_wsText.c_str(), + m_pTextOut->DrawLogicText(pRenderDevice, pParams->m_wsText.c_str(), pParams->m_wsText.GetLength(), pParams->m_rtPart); return; } @@ -131,7 +130,6 @@ void CXFA_FWLTheme::DrawText(CFWL_ThemeText* pParams) { if (!pRenderDevice) return; - m_pTextOut->SetRenderDevice(pRenderDevice); m_pTextOut->SetStyles(pParams->m_dwTTOStyles); m_pTextOut->SetAlignment(pParams->m_iTTOAlign); m_pTextOut->SetFont(pAcc->GetFDEFont()); @@ -143,7 +141,7 @@ void CXFA_FWLTheme::DrawText(CFWL_ThemeText* pParams) { mtPart.Concat(*pMatrix); m_pTextOut->SetMatrix(mtPart); - m_pTextOut->DrawLogicText(pParams->m_wsText.c_str(), + m_pTextOut->DrawLogicText(pRenderDevice, pParams->m_wsText.c_str(), pParams->m_wsText.GetLength(), pParams->m_rtPart); } -- cgit v1.2.3