summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2017-08-10Fix component builds for FreeType changeschromium/3184chromium/3183Bruce Dawson
FreeType has changed so it doesn't define ft_adobe_glyph_list once for every translation unit, which avoids wasting space in the data segment with duplicates. However Chromium component builds were depending on this behavior. This fixes component builds while avoiding duplicate arrays in non-component builds. This change makes no difference to pdfium at the moment but will probably be needed when it gains support for component builds. Change-Id: Ieed7c711bdbd3fa6eef19da60e906667dab8fb1b Reviewed-on: https://pdfium-review.googlesource.com/10670 Commit-Queue: Bruce Dawson <brucedawson@chromium.org> Reviewed-by: Lei Zhang <thestig@chromium.org>
2017-08-10Add safetynet_job.py to run safetynet_compare.py periodically.chromium/3182Henrique Nakashima
safetynet.job.py verifies if there were performance changes since its last run. Its state is comprised only of the last checkpoint, and is kept in a directory passed by argument. Results of runs are written to this directory as well. Change-Id: I94e0e176b10fd1d2b18d84f82427f63be107ae17 Reviewed-on: https://pdfium-review.googlesource.com/10370 Commit-Queue: Henrique Nakashima <hnakashima@chromium.org> Reviewed-by: Lei Zhang <thestig@chromium.org>
2017-08-10Fixing utf-8 safetynet_conclusions problem when writing the json.Henrique Nakashima
The previous fix (encoding on print) breaks when running compare.py directly. The real problem was in writing the json. Change-Id: Ie4cf926b5c6153731c1ae187ec6a7cffa74ce67b Reviewed-on: https://pdfium-review.googlesource.com/10653 Reviewed-by: Ryan Harrison <rharrison@chromium.org> Commit-Queue: Henrique Nakashima <hnakashima@chromium.org>
2017-08-10Move graphic state operations outside BT/ET operationsRyan Wiley
Bug: pdfium:857 Change-Id: Ic1fb12459cad79b45466df10a24fe6743377ae14 Reviewed-on: https://pdfium-review.googlesource.com/10612 Reviewed-by: Nicolás Peña <npm@chromium.org> Commit-Queue: Nicolás Peña <npm@chromium.org>
2017-08-10Remove unused FDE_TTOSTYLE_ flagsDan Sinclair
This CL removes the unused FDE_TTOSTYLE_ flags and their supporting code. Change-Id: Ib5ff1af77ceab5a526a845c1fc316a3742ab810a Reviewed-on: https://pdfium-review.googlesource.com/10455 Reviewed-by: Tom Sepez <tsepez@chromium.org> Reviewed-by: Henrique Nakashima <hnakashima@chromium.org> Commit-Queue: dsinclair <dsinclair@chromium.org>
2017-08-10Temporarily disable image mask individual renderingrbpotter
Bug: chromium:753700 Change-Id: I28589739f4258fa62f3f853aa91bc6cffd7d96ba Reviewed-on: https://pdfium-review.googlesource.com/10611 Commit-Queue: Rebekah Potter <rbpotter@chromium.org> Reviewed-by: Lei Zhang <thestig@chromium.org>
2017-08-10Remove CFDE_PathDan Sinclair
This CL removes CFDE_Path. There is only one method, AddLine which is required, the rest can be removed. That method is moved to CFX_PathData which is what CFDE_Path is appending to anyway. Change-Id: If50af8cf856a9f7379791fe1999174db5fd13e38 Reviewed-on: https://pdfium-review.googlesource.com/10454 Reviewed-by: Henrique Nakashima <hnakashima@chromium.org> Reviewed-by: Tom Sepez <tsepez@chromium.org> Commit-Queue: dsinclair <dsinclair@chromium.org>
2017-08-10LCMS: rename folderNicolas Pena
Change-Id: I5f240cb0779648dc5427fecb5561086e7c0fb16a Reviewed-on: https://pdfium-review.googlesource.com/10650 Reviewed-by: dsinclair <dsinclair@chromium.org> Commit-Queue: Nicolás Peña <npm@chromium.org>
2017-08-10Rename CFX_UTF8Decoder::AppendChar to AppendCodePoint.Henrique Nakashima
Change-Id: Iec5523492eac3910f5ed105370e9092fd992b1b9 Reviewed-on: https://pdfium-review.googlesource.com/10471 Commit-Queue: Henrique Nakashima <hnakashima@chromium.org> Reviewed-by: Tom Sepez <tsepez@chromium.org>
2017-08-10Rename DLLEXPORT AND STDCALLDan Sinclair
This CL renames DLLEXPORT to FPDF_EXPORT and STDCALL to FPDF_CALLCONV to be more PDFium specific. This is split off of https://pdfium-review.googlesource.com/c/8970 by Felix Kauselmann. Bug: pdfium:825 Change-Id: I0aea9d43f1714b1e10e935c4a7eea685a5ad8998 Reviewed-on: https://pdfium-review.googlesource.com/10610 Reviewed-by: Tom Sepez <tsepez@chromium.org> Commit-Queue: dsinclair <dsinclair@chromium.org>
2017-08-10Extracting GetBooleanGnArg from coverage_report.pyHenrique Nakashima
Change-Id: I5475b37aad69361e2e7fae4ce69faf011e3b5c40 Reviewed-on: https://pdfium-review.googlesource.com/10030 Reviewed-by: Ryan Harrison <rharrison@chromium.org> Commit-Queue: Henrique Nakashima <hnakashima@chromium.org>
2017-08-10Revert "Add a build target and a proper export header for shared library ↵Henrique Nakashima
builds." This reverts commit 00334675c18a0203f313cceb670c970a77280f49. Reason for revert: Breaking the deps roller - https://chromium-review.googlesource.com/c/609307 Original change's description: > Add a build target and a proper export header for shared library builds. > > This CL adds support for Chromium's component build feature to pdfium. > > The export header stub in fpdfview.h is expanded to match Chromium's > export mechanisms and patterns (fixes pdfium:825). > > A component/shared library build can be triggered by adding > > is_component_build = true > > as a gn argument. Please note that setting this will also affect some > of pdfiums dependencies like v8, which will be build as components > too. > > Additionally, this CL provides a "pdf_source_set" template which > dynamically enables the use of "source_set" when building a complete > static library or a shared library to reduce build time. > > When testing this it is recommended to only build the pdfium target as > most of pdfiums test rely on non-public functions which aren't exported > by the shared library. > > Bug: pdfium:825,pdfium:826 > Change-Id: Icedc538ec535e11d1e53c4d5fabc8c064b275752 > Reviewed-on: https://pdfium-review.googlesource.com/8970 > Reviewed-by: dsinclair <dsinclair@chromium.org> > Commit-Queue: dsinclair <dsinclair@chromium.org> TBR=thestig@chromium.org,tsepez@chromium.org,brucedawson@chromium.org,dsinclair@google.com,dsinclair@chromium.org,licorn@gmail.com Change-Id: Ib02af2298932481293f50d362ae87bfedf284821 No-Presubmit: true No-Tree-Checks: true No-Try: true Bug: pdfium:825, pdfium:826 Reviewed-on: https://pdfium-review.googlesource.com/10550 Reviewed-by: Henrique Nakashima <hnakashima@chromium.org> Commit-Queue: Henrique Nakashima <hnakashima@chromium.org>
2017-08-10Make CFX_ByteString(ostringstream) const.Henrique Nakashima
Change-Id: I782379cc7f93b93ed34a5d0a39ee2f198c650465 Reviewed-on: https://pdfium-review.googlesource.com/10430 Reviewed-by: Tom Sepez <tsepez@chromium.org> Commit-Queue: Henrique Nakashima <hnakashima@chromium.org>
2017-08-10Remove default params in CFDE_RenderDeviceDan Sinclair
This CL removes the two default nullptr values in CFDE_RenderDevice. Change-Id: I32e7cf5f45fcf1fbddd0c9070024647ac06203c5 Reviewed-on: https://pdfium-review.googlesource.com/10453 Reviewed-by: Tom Sepez <tsepez@chromium.org> Commit-Queue: dsinclair <dsinclair@chromium.org>
2017-08-09Remove CFX_ByteTextBuf from CFX_UTF8EncoderHenrique Nakashima
Also making CFX_ByteString(ostringstream) const. Bug: pdfium:731 Change-Id: Iaee610248a5634e8731eaf05944c32d52c4e8015 Reviewed-on: https://pdfium-review.googlesource.com/10151 Commit-Queue: Henrique Nakashima <hnakashima@chromium.org> Reviewed-by: Tom Sepez <tsepez@chromium.org>
2017-08-09Fixing PrintConclusionsDictHumanReadable for dicts loaded from string.Henrique Nakashima
json.loads() reads non-ascii filenames to a non-unicode string and an encode step is required before a format. Change-Id: I3145c7aa41e947f78898e73484c3cb1655418689 Reviewed-on: https://pdfium-review.googlesource.com/10410 Reviewed-by: Lei Zhang <thestig@chromium.org> Commit-Queue: Henrique Nakashima <hnakashima@chromium.org>
2017-08-09Add a FPDF_GetFileVersion() test for a linearized document.Lei Zhang
Change the CPDFParserEmbeddertest.Feature_Linearized_Loading test case into FPDFViewEmbeddertest.LinearizedDocument, and add a call to FPDF_GetFileVersion(). Change-Id: I0272c1e71c6f61393838bd3db41b154c4f5620ba Reviewed-on: https://pdfium-review.googlesource.com/10450 Reviewed-by: dsinclair <dsinclair@chromium.org> Commit-Queue: Lei Zhang <thestig@chromium.org>
2017-08-09Remove unused code from CFDE_RenderDevice.Dan Sinclair
Unused code, remove. Change-Id: Icbe53982f932eded350fc67e8022549178b92344 Reviewed-on: https://pdfium-review.googlesource.com/10452 Reviewed-by: Tom Sepez <tsepez@chromium.org> Commit-Queue: dsinclair <dsinclair@chromium.org>
2017-08-09Remove CFDE_{Pen|Brush} classesDan Sinclair
These classes just hold a color value. Instead of creating the class to pass the color we just pass the colors. Change-Id: I7f65ca4100bfbdcb02171c1e7e46150508e338f4 Reviewed-on: https://pdfium-review.googlesource.com/10451 Reviewed-by: Tom Sepez <tsepez@chromium.org> Commit-Queue: dsinclair <dsinclair@chromium.org>
2017-08-09Remove useless code.Artem Strygin
The CPDF_Parser::IsVersionUpdated is not used anymore. Change-Id: I896c42daca3c5bed7b9d700eaea6ced686ab5acb Reviewed-on: https://pdfium-review.googlesource.com/10490 Commit-Queue: Art Snake <art-snake@yandex-team.ru> Commit-Queue: dsinclair <dsinclair@chromium.org> Reviewed-by: dsinclair <dsinclair@chromium.org>
2017-08-09Add a build target and a proper export header for shared library builds.Felix Kauselmann
This CL adds support for Chromium's component build feature to pdfium. The export header stub in fpdfview.h is expanded to match Chromium's export mechanisms and patterns (fixes pdfium:825). A component/shared library build can be triggered by adding is_component_build = true as a gn argument. Please note that setting this will also affect some of pdfiums dependencies like v8, which will be build as components too. Additionally, this CL provides a "pdf_source_set" template which dynamically enables the use of "source_set" when building a complete static library or a shared library to reduce build time. When testing this it is recommended to only build the pdfium target as most of pdfiums test rely on non-public functions which aren't exported by the shared library. Bug: pdfium:825,pdfium:826 Change-Id: Icedc538ec535e11d1e53c4d5fabc8c064b275752 Reviewed-on: https://pdfium-review.googlesource.com/8970 Reviewed-by: dsinclair <dsinclair@chromium.org> Commit-Queue: dsinclair <dsinclair@chromium.org>
2017-08-09Unify initialization of CPDF_Parser.Artem Strygin
Move syntax parser initialization in separate method. Change-Id: I701284b1fee26a474c24ca68948a3462cc68faec Reviewed-on: https://pdfium-review.googlesource.com/10291 Commit-Queue: Art Snake <art-snake@yandex-team.ru> Reviewed-by: Lei Zhang <thestig@chromium.org>
2017-08-09Move tools/coverage to testing/tools/coverageHenrique Nakashima
Change-Id: Icb1d85167a234c9862a4011dea5dfaa09299c71c Reviewed-on: https://pdfium-review.googlesource.com/10431 Reviewed-by: Ryan Harrison <rharrison@chromium.org> Commit-Queue: Henrique Nakashima <hnakashima@chromium.org>
2017-08-09API and test for retrieving image filters from image objectsJane Liu
Added FPDFImageObj_GetImageFilterCount() and FPDFImageObj_GetImageFilters() for retrieving image filters of image objects. * Added a corresponding embedder test. * Changed the filter of an image object in embedded_image.pdf from DCTDecode to ASCIIHexDecode + DCTDecode, so we have a test case for images with more than one filter. Bug=pdfium:677 Change-Id: I398790a2cad33fea4ca16a0eb0889c04caa6b962 Reviewed-on: https://pdfium-review.googlesource.com/10130 Reviewed-by: Lei Zhang <thestig@chromium.org> Reviewed-by: dsinclair <dsinclair@chromium.org> Commit-Queue: Jane Liu <janeliulwq@google.com>
2017-08-09Unify of saving documents.chromium/3181Artem Strygin
In the original code the method of writing of objects depends on a much unpredictable factors: as: 1) Is there an updated version of the at least one object in the document. 2) The password is changed. 3) Was this object loaded earlier. 4) The Object is compressed and document have a password. With these factors it is difficult to predict what will be the final file. To reduce volatility use only one method that works in all cases mentioned. This method is parse then serialize. Change-Id: I3d7dcadd10abffbad68d1f993f2dd60b039ed989 Reviewed-on: https://pdfium-review.googlesource.com/9572 Commit-Queue: Art Snake <art-snake@yandex-team.ru> Reviewed-by: dsinclair <dsinclair@chromium.org>
2017-08-09Unify CPDF_Parser::ParseIndirectObjectAtXXX methods.Artem Strygin
Change-Id: I9ee1da4d0a9751dae8d595b610cf77c074c22cdc Reviewed-on: https://pdfium-review.googlesource.com/10350 Reviewed-by: dsinclair <dsinclair@chromium.org> Commit-Queue: Art Snake <art-snake@yandex-team.ru>
2017-08-09Move CSS data tables only used in one fileDan Sinclair
This CL moves the cfx_cssdatatable tables and methods which are only used in cfx_cssdeclaration to an anonymous namespace. Change-Id: Ib5dc71cc85c348e2ae7feaab8d6495fc2aa88642 Reviewed-on: https://pdfium-review.googlesource.com/9253 Commit-Queue: dsinclair <dsinclair@chromium.org> Reviewed-by: Tom Sepez <tsepez@chromium.org>
2017-08-09Fold CFX_IsOnlyValue define into only usageDan Sinclair
Change-Id: I2cb20fd00436858f035f984fc104bae2c2d01057 Reviewed-on: https://pdfium-review.googlesource.com/9252 Reviewed-by: Tom Sepez <tsepez@chromium.org> Commit-Queue: dsinclair <dsinclair@chromium.org>
2017-08-08Add validator into CPDF_SyntaxParser.Artem Strygin
Change-Id: I7fe8dcd8854e2f08b7b0ee53bde6c864108142ff Reviewed-on: https://pdfium-review.googlesource.com/9571 Reviewed-by: Lei Zhang <thestig@chromium.org>
2017-08-08Added FPDFPageObj_Destroy() for freeing page objects createdJane Liu
Bug=pdfium:854 Change-Id: I227418cdcb77e0aa7d48338f1ee0d753cef6bfdb Reviewed-on: https://pdfium-review.googlesource.com/10390 Reviewed-by: dsinclair <dsinclair@chromium.org> Commit-Queue: Jane Liu <janeliulwq@google.com>
2017-08-08Move CSS code to coreDan Sinclair
The xfa/fde/css code has no other links into xfa/. This CL moves the css code to core/fxcrt/css and sets to only build when pdf_enable_xfa is enabled. Change-Id: Iefd208e1f83a28b80b567c574e841e87bce310be Reviewed-on: https://pdfium-review.googlesource.com/9251 Commit-Queue: dsinclair <dsinclair@chromium.org> Reviewed-by: Tom Sepez <tsepez@chromium.org>
2017-08-07Tidy fx_codec_jpx_opj.cppchromium/3180Tom Sepez
Single no-op callback. pdfium::clamp() where appropriate. Use post-increment where appropriate. Add helper functions for image type. Change-Id: I1584a1c90b46bd87f6ee983b78b6a2119212d0fb Reviewed-on: https://pdfium-review.googlesource.com/10270 Reviewed-by: Lei Zhang <thestig@chromium.org> Commit-Queue: Tom Sepez <tsepez@chromium.org>
2017-08-07Convert static functions to anonymous namespaceTom Sepez
Mechanical change to bring into conformance with style guide. Change-Id: I80d06708ed5c40af7e797ea5dc6279a0b4f3cf6a Reviewed-on: https://pdfium-review.googlesource.com/10250 Reviewed-by: Lei Zhang <thestig@chromium.org> Commit-Queue: Tom Sepez <tsepez@chromium.org>
2017-08-07Fix PartitionAlloc vs. opj_malloc mismatch in fx_codec_jpx_opj.cppTom Sepez
Apply patch suggestions from reporter. Move all FX_Alloc'd memory into unique_ptrs so that no bare FX_Alloc/Free_Free calls remain. Fix a realloc / opj_realloc mismatch. Remove unused functions color_apply_icc_profile() and color_apply_conversion(). Tidy along the way, add some missing statics, and fix a confusing (but not quite member shadowing) local name. Bug: 752829 Change-Id: Ibf2d108a857e3de39e752c2c553a31e002a07caf Reviewed-on: https://pdfium-review.googlesource.com/10230 Reviewed-by: Lei Zhang <thestig@chromium.org> Reviewed-by: Chris Palmer <palmer@chromium.org> Commit-Queue: Tom Sepez <tsepez@chromium.org>
2017-08-04Remove _MSC_VER from JS_Value.cppchromium/3179chromium/3178Tom Sepez
Use one of the _FXM_PLATFORM_ macros we defined in fx_system.h in its place. Change-Id: Iabf56c2aa840927aa48532320b9cbf095b9b7b6e Reviewed-on: https://pdfium-review.googlesource.com/10210 Reviewed-by: Lei Zhang <thestig@chromium.org> Commit-Queue: Tom Sepez <tsepez@chromium.org>
2017-08-04Remove platform-specific IsFinite, JS_PortIsNan, and GetNan.Tom Sepez
Because C++11 gives us std::isfinite(), std::isnan() and std::nan(). Bug: pdfium:459 Change-Id: I128f332ec908df6aff66ef76012288fd22d423ed Reviewed-on: https://pdfium-review.googlesource.com/10190 Reviewed-by: Lei Zhang <thestig@chromium.org> Commit-Queue: Tom Sepez <tsepez@chromium.org>
2017-08-04Remove CFX_ByteTextBuf from cpdfsdk_interform.cpp and others.chromium/3177Henrique Nakashima
New version of the CL that include fpdf_parser_utility.cpp where there is an overload for CFX_ByteTextBuf << CPDF_Object* used by CFDF_Document. Bug: pdfium:731 Change-Id: I54f4e9ee7e10e94388f6f6584f3999f43689e84c Reviewed-on: https://pdfium-review.googlesource.com/10170 Reviewed-by: Tom Sepez <tsepez@chromium.org> Commit-Queue: Henrique Nakashima <hnakashima@chromium.org>
2017-08-04Enforce recent VC++ version (2015 or later).Tom Sepez
Remove ifdef'd code for versions we know will no longer work. Change-Id: I036c80168f846df1b98e9df4972f84655e8418fb Reviewed-on: https://pdfium-review.googlesource.com/10051 Reviewed-by: Lei Zhang <thestig@chromium.org> Commit-Queue: Tom Sepez <tsepez@chromium.org>
2017-08-04Revert "Remove CFX_ByteTextBuf from cpdfsdk_interform.cpp and others."Henrique Nakashima
This reverts commit aea80dcc0abc0c310316fa502f91a359bc684758. Reason for revert: WriteBuf's behavior was altered Original change's description: > Remove CFX_ByteTextBuf from cpdfsdk_interform.cpp and others. > > Bug: pdfium:731 > Change-Id: I61d38ab3f2b0ac68b8479ade25bab50f3a73c27b > Reviewed-on: https://pdfium-review.googlesource.com/9770 > Reviewed-by: Tom Sepez <tsepez@chromium.org> > Commit-Queue: Henrique Nakashima <hnakashima@chromium.org> TBR=tsepez@chromium.org,hnakashima@chromium.org,rharrison@chromium.org # Not skipping CQ checks because original CL landed > 1 day ago. Bug: pdfium:731 Change-Id: Ic66a2641c259173fb3792f7a4206e19ee4707fc9 Reviewed-on: https://pdfium-review.googlesource.com/10150 Reviewed-by: Henrique Nakashima <hnakashima@chromium.org> Commit-Queue: Henrique Nakashima <hnakashima@chromium.org>
2017-08-04Replace CFX_ByteTextBuf with ostringstream in fx_win32_gdipext.cppHenrique Nakashima
Bug: pdfium:731 Change-Id: I95d7c16e6c30e6675a17505359b5b7ae1dd5ff12 Reviewed-on: https://pdfium-review.googlesource.com/9950 Commit-Queue: Henrique Nakashima <hnakashima@chromium.org> Reviewed-by: Tom Sepez <tsepez@chromium.org>
2017-08-03Add script to compare performance of two versions of pdfium.Henrique Nakashima
Run from the pdfium root: $ testing/tools/safetynet_compare.py testing This compares the current branch with and without local changes. $ testing/tools/safetynet_compare.py testing/corpus --branch-before x This compares the current branch + local changes against branch x. It runs only the corpus tests. $ testing/tools/safetynet_compare.py testing --branch-before x --branch-after y --build-dir=~/output_compare This compares branch x and branch y. x and y can be revision hashes. The callgrind.out files of cases with significant changes will be created in ~/output_compare. $ testing/tools/safetynet_compare.py -h Print all options. Change-Id: I43aaf5fe890745db611fb3bc00a656ef799fdfef Reviewed-on: https://pdfium-review.googlesource.com/7390 Reviewed-by: Lei Zhang <thestig@chromium.org> Commit-Queue: Henrique Nakashima <hnakashima@chromium.org>
2017-08-03Added testing flag --save-images that saves embedded imagesJane Liu
1. Added --save-images flag in pdfium_test to save embedded images using FPDFImageObj_GetBitmap() API and the bitmap-to-png conversion tool. * Added support for bitmaps of other common color spaces in the bitmap-to-png conversion tool. Bug=pdfium:677 Change-Id: Ide29f51021695af0a1afb5205355f4b78b918d35 Reviewed-on: https://pdfium-review.googlesource.com/9710 Commit-Queue: Jane Liu <janeliulwq@google.com> Reviewed-by: Lei Zhang <thestig@chromium.org>
2017-08-03APIs and tests for retrieving raw/decoded data from image objectsJane Liu
Added FPDFImageObj_GetImageDataDecoded() for retrieving the uncompressed data of an image, and FPDFImageObj_GetImageDataRaw() for retrieving the raw data of an image. * Refactored out DecodeStreamMaybeCopyAndReturnLength(), which is used to decode both attachment data and image data. * Within DecodeStreamMaybeCopyAndReturnLength(), used a different decoder function which takes care of multiple filters if exist. As a result, CPDF_StreamParser::DecodeInlineStream() which was made static previously is now moved back into namespace. Bug=pdfium:677 Change-Id: I22a22c99acaca98ef8c15f88911f2646a2c854d5 Reviewed-on: https://pdfium-review.googlesource.com/9811 Commit-Queue: Jane Liu <janeliulwq@google.com> Reviewed-by: Lei Zhang <thestig@chromium.org>
2017-08-03LibTIFF: fix defines in tiffconfNicolas Pena
This CL hardcodes the defines used in tiffconf so that the values can be used inside of '#if'. The CL that changed them was: https://pdfium-review.googlesource.com/c/9410 SIZEOF_VOIDP was a new variable in that CL. This CL uses __LP64__ to detect whether this value should be set to 8 or to 4. Bug: chromium:718494 Change-Id: I628d64cb7e2e94c47b8bcc1856abf5949d6578d4 Reviewed-on: https://pdfium-review.googlesource.com/10090 Reviewed-by: Tom Sepez <tsepez@chromium.org> Commit-Queue: Nicolás Peña <npm@chromium.org>
2017-08-03APIs and tests for extracting bitmaps from image objectsJane Liu
Added FPDFImageObj_GetBitmap() that returns the bitmap of an image object, and a FPDFBitmap_GetFormat() that returns the format of a bitmap. * Fixed a small bitmap conversion bug in cfx_dibsource.cpp. * Enabled EmbedderTest::CompareBitmap() to support different formats of bitmaps. * Added an embedder test and a test PDF file with images of many different formats. Bug=pdfium:677 Change-Id: I6a72f9d969cf5f3577db9400ca33197c213622ed Reviewed-on: https://pdfium-review.googlesource.com/9690 Reviewed-by: Lei Zhang <thestig@chromium.org> Commit-Queue: Jane Liu <janeliulwq@google.com>
2017-08-03kill some stray __native_client__ definesTom Sepez
There isn't any work to NaCl PDFium at the moment, and it would take a lot more than these few changes. Change-Id: I6c4bf5f38bbfb9cf4f5a5688128c7720c38a8ce4 Reviewed-on: https://pdfium-review.googlesource.com/10050 Reviewed-by: Lei Zhang <thestig@chromium.org> Commit-Queue: Tom Sepez <tsepez@chromium.org>
2017-08-03Remove CPDF_Array::Truncate().chromium/3176Lei Zhang
The only non-test caller is gone. Change-Id: I261bc6d97c3047b2935d7b663c1a5f7d15670714 Reviewed-on: https://pdfium-review.googlesource.com/10010 Commit-Queue: Lei Zhang <thestig@chromium.org> Reviewed-by: Tom Sepez <tsepez@chromium.org>
2017-08-03Do not truncate the filter array in PDF_DataDecode().Lei Zhang
It is not needed to fix https://crbug.com/552046 and it causes different bug. BUG=chromium:750993 Change-Id: I11627045bd3e73fb439884c3362ab1c26eb95fe3 Reviewed-on: https://pdfium-review.googlesource.com/9990 Reviewed-by: Oliver Chang <ochang@chromium.org> Reviewed-by: Tom Sepez <tsepez@chromium.org> Commit-Queue: Lei Zhang <thestig@chromium.org>
2017-08-03Roll FreeType to 7e50824288fac5a36c2938fdb3e1c949ea53f982Nicolas Pena
Bug: chromium:738343 Change-Id: Ia5651c50c7f54a79533ebecbee8c020c289afda2 Reviewed-on: https://pdfium-review.googlesource.com/10031 Reviewed-by: Nicolás Peña <npm@chromium.org> Commit-Queue: Nicolás Peña <npm@chromium.org>
2017-08-03Avoid a redundant header offset check in CPDF_Parser.Lei Zhang
CPDF_Parser::StartLinearizedParse() calls StartParse(), but already knows the PDF header offset. Refactor StartParse() so it does not have to look for the header again. Change-Id: Id8cc39301ae72da868dafc53921622d5b28ce26e Reviewed-on: https://pdfium-review.googlesource.com/9830 Commit-Queue: Lei Zhang <thestig@chromium.org> Reviewed-by: Art Snake <art-snake@yandex-team.ru>