From 3689975377feb92a84488cd51b1cb30c818e3d55 Mon Sep 17 00:00:00 2001 From: Lei Zhang Date: Thu, 17 May 2018 17:21:22 +0000 Subject: Expose CJBig2_Image::ComposeTo() as a public method. CJBig2_Image::ComposeFrom() wraps a call to ComposeTo() and does an extra validity check. In tight loops where the validity check will always succeed, this is wasteful. Change existing callers of ComposeFrom() to ComposeTo() when the validity check has already been done. BUG=chromium:840728 Change-Id: I39fb42eea49b92b7804cbd42c3d8a0329edeb58d Reviewed-on: https://pdfium-review.googlesource.com/32637 Commit-Queue: Lei Zhang Reviewed-by: Ryan Harrison --- core/fxcodec/jbig2/JBig2_HtrdProc.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'core/fxcodec/jbig2/JBig2_HtrdProc.cpp') diff --git a/core/fxcodec/jbig2/JBig2_HtrdProc.cpp b/core/fxcodec/jbig2/JBig2_HtrdProc.cpp index 29c8118883..4fce8a48a1 100644 --- a/core/fxcodec/jbig2/JBig2_HtrdProc.cpp +++ b/core/fxcodec/jbig2/JBig2_HtrdProc.cpp @@ -129,7 +129,7 @@ std::unique_ptr CJBig2_HTRDProc::DecodeImage( uint32_t pat_index = std::min(gsval, HNUMPATS - 1); int32_t out_x = (HGX + y * HRY + x * HRX) >> 8; int32_t out_y = (HGY + y * HRX - x * HRY) >> 8; - HTREG->ComposeFrom(out_x, out_y, (*HPATS)[pat_index].get(), HCOMBOP); + (*HPATS)[pat_index]->ComposeTo(HTREG.get(), out_x, out_y, HCOMBOP); } } return HTREG; -- cgit v1.2.3