Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(533)

Unified Diff: xfa/fxfa/app/xfa_textlayout.cpp

Issue 1877383002: Only SolidBrush types are created, remove other brushes. (Closed) Base URL: https://pdfium.googlesource.com/pdfium.git@master
Patch Set: Created 4 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « xfa/fde/tto/fde_textout.cpp ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: xfa/fxfa/app/xfa_textlayout.cpp
diff --git a/xfa/fxfa/app/xfa_textlayout.cpp b/xfa/fxfa/app/xfa_textlayout.cpp
index 15625f299831700a017e24edb23a7fe4a7902020..a15fb959250ff79944dd62a31f097840c8d028e7 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++) {
« no previous file with comments | « xfa/fde/tto/fde_textout.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698