summaryrefslogtreecommitdiff
path: root/core/fpdfapi
diff options
context:
space:
mode:
authorthestig <thestig@chromium.org>2016-06-13 15:02:05 -0700
committerCommit bot <commit-bot@chromium.org>2016-06-13 15:02:05 -0700
commit2f307669ded2621f87d0b019e508f6663523f1d7 (patch)
tree035cb0ad851aa008a4f3c27c365c40564ef69859 /core/fpdfapi
parent868150bd69f0f1f9472affc20deea0a9341bf22b (diff)
downloadpdfium-2f307669ded2621f87d0b019e508f6663523f1d7.tar.xz
Remove default arguments from IFX_RenderDeviceDriver.
Review-Url: https://codereview.chromium.org/2059883004
Diffstat (limited to 'core/fpdfapi')
-rw-r--r--core/fpdfapi/fpdf_render/fpdf_render.cpp40
1 files changed, 14 insertions, 26 deletions
diff --git a/core/fpdfapi/fpdf_render/fpdf_render.cpp b/core/fpdfapi/fpdf_render/fpdf_render.cpp
index a675dfe09c..add2a8ae23 100644
--- a/core/fpdfapi/fpdf_render/fpdf_render.cpp
+++ b/core/fpdfapi/fpdf_render/fpdf_render.cpp
@@ -435,46 +435,34 @@ FX_BOOL CPDF_RenderStatus::ProcessPath(const CPDF_PathObject* pPathObj,
int FillType = pPathObj->m_FillType;
FX_BOOL bStroke = pPathObj->m_bStroke;
ProcessPathPattern(pPathObj, pObj2Device, FillType, bStroke);
- if (FillType == 0 && !bStroke) {
+ if (FillType == 0 && !bStroke)
return TRUE;
- }
- uint32_t fill_argb = 0;
- if (FillType) {
- fill_argb = GetFillArgb(pPathObj);
- }
- uint32_t stroke_argb = 0;
- if (bStroke) {
- stroke_argb = GetStrokeArgb(pPathObj);
- }
+
+ uint32_t fill_argb = FillType ? GetFillArgb(pPathObj) : 0;
+ uint32_t stroke_argb = bStroke ? GetStrokeArgb(pPathObj) : 0;
CFX_Matrix path_matrix = pPathObj->m_Matrix;
path_matrix.Concat(*pObj2Device);
- if (!IsAvailableMatrix(path_matrix)) {
+ if (!IsAvailableMatrix(path_matrix))
return TRUE;
- }
- if (FillType && (m_Options.m_Flags & RENDER_RECT_AA)) {
+
+ if (FillType && (m_Options.m_Flags & RENDER_RECT_AA))
FillType |= FXFILL_RECT_AA;
- }
- if (m_Options.m_Flags & RENDER_FILL_FULLCOVER) {
+ if (m_Options.m_Flags & RENDER_FILL_FULLCOVER)
FillType |= FXFILL_FULLCOVER;
- }
- if (m_Options.m_Flags & RENDER_NOPATHSMOOTH) {
+ if (m_Options.m_Flags & RENDER_NOPATHSMOOTH)
FillType |= FXFILL_NOPATHSMOOTH;
- }
- if (bStroke) {
+ if (bStroke)
FillType |= FX_FILL_STROKE;
- }
const CPDF_GeneralStateData* pGeneralData =
static_cast<const CPDF_PageObject*>(pPathObj)->m_GeneralState.GetObject();
- if (pGeneralData && pGeneralData->m_StrokeAdjust) {
+ if (pGeneralData && pGeneralData->m_StrokeAdjust)
FillType |= FX_STROKE_ADJUST;
- }
- if (m_pType3Char) {
+ if (m_pType3Char)
FillType |= FX_FILL_TEXT_MODE;
- }
+
CFX_GraphStateData graphState(*pPathObj->m_GraphState.GetObject());
- if (m_Options.m_Flags & RENDER_THINLINE) {
+ if (m_Options.m_Flags & RENDER_THINLINE)
graphState.m_LineWidth = 0;
- }
return m_pDevice->DrawPathWithBlend(pPathObj->m_Path.GetObject(),
&path_matrix, &graphState, fill_argb,
stroke_argb, FillType, m_curBlend);