diff options
author | art-snake <art-snake@yandex-team.ru> | 2016-09-20 07:46:25 -0700 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2016-09-20 07:46:26 -0700 |
commit | 9972ff99285cea12a20026136e98c1e635a15010 (patch) | |
tree | 7ddd9c0a49329baccd0e570fe064527b794c1fde /xfa/fxbarcode/oned/BC_OneDimWriter.cpp | |
parent | 717d1330bafb846e4cd25bfb4952bfdedce0db91 (diff) | |
download | pdfium-9972ff99285cea12a20026136e98c1e635a15010.tar.xz |
Refactor CFX_FontCache to have only one in GE Module.
After this CL: only one global CFX_FontCache used. Any cached items
from it, are released, when they are not being used.
This is restore part of reverted CL:
Original CL: https://codereview.chromium.org/2158023002
Revert reason: BUG=647612
Fix bug CL: https://codereview.chromium.org/2350193003
Review-Url: https://codereview.chromium.org/2350243002
Diffstat (limited to 'xfa/fxbarcode/oned/BC_OneDimWriter.cpp')
-rw-r--r-- | xfa/fxbarcode/oned/BC_OneDimWriter.cpp | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/xfa/fxbarcode/oned/BC_OneDimWriter.cpp b/xfa/fxbarcode/oned/BC_OneDimWriter.cpp index 5f10e842ac..80f76fba9f 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); |