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

Unified Diff: xfa/fxbarcode/oned/BC_OneDimWriter.cpp

Issue 2158023002: Pdfium: Fix fonts leaking on ClosePage. (Closed) Base URL: https://pdfium.googlesource.com/pdfium@master
Patch Set: Fix xfa tests. Created 4 years, 3 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
Index: xfa/fxbarcode/oned/BC_OneDimWriter.cpp
diff --git a/xfa/fxbarcode/oned/BC_OneDimWriter.cpp b/xfa/fxbarcode/oned/BC_OneDimWriter.cpp
index 5f10e842ac47f499fcf96685998b205dd0a028ea..80f76fba9fa7b7618482ff96359f2c09a447e05e 100644
--- a/xfa/fxbarcode/oned/BC_OneDimWriter.cpp
+++ b/xfa/fxbarcode/oned/BC_OneDimWriter.cpp
@@ -219,9 +219,9 @@ void CBC_OneDimWriter::ShowDeviceChars(CFX_RenderDevice* device,
if (matrix) {
affine_matrix.Concat(*matrix);
}
- device->DrawNormalText(
- str.GetLength(), pCharPos, m_pFont, CFX_GEModule::Get()->GetFontCache(),
- (FX_FLOAT)iFontSize, &affine_matrix, m_fontColor, FXTEXT_CLEARTYPE);
+ device->DrawNormalText(str.GetLength(), pCharPos, m_pFont,
+ (FX_FLOAT)iFontSize, &affine_matrix, m_fontColor,
+ FXTEXT_CLEARTYPE);
}
void CBC_OneDimWriter::ShowBitmapChars(CFX_DIBitmap* pOutBitmap,
@@ -238,8 +238,7 @@ void CBC_OneDimWriter::ShowBitmapChars(CFX_DIBitmap* pOutBitmap,
FX_RECT geRect(0, 0, (int)geWidth, iTextHeight);
ge.FillRect(&geRect, m_backgroundColor);
CFX_Matrix affine_matrix(1.0, 0.0, 0.0, -1.0, 0.0, (FX_FLOAT)iFontSize);
- ge.DrawNormalText(str.GetLength(), pCharPos, m_pFont,
- CFX_GEModule::Get()->GetFontCache(), (FX_FLOAT)iFontSize,
+ ge.DrawNormalText(str.GetLength(), pCharPos, m_pFont, (FX_FLOAT)iFontSize,
&affine_matrix, m_fontColor, FXTEXT_CLEARTYPE);
CFX_FxgeDevice geBitmap;
geBitmap.Attach(pOutBitmap, false, nullptr, false);

Powered by Google App Engine
This is Rietveld 408576698