diff options
author | Tom Sepez <tsepez@chromium.org> | 2018-08-06 18:17:23 +0000 |
---|---|---|
committer | Chromium commit bot <commit-bot@chromium.org> | 2018-08-06 18:17:23 +0000 |
commit | 29201324de188dc3f88d835a90af18e10f5ff868 (patch) | |
tree | 9b7edf4fa8b878136d1d9f9fd54372fe0e670d2f /core/fxcodec/jbig2/JBig2_Image.h | |
parent | 475565477e431cd2925a6192b348d142beb21b4d (diff) | |
download | pdfium-29201324de188dc3f88d835a90af18e10f5ff868.tar.xz |
Small optimization in CJBig2_Image::SubImage()
We can use the memcpy() path whenever byte aligned.
Split code into helper methods.
Add test for fast path specifically.
Change-Id: I52f6129b0e788eb2da60536cfa6fce12a0609375
Reviewed-on: https://pdfium-review.googlesource.com/39432
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 | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/core/fxcodec/jbig2/JBig2_Image.h b/core/fxcodec/jbig2/JBig2_Image.h index b61ce84e0f..d593054e4d 100644 --- a/core/fxcodec/jbig2/JBig2_Image.h +++ b/core/fxcodec/jbig2/JBig2_Image.h @@ -69,6 +69,17 @@ class CJBig2_Image { JBig2ComposeOp op); private: + void SubImageFast(int32_t x, + int32_t y, + int32_t w, + int32_t h, + CJBig2_Image* pImage); + void SubImageSlow(int32_t x, + int32_t y, + int32_t w, + int32_t h, + CJBig2_Image* pImage); + bool ComposeToOpt2(CJBig2_Image* pDst, int32_t x, int32_t y, |