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

Unified Diff: core/fpdfapi/fpdf_render/fpdf_render_text.cpp

Issue 2303553002: Make CPDF_GeneralState have a CPDF_GeneralStateData (Closed)
Patch Set: Move functions .cpp file 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: core/fpdfapi/fpdf_render/fpdf_render_text.cpp
diff --git a/core/fpdfapi/fpdf_render/fpdf_render_text.cpp b/core/fpdfapi/fpdf_render/fpdf_render_text.cpp
index e5e28b429c9ed38ccafb3cb61d3ea0e55ec80eeb..cce6940fe430db7a1cc7837df86b0b15d06d9e15 100644
--- a/core/fpdfapi/fpdf_render/fpdf_render_text.cpp
+++ b/core/fpdfapi/fpdf_render/fpdf_render_text.cpp
@@ -225,7 +225,7 @@ CFX_GlyphBitmap* CPDF_Type3Cache::RenderGlyph(CPDF_Type3Glyphs* pSize,
return pGlyph;
}
-FX_BOOL CPDF_RenderStatus::ProcessText(const CPDF_TextObject* textobj,
+FX_BOOL CPDF_RenderStatus::ProcessText(CPDF_TextObject* textobj,
const CFX_Matrix* pObj2Device,
CFX_PathData* pClippingPath) {
if (textobj->m_nChars == 0)
@@ -321,15 +321,10 @@ FX_BOOL CPDF_RenderStatus::ProcessText(const CPDF_TextObject* textobj,
flag |= FX_FILL_STROKE;
flag |= FX_STROKE_TEXT_MODE;
}
- const CPDF_GeneralStateData* pGeneralData =
- static_cast<const CPDF_PageObject*>(textobj)
- ->m_GeneralState.GetObject();
- if (pGeneralData && pGeneralData->m_StrokeAdjust) {
+ if (textobj->m_GeneralState.GetStrokeAdjust())
flag |= FX_STROKE_ADJUST;
- }
- if (m_Options.m_Flags & RENDER_NOTEXTSMOOTH) {
+ if (m_Options.m_Flags & RENDER_NOTEXTSMOOTH)
flag |= FXFILL_NOPATHSMOOTH;
- }
return CPDF_TextRenderer::DrawTextPath(
m_pDevice, textobj->m_nChars, textobj->m_pCharCodes,
textobj->m_pCharPos, pFont, font_size, &text_matrix, pDeviceMatrix,
@@ -371,7 +366,7 @@ class CPDF_RefType3Cache {
};
// TODO(npm): Font fallback for type 3 fonts? (Completely separate code!!)
-FX_BOOL CPDF_RenderStatus::ProcessType3Text(const CPDF_TextObject* textobj,
+FX_BOOL CPDF_RenderStatus::ProcessType3Text(CPDF_TextObject* textobj,
const CFX_Matrix* pObj2Device) {
CPDF_Type3Font* pType3Font = textobj->m_TextState.GetFont()->AsType3Font();
for (int i = 0; i < m_Type3FontCache.GetSize(); ++i) {

Powered by Google App Engine
This is Rietveld 408576698