summaryrefslogtreecommitdiff
path: root/xfa
diff options
context:
space:
mode:
authorHenrique Nakashima <hnakashima@chromium.org>2018-08-21 19:50:17 +0000
committerChromium commit bot <commit-bot@chromium.org>2018-08-21 19:50:17 +0000
commitdc2bb9ad21a10550fb451d7c842c63cbce98045b (patch)
treecced6e8df7fdbd424dcc6a4dd9c4f145645fc31c /xfa
parentaa58fb5759b937760464a2e63f19f464cd1cfe52 (diff)
downloadpdfium-dc2bb9ad21a10550fb451d7c842c63cbce98045b.tar.xz
Optimize rendering of two dimensional barcodes: defer upscale.
Defer upscaling as late as possible so that intermediary data structures are smaller. Made a couple of changes along the way to preserve the barcode correctness and fix some padding issues. For my example, this is a ~21x improvement in rendering time, down from ~190ms per barcode to ~9ms. Bug: 872907, pdfium:1135 Change-Id: If532e0f168f02fea9c31d473f34c0009da4f4612 Reviewed-on: https://pdfium-review.googlesource.com/40010 Reviewed-by: Lei Zhang <thestig@chromium.org> Commit-Queue: Henrique Nakashima <hnakashima@chromium.org>
Diffstat (limited to 'xfa')
-rw-r--r--xfa/fwl/cfx_barcode_unittest.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/xfa/fwl/cfx_barcode_unittest.cpp b/xfa/fwl/cfx_barcode_unittest.cpp
index 1113f39475..38aafeebf8 100644
--- a/xfa/fwl/cfx_barcode_unittest.cpp
+++ b/xfa/fwl/cfx_barcode_unittest.cpp
@@ -131,7 +131,7 @@ TEST_F(BarcodeTest, Pdf417) {
EXPECT_TRUE(Create(BC_PDF417));
EXPECT_TRUE(barcode()->Encode(L"clams"));
RenderDevice();
- EXPECT_EQ("fdd7d7ad325551927d9207a725b3832b", BitmapChecksum());
+ EXPECT_EQ("35e94f2da8649fb1402534cc65085999", BitmapChecksum());
}
TEST_F(BarcodeTest, DataMatrix) {