diff options
author | Tom Sepez <tsepez@chromium.org> | 2018-08-07 17:13:07 +0000 |
---|---|---|
committer | Chromium commit bot <commit-bot@chromium.org> | 2018-08-07 17:13:07 +0000 |
commit | 651605112d947e33bbbd46ea1276bf2ccb452005 (patch) | |
tree | dffc5321f9b37b6570505c6908429d8646903fff /core/fxcodec/jbig2/JBig2_Image.h | |
parent | c0352f4584bf738b0073114d25e81e57b490d655 (diff) | |
download | pdfium-651605112d947e33bbbd46ea1276bf2ccb452005.tar.xz |
Combine redundant CJBig2_Image code.
Once upon a time, someone cut-n-pasted ~300 lines of code to avoid
creating a default rectangle and to save a couple of additions. Then
one path got one set of fixes (safe ints) and the other path got a
second set of fixes (source bounds checks). Re-unify, picking up all
the fixes, since they are identical otherwise.
Change-Id: I099e854bc8ad027efabd5c2077c4319ee8221256
Reviewed-on: https://pdfium-review.googlesource.com/39550
Reviewed-by: Lei Zhang <thestig@chromium.org>
Commit-Queue: Tom Sepez <tsepez@chromium.org>
Diffstat (limited to 'core/fxcodec/jbig2/JBig2_Image.h')
-rw-r--r-- | core/fxcodec/jbig2/JBig2_Image.h | 15 |
1 files changed, 5 insertions, 10 deletions
diff --git a/core/fxcodec/jbig2/JBig2_Image.h b/core/fxcodec/jbig2/JBig2_Image.h index d593054e4d..a431510a7b 100644 --- a/core/fxcodec/jbig2/JBig2_Image.h +++ b/core/fxcodec/jbig2/JBig2_Image.h @@ -79,16 +79,11 @@ class CJBig2_Image { int32_t w, int32_t h, CJBig2_Image* pImage); - - bool ComposeToOpt2(CJBig2_Image* pDst, - int32_t x, - int32_t y, - JBig2ComposeOp op); - bool ComposeToOpt2WithRect(CJBig2_Image* pDst, - int32_t x, - int32_t y, - JBig2ComposeOp op, - const FX_RECT& rtSrc); + bool ComposeToInternal(CJBig2_Image* pDst, + int32_t x, + int32_t y, + JBig2ComposeOp op, + const FX_RECT& rtSrc); MaybeOwned<uint8_t, FxFreeDeleter> m_pData; int32_t m_nWidth = 0; // 1-bit pixels |