summaryrefslogtreecommitdiff
path: root/core/fxcodec/jbig2/JBig2_Context.cpp
diff options
context:
space:
mode:
authorLei Zhang <thestig@chromium.org>2018-05-01 14:32:54 +0000
committerChromium commit bot <commit-bot@chromium.org>2018-05-01 14:32:54 +0000
commitea603b9f0baf33462b61fa4ee6364e4f4161f55a (patch)
tree0a1f18531181ac30a4a87cd5e67909f4248bfb66 /core/fxcodec/jbig2/JBig2_Context.cpp
parent723543481bea9c6ea14fc39b71333b34eb8d89b4 (diff)
downloadpdfium-ea603b9f0baf33462b61fa4ee6364e4f4161f55a.tar.xz
Clean up CJBig2_Image compose methods.
- Mark them private when possible. - Disambiguate method names. - Make method names match the style guide. - Pass in rects by reference. Change-Id: I0bf848756e81a92d20e46a81cd6260b660eaf482 Reviewed-on: https://pdfium-review.googlesource.com/31772 Commit-Queue: Ryan Harrison <rharrison@chromium.org> Reviewed-by: Ryan Harrison <rharrison@chromium.org>
Diffstat (limited to 'core/fxcodec/jbig2/JBig2_Context.cpp')
-rw-r--r--core/fxcodec/jbig2/JBig2_Context.cpp22
1 files changed, 11 insertions, 11 deletions
diff --git a/core/fxcodec/jbig2/JBig2_Context.cpp b/core/fxcodec/jbig2/JBig2_Context.cpp
index 8d416ffc3c..76dff1d592 100644
--- a/core/fxcodec/jbig2/JBig2_Context.cpp
+++ b/core/fxcodec/jbig2/JBig2_Context.cpp
@@ -931,7 +931,7 @@ int32_t CJBig2_Context::ParseTextRegion(CJBig2_Segment* pSegment) {
m_pPage->expand(ri.y + ri.height, (pPageInfo->m_cFlags & 4) ? 1 : 0);
}
}
- m_pPage->composeFrom(ri.x, ri.y, pSegment->m_Image.get(),
+ m_pPage->ComposeFrom(ri.x, ri.y, pSegment->m_Image.get(),
(JBig2ComposeOp)(ri.flags & 0x03));
pSegment->m_Image.reset();
}
@@ -1051,7 +1051,7 @@ int32_t CJBig2_Context::ParseHalftoneRegion(CJBig2_Segment* pSegment,
m_pPage->expand(ri.y + ri.height, (pPageInfo->m_cFlags & 4) ? 1 : 0);
}
}
- m_pPage->composeFrom(ri.x, ri.y, pSegment->m_Image.get(),
+ m_pPage->ComposeFrom(ri.x, ri.y, pSegment->m_Image.get(),
(JBig2ComposeOp)(ri.flags & 0x03));
pSegment->m_Image.reset();
}
@@ -1113,10 +1113,10 @@ int32_t CJBig2_Context::ParseGenericRegion(CJBig2_Segment* pSegment,
(pPageInfo->m_cFlags & 4) ? 1 : 0);
}
}
- FX_RECT Rect = m_pGRD->GetReplaceRect();
- m_pPage->composeFrom(m_ri.x + Rect.left, m_ri.y + Rect.top,
- pSegment->m_Image.get(),
- (JBig2ComposeOp)(m_ri.flags & 0x03), &Rect);
+ const FX_RECT& rect = m_pGRD->GetReplaceRect();
+ m_pPage->ComposeFromWithRect(m_ri.x + rect.left, m_ri.y + rect.top,
+ pSegment->m_Image.get(), rect,
+ (JBig2ComposeOp)(m_ri.flags & 0x03));
}
return JBIG2_SUCCESS;
}
@@ -1146,10 +1146,10 @@ int32_t CJBig2_Context::ParseGenericRegion(CJBig2_Segment* pSegment,
(pPageInfo->m_cFlags & 4) ? 1 : 0);
}
}
- FX_RECT Rect = m_pGRD->GetReplaceRect();
- m_pPage->composeFrom(m_ri.x + Rect.left, m_ri.y + Rect.top,
- pSegment->m_Image.get(),
- (JBig2ComposeOp)(m_ri.flags & 0x03), &Rect);
+ const FX_RECT& rect = m_pGRD->GetReplaceRect();
+ m_pPage->ComposeFromWithRect(m_ri.x + rect.left, m_ri.y + rect.top,
+ pSegment->m_Image.get(), rect,
+ (JBig2ComposeOp)(m_ri.flags & 0x03));
pSegment->m_Image.reset();
}
m_pGRD.reset();
@@ -1219,7 +1219,7 @@ int32_t CJBig2_Context::ParseGenericRefinementRegion(CJBig2_Segment* pSegment) {
m_pPage->expand(ri.y + ri.height, (pPageInfo->m_cFlags & 4) ? 1 : 0);
}
}
- m_pPage->composeFrom(ri.x, ri.y, pSegment->m_Image.get(),
+ m_pPage->ComposeFrom(ri.x, ri.y, pSegment->m_Image.get(),
(JBig2ComposeOp)(ri.flags & 0x03));
pSegment->m_Image.reset();
}