summaryrefslogtreecommitdiff
path: root/xfa/fxfa/app
diff options
context:
space:
mode:
authordsinclair <dsinclair@chromium.org>2016-04-12 09:51:45 -0700
committerCommit bot <commit-bot@chromium.org>2016-04-12 09:51:45 -0700
commit25c223d1c3a662a0e69a5bf95083afbd5fa3cd97 (patch)
treed1b6a27b093b969696c2697dd183deb21d8cb6bd /xfa/fxfa/app
parentf9924422a4cd1d1b6d2d4240c83b5c1082da3629 (diff)
downloadpdfium-25c223d1c3a662a0e69a5bf95083afbd5fa3cd97.tar.xz
Only SolidBrush types are created, remove other brushes.
We only ever create a CFDE_SolidBrush, there is nothing which creates Texture, Hatch or LinearGradient brushes. This Cl removes all the code that isn't used for SolidBrush. A followup Cl will rename SolidBrush to Brush and remove the Brush interface in favour of the concrete class. BUG=pdfium:468 Review URL: https://codereview.chromium.org/1877383002
Diffstat (limited to 'xfa/fxfa/app')
-rw-r--r--xfa/fxfa/app/xfa_textlayout.cpp9
1 files changed, 4 insertions, 5 deletions
diff --git a/xfa/fxfa/app/xfa_textlayout.cpp b/xfa/fxfa/app/xfa_textlayout.cpp
index 15625f2998..a15fb95925 100644
--- a/xfa/fxfa/app/xfa_textlayout.cpp
+++ b/xfa/fxfa/app/xfa_textlayout.cpp
@@ -10,6 +10,7 @@
#include "core/fxcrt/include/fx_ext.h"
#include "xfa/fde/css/fde_csscache.h"
+#include "xfa/fde/fde_object.h"
#include "xfa/fde/fde_pen.h"
#include "xfa/fde/xml/fde_xml_imp.h"
#include "xfa/fgas/crt/fgas_algorithm.h"
@@ -1222,12 +1223,10 @@ FX_BOOL CXFA_TextLayout::DrawString(CFX_RenderDevice* pFxDevice,
}
FDE_HDEVICESTATE state = pDevice->SaveState();
pDevice->SetClipRect(rtClip);
- IFDE_SolidBrush* pSolidBrush =
- (IFDE_SolidBrush*)IFDE_Brush::Create(FDE_BRUSHTYPE_Solid);
- IFDE_Pen* pPen = IFDE_Pen::Create();
+ IFDE_SolidBrush* pSolidBrush = new CFDE_SolidBrush;
+ IFDE_Pen* pPen = new CFDE_Pen;
FXSYS_assert(pDevice);
- FXSYS_assert(pSolidBrush);
- FXSYS_assert(pPen);
+
if (m_pieceLines.GetSize() == 0) {
int32_t iBlockCount = CountBlocks();
for (int32_t i = 0; i < iBlockCount; i++) {