From 2d03e604b3979db45f6f2ea8c00c8d7fe0790790 Mon Sep 17 00:00:00 2001 From: Dan Sinclair Date: Mon, 14 Aug 2017 15:03:20 -0400 Subject: Cleaning up the visual set iterator This CL starts cleaning up the visual set iterator code. Change-Id: I643dc9edeeb0c7ff06ccd34a1977f811675413d8 Reviewed-on: https://pdfium-review.googlesource.com/10615 Reviewed-by: Henrique Nakashima Commit-Queue: dsinclair --- xfa/fwl/cfwl_edit.cpp | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) (limited to 'xfa/fwl') diff --git a/xfa/fwl/cfwl_edit.cpp b/xfa/fwl/cfwl_edit.cpp index a261041534..fe4b9dad0c 100644 --- a/xfa/fwl/cfwl_edit.cpp +++ b/xfa/fwl/cfwl_edit.cpp @@ -567,12 +567,11 @@ void CFWL_Edit::DrawContent(CXFA_Graphics* pGraphics, if (!pRenderDev) return; - auto pRenderDevice = pdfium::MakeUnique(pRenderDev); - pRenderDevice->SetClipRect(rtClip); + CFDE_RenderDevice renderDevice(pRenderDev); + renderDevice.SetClipRect(rtClip); - auto pRenderContext = pdfium::MakeUnique(); - pRenderContext->StartRender(pRenderDevice.get(), pPage, mt); - pRenderContext->DoRender(); + CFDE_RenderContext renderContext(&renderDevice); + renderContext.Render(pPage, mt); if (m_pProperties->m_dwStyleExes & FWL_STYLEEXT_EDT_CombText) { pGraphics->RestoreGraphState(); -- cgit v1.2.3