Age | Commit message (Collapse) | Author |
|
Change-Id: I6fa3fd93638bc3aeaaef854676fe31476888433b
Reviewed-on: https://pdfium-review.googlesource.com/37671
Reviewed-by: Henrique Nakashima <hnakashima@chromium.org>
Commit-Queue: Lei Zhang <thestig@chromium.org>
|
|
Commit {Insert later} removed the last caller to this method.
Change-Id: I1689b33486396cc3a41139f984f819b39ab02b2a
Reviewed-on: https://pdfium-review.googlesource.com/35130
Commit-Queue: Art Snake <art-snake@yandex-team.ru>
Reviewed-by: dsinclair <dsinclair@chromium.org>
|
|
Merge shared objects related data into CPDF_HintsTable::SharedObjGroupInfo.
Change-Id: I53bb7fc42ea6bcd26b3ebf91b8c6aa402108d086
Reviewed-on: https://pdfium-review.googlesource.com/15830
Reviewed-by: Lei Zhang <thestig@chromium.org>
Commit-Queue: Art Snake <art-snake@yandex-team.ru>
|
|
This is a reland of 77f15f7883638a4ced131d74c053af10a5970ce9
Original change's description:
> Avoid duplicate data buffering in CPDF_SyntaxParser::ReadStream().
>
> Allow sub-streams created from an IFX_SeekableReadStream to provide
> stream data without copying memory.
> The data will only reside in the top-level stream.
>
> For example:
> For file
> http://www.major-landrover.ru/upload/attachments/f/9/f96aab07dab04ae89c8a509ec1ef2b31.pdf
> (18 Mb)
>
> The memory usage is reduced by ~13 Mb.
>
> Change-Id: I2595c014d0fbe1fdd181cc04965cfd7d901c2d88
> Reviewed-on: https://pdfium-review.googlesource.com/35930
> Commit-Queue: Art Snake <art-snake@yandex-team.ru>
> Reviewed-by: dsinclair <dsinclair@chromium.org>
Change-Id: I4c4d5dcf42ff44784468ac7a7c302df509fc804d
Reviewed-on: https://pdfium-review.googlesource.com/37313
Reviewed-by: Henrique Nakashima <hnakashima@chromium.org>
Commit-Queue: Art Snake <art-snake@yandex-team.ru>
|
|
The marked content operators are BMC, BDC and EMC. In the case of
BDC, it is preceded by a direct dict or a property name.
Bug: pdfium:1118
Change-Id: I3ee736ff7be3e7d7dde55ef581af3444a325e887
Reviewed-on: https://pdfium-review.googlesource.com/37470
Reviewed-by: Lei Zhang <thestig@chromium.org>
Commit-Queue: Henrique Nakashima <hnakashima@chromium.org>
|
|
The name of the property is now stored in the CPDF_ContentMarkItem,
which will be needed to properly write back these content marks
after a change in the stream.
Bug: pdfium:1118
Change-Id: I1296f488b35ee0684efa33d17400ed22a88383a2
Reviewed-on: https://pdfium-review.googlesource.com/37370
Commit-Queue: Henrique Nakashima <hnakashima@chromium.org>
Reviewed-by: Lei Zhang <thestig@chromium.org>
|
|
Bug: pdfium:1118
Change-Id: I457a52196ee177a09d33d9e025a094888be3fb60
Reviewed-on: https://pdfium-review.googlesource.com/37610
Commit-Queue: Henrique Nakashima <hnakashima@chromium.org>
Reviewed-by: Lei Zhang <thestig@chromium.org>
|
|
One version is for a mark without a dictionary. The second is for
a mark with a direct dictionary. The third is for a mark with
indirect properties.
Bug: pdfium:1118
Change-Id: Ice0ff11d5ba4eaf2ccdf57be49b9140ba5c9b159
Reviewed-on: https://pdfium-review.googlesource.com/37550
Reviewed-by: Lei Zhang <thestig@chromium.org>
Commit-Queue: Henrique Nakashima <hnakashima@chromium.org>
|
|
Do not return size within CPDF_StreamAcc in case when read
data failed.
Also free buffers in this case.
Bug: chromium:860210
Change-Id: Ifb2a061d7c8427409b68c33f213c5c55343fb946
Reviewed-on: https://pdfium-review.googlesource.com/37310
Reviewed-by: Henrique Nakashima <hnakashima@chromium.org>
Commit-Queue: Art Snake <art-snake@yandex-team.ru>
|
|
Currently, not necessary to store the cross ref v5 obj within
CPDF_IndirectObjectHolder(CPDF_Document), because all
necessary data from the cross ref are parsed or cloned, and
owned by CPDF_Parser seperately from CPDF_IndirectObjectHolder.
Also this fix regression from commit 4ea4459e.
BUG=chromium:810768
Change-Id: I0d1a11ff027210f4f15804a69d12416838ec9815
Reviewed-on: https://pdfium-review.googlesource.com/37110
Reviewed-by: Lei Zhang <thestig@chromium.org>
Commit-Queue: Art Snake <art-snake@yandex-team.ru>
|
|
This CL creates the following new functions in the public API:
- FPDFPageObj_AddMark
- FPDFPageObjMark_SetIntParam
- FPDFPageObjMark_SetStringParam
Bug: pdfium:1037
Change-Id: Icabf3fdd8e8153b9156bab807a3708d38a9365d8
Reviewed-on: https://pdfium-review.googlesource.com/37330
Commit-Queue: Henrique Nakashima <hnakashima@chromium.org>
Reviewed-by: Lei Zhang <thestig@chromium.org>
|
|
Move the code to select what it points at to a separate function, so the
CPDF_StreamContentParser constructor only sets it once.
Change-Id: I60013e77c8f37246282f94227a4aeb17270ee23c
Reviewed-on: https://pdfium-review.googlesource.com/37450
Reviewed-by: Henrique Nakashima <hnakashima@chromium.org>
Commit-Queue: Lei Zhang <thestig@chromium.org>
|
|
This CL allows Apple to use m_GlyphIndex as a replacement for m_ExtGID
when it is invalid.
Bug: pdfium:1121
Change-Id: I49e7936201815bae5a2c8a26680fc1e542a60c43
Reviewed-on: https://pdfium-review.googlesource.com/37390
Reviewed-by: Henrique Nakashima <hnakashima@chromium.org>
Commit-Queue: Nicolás Peña Moreno <npm@chromium.org>
|
|
This avoids copying the CPDF_ContentMark every time a mark is closed.
Another benefit is that the same CPDF_ContentMarkItem vector will be
shared by page objects before and after a nested mark.
Bug: pdfium:1037
Change-Id: I6197f0b9a4693ef84da9269f86a2629aa50d8685
Reviewed-on: https://pdfium-review.googlesource.com/37190
Commit-Queue: Henrique Nakashima <hnakashima@chromium.org>
Reviewed-by: Ryan Harrison <rharrison@chromium.org>
|
|
It is currently a vector of CPDF_ContentMarkItem.
Copying MarkData whenever a content mark is opened or closed is
inefficient since each MarkData will have copies of the same
CPDF_ContentMarkItems.
This CL changes the vector inside MarkData to contains only pointers
to the CPDF_ContentMarkItems rather than copies of those items. More
importantly, this unifies the dictionaries of each content mark.
Previously, there were as many copies of those dictionaries as content
marks scope changes inside the mark with parameters.
Bug: pdfium:1037
Change-Id: Ia6f79b401d4e14ac07dbba81bbd97df965b77c94
Reviewed-on: https://pdfium-review.googlesource.com/37135
Commit-Queue: Henrique Nakashima <hnakashima@chromium.org>
Reviewed-by: Ryan Harrison <rharrison@chromium.org>
|
|
This reverts commit 77f15f7883638a4ced131d74c053af10a5970ce9.
Reason for revert: Causes crbug.com/860210
Bug: chromium:860210
Original change's description:
> Avoid duplicate data buffering in CPDF_SyntaxParser::ReadStream().
>
> Allow sub-streams created from an IFX_SeekableReadStream to provide
> stream data without copying memory.
> The data will only reside in the top-level stream.
>
> For example:
> For file
> http://www.major-landrover.ru/upload/attachments/f/9/f96aab07dab04ae89c8a509ec1ef2b31.pdf
> (18 Mb)
>
> The memory usage is reduced by ~13 Mb.
>
> Change-Id: I2595c014d0fbe1fdd181cc04965cfd7d901c2d88
> Reviewed-on: https://pdfium-review.googlesource.com/35930
> Commit-Queue: Art Snake <art-snake@yandex-team.ru>
> Reviewed-by: dsinclair <dsinclair@chromium.org>
TBR=tsepez@chromium.org,dsinclair@chromium.org,art-snake@yandex-team.ru
# Not skipping CQ checks because original CL landed > 1 day ago.
Change-Id: I947fca17052765935a952a4f25ca48f6599c4af9
Reviewed-on: https://pdfium-review.googlesource.com/37210
Reviewed-by: Henrique Nakashima <hnakashima@chromium.org>
Commit-Queue: Henrique Nakashima <hnakashima@chromium.org>
|
|
Bug: chromium:845800
Change-Id: Ib878dd991e435a76b63b662ef3d9d33c2cc61a19
Reviewed-on: https://pdfium-review.googlesource.com/37191
Commit-Queue: Ryan Harrison <rharrison@chromium.org>
Reviewed-by: Ryan Harrison <rharrison@chromium.org>
|
|
Bug: pdfium:1037
Change-Id: I94efc14ce5f8d0d407853cce025f0184b3866cc4
Reviewed-on: https://pdfium-review.googlesource.com/37134
Commit-Queue: Henrique Nakashima <hnakashima@chromium.org>
Reviewed-by: Ryan Harrison <rharrison@chromium.org>
|
|
This is called by many client to make sure CountItems() does not
crash. Moving the check to CountItems() makes HasRef() unnecessary.
Bug: pdfium:1037
Change-Id: I4f21f33a88c9aad54f0dae18a38b370c6ceaec80
Reviewed-on: https://pdfium-review.googlesource.com/37133
Commit-Queue: Henrique Nakashima <hnakashima@chromium.org>
Reviewed-by: Ryan Harrison <rharrison@chromium.org>
|
|
A RetainPtr is already used inside SharedCopyOnWrite, and the API
that CPDF_ContentMark offers is not intuitive. AddMark() and
RemoveLastMark() currently copy the MarkData.
The new API does not perform these copies, but rather leaves it to
the client code.
This is the first step to make CPDF_ContentMarkItems modifiable. As
long as they are inside a SharedCopyOnWrite, they cannot be changed.
Bug: pdfium:1037
Change-Id: I0cd6334b0b8db62070b4412f1d6d1c88bce9891f
Reviewed-on: https://pdfium-review.googlesource.com/37132
Reviewed-by: Ryan Harrison <rharrison@chromium.org>
Commit-Queue: Henrique Nakashima <hnakashima@chromium.org>
|
|
Change-Id: Ia994118f93f34b5c0c2f2f5ddfd70fe11e9ec549
Reviewed-on: https://pdfium-review.googlesource.com/37010
Reviewed-by: dsinclair <dsinclair@chromium.org>
Commit-Queue: Tom Sepez <tsepez@chromium.org>
|
|
The limit parameter is always set to 0.
Change-Id: Idf7f44e1c5a895e05ad474932d3e9df85f435e3f
Reviewed-on: https://pdfium-review.googlesource.com/36990
Commit-Queue: dsinclair <dsinclair@chromium.org>
Reviewed-by: dsinclair <dsinclair@chromium.org>
|
|
Allow sub-streams created from an IFX_SeekableReadStream to provide
stream data without copying memory.
The data will only reside in the top-level stream.
For example:
For file
http://www.major-landrover.ru/upload/attachments/f/9/f96aab07dab04ae89c8a509ec1ef2b31.pdf
(18 Mb)
The memory usage is reduced by ~13 Mb.
Change-Id: I2595c014d0fbe1fdd181cc04965cfd7d901c2d88
Reviewed-on: https://pdfium-review.googlesource.com/35930
Commit-Queue: Art Snake <art-snake@yandex-team.ru>
Reviewed-by: dsinclair <dsinclair@chromium.org>
|
|
For DocumentLoader we should do reconnect to skip non-requested blocks
on each requested offset jump.
To reduce reconnections, read stream data first, then do all checks.
Thereby the DocumentLoader will continue loading data without
reconnections.
Change-Id: I344d045e59c5de9e1a4aed0002ea122caa92f240
Reviewed-on: https://pdfium-review.googlesource.com/13450
Commit-Queue: Art Snake <art-snake@yandex-team.ru>
Reviewed-by: Lei Zhang <thestig@chromium.org>
|
|
Change-Id: Ide081e462c83a5a209a2e6462dd12b298993f36f
Reviewed-on: https://pdfium-review.googlesource.com/36850
Commit-Queue: Tom Sepez <tsepez@chromium.org>
Reviewed-by: dsinclair <dsinclair@chromium.org>
|
|
Change-Id: Ib9b30f7f4e1c41b0e2e2c1757252736599055c96
Reviewed-on: https://pdfium-review.googlesource.com/36870
Reviewed-by: Henrique Nakashima <hnakashima@chromium.org>
Commit-Queue: Lei Zhang <thestig@chromium.org>
|
|
Change-Id: I711508cdffd9756837657390d73b88c2d8c62db5
Reviewed-on: https://pdfium-review.googlesource.com/36891
Commit-Queue: dsinclair <dsinclair@chromium.org>
Reviewed-by: Art Snake <art-snake@yandex-team.ru>
Reviewed-by: dsinclair <dsinclair@chromium.org>
|
|
Change-Id: I293730ea5981ba8e2dca7a522b9036fa62d7cd35
Reviewed-on: https://pdfium-review.googlesource.com/36890
Commit-Queue: dsinclair <dsinclair@chromium.org>
Reviewed-by: Art Snake <art-snake@yandex-team.ru>
Reviewed-by: dsinclair <dsinclair@chromium.org>
|
|
This enables more complicated cleanup when an observed object
is destroyed. Use it to make documents observable and to allow
the CPDF_Avail to cleanup without the need for intermediate class.
Change-Id: I3a8e758b7ff542e0a58710eff1ac8017205cbd45
Reviewed-on: https://pdfium-review.googlesource.com/36373
Reviewed-by: Lei Zhang <thestig@chromium.org>
Commit-Queue: Tom Sepez <tsepez@chromium.org>
|
|
Fix some {} along the way.
Change-Id: I5277c03328b63e0cead058fc07dc65311d7b97b0
Reviewed-on: https://pdfium-review.googlesource.com/36791
Commit-Queue: Tom Sepez <tsepez@chromium.org>
Reviewed-by: Lei Zhang <thestig@chromium.org>
|
|
Change-Id: Ifeaac7141bd377daa9cf657149937be22b2aa48a
Reviewed-on: https://pdfium-review.googlesource.com/36730
Reviewed-by: Tom Sepez <tsepez@chromium.org>
Commit-Queue: Lei Zhang <thestig@chromium.org>
|
|
Change-Id: Ifbce02a65b68b0526866d5a08a9edf58bd89e434
Reviewed-on: https://pdfium-review.googlesource.com/36792
Reviewed-by: Lei Zhang <thestig@chromium.org>
Commit-Queue: Tom Sepez <tsepez@chromium.org>
|
|
These appear in compile-time const data. Adding the comment makes
it easier to see what work remains when using grep.
Change-Id: Ibb5fe920dc9fc99dd4c866f9ddf800a58f6a67a8
Reviewed-on: https://pdfium-review.googlesource.com/36690
Reviewed-by: Lei Zhang <thestig@chromium.org>
Commit-Queue: Tom Sepez <tsepez@chromium.org>
|
|
Many of the FX_Alloc's that have not been converted to std::vector
are using FX_Alloc2D and the safe math it performs under the covers.
Make an equivalent function for returning a vector to avoid burdening
callers with the safe math equivalents.
Use it in one place.
Change-Id: Ie4a280351b7370b755f2a1928f8b2d84fe007c03
Reviewed-on: https://pdfium-review.googlesource.com/36770
Commit-Queue: Tom Sepez <tsepez@chromium.org>
Reviewed-by: Lei Zhang <thestig@chromium.org>
|
|
Change-Id: I88d3e86a1dad75ef9c6bfb3401af6606479031a7
Reviewed-on: https://pdfium-review.googlesource.com/36634
Commit-Queue: Lei Zhang <thestig@chromium.org>
Reviewed-by: Henrique Nakashima <hnakashima@chromium.org>
|
|
Its return value contains the same data.
Change-Id: I2bf4e72faf978e5d491bec573babc8099cda4e5a
Reviewed-on: https://pdfium-review.googlesource.com/36633
Commit-Queue: Lei Zhang <thestig@chromium.org>
Reviewed-by: Henrique Nakashima <hnakashima@chromium.org>
|
|
Make members const and private. Fix nits.
Change-Id: I945bc26438f8fbd6904dc1b15513ab9e51170dc7
Reviewed-on: https://pdfium-review.googlesource.com/36631
Commit-Queue: Lei Zhang <thestig@chromium.org>
Reviewed-by: Henrique Nakashima <hnakashima@chromium.org>
|
|
Implement CPDF_ColorSpace::IsNormal() and check it when rendering. While
IsNormal() is trivial for most colorspaces, it needs to be implemented
separately for ICC colorspaces.
This fixes a rendering regression from commit 1c0de38c.
BUG=chromium:847346
Change-Id: Iaafed3f8ee40b26ac2cbfbdf2251407f7935311b
Reviewed-on: https://pdfium-review.googlesource.com/36571
Reviewed-by: Henrique Nakashima <hnakashima@chromium.org>
Commit-Queue: Lei Zhang <thestig@chromium.org>
|
|
Merge page info data from Hints Table into CPDF_HintsTable::PageInfo class.
Change-Id: I468996346ee153e3fa8ada6a83770614362d1b92
Reviewed-on: https://pdfium-review.googlesource.com/15813
Commit-Queue: Art Snake <art-snake@yandex-team.ru>
Reviewed-by: Lei Zhang <thestig@chromium.org>
|
|
Change-Id: I0f2bf1cb44b4cba872a719f0a75d8776f413812c
Reviewed-on: https://pdfium-review.googlesource.com/36250
Commit-Queue: dsinclair <dsinclair@chromium.org>
Reviewed-by: dsinclair <dsinclair@chromium.org>
|
|
Change-Id: I9ded1664564c330132f43047293e18696d77fc7d
Reviewed-on: https://pdfium-review.googlesource.com/36310
Commit-Queue: Art Snake <art-snake@yandex-team.ru>
Reviewed-by: Tom Sepez <tsepez@chromium.org>
|
|
No longer needed after commit 20eca1e3
Change-Id: Ica4f67d2a2df760ebf9fd507283791271ad407cd
Reviewed-on: https://pdfium-review.googlesource.com/36351
Commit-Queue: Art Snake <art-snake@yandex-team.ru>
Reviewed-by: Lei Zhang <thestig@chromium.org>
|
|
Commit 0145b89a removed the only caller.
Change-Id: Ib3b7eaa0bc8be986f7d290f1efaea519d68daf6b
Reviewed-on: https://pdfium-review.googlesource.com/36251
Reviewed-by: Art Snake <art-snake@yandex-team.ru>
Commit-Queue: Lei Zhang <thestig@chromium.org>
|
|
Kinda like reaching a commit point, makes going forward more useful.
Change-Id: I7695b6e627d4cd8ed2bccb667d0cabd7f42c7b1c
Reviewed-on: https://pdfium-review.googlesource.com/35970
Reviewed-by: Lei Zhang <thestig@chromium.org>
Commit-Queue: Tom Sepez <tsepez@chromium.org>
|
|
Improve CPDF_Document interface.
Fix relationship between CPDF_Document and CPDF_Parser.
This CL changes CPDF_Document to internally create the CPDF_Parser
and removes the need for the CPDF_Parser to know about the CPDF_Document.
Change-Id: Iec7aef19575c90f30b9a6c919dfd4f4417e4caf2
Reviewed-on: https://pdfium-review.googlesource.com/35630
Commit-Queue: Art Snake <art-snake@yandex-team.ru>
Reviewed-by: dsinclair <dsinclair@chromium.org>
|
|
Change-Id: I5ac61ab323adb5eec2de8660064fff95ee877b5e
Reviewed-on: https://pdfium-review.googlesource.com/35432
Reviewed-by: dsinclair <dsinclair@chromium.org>
Commit-Queue: Art Snake <art-snake@yandex-team.ru>
|
|
Change-Id: I558ac625d842d1b3d9dfdaf4d7661d4c02c6244a
Reviewed-on: https://pdfium-review.googlesource.com/36133
Reviewed-by: dsinclair <dsinclair@chromium.org>
Commit-Queue: Tom Sepez <tsepez@chromium.org>
|
|
Change-Id: I5dc72c48ffd50836dd8c6a21e23568bc8703ee5a
Reviewed-on: https://pdfium-review.googlesource.com/36132
Reviewed-by: dsinclair <dsinclair@chromium.org>
Commit-Queue: Tom Sepez <tsepez@chromium.org>
|
|
Change-Id: Id6551957405605cf273d5d100b6db9c27ecc6e7c
Reviewed-on: https://pdfium-review.googlesource.com/36131
Reviewed-by: dsinclair <dsinclair@chromium.org>
Commit-Queue: Tom Sepez <tsepez@chromium.org>
|
|
Required moving some sizes to .h file for default construction
of spans from c-style arrays.
Change-Id: I45c42103f3575bc83e57a085ad4e8f16698468d3
Reviewed-on: https://pdfium-review.googlesource.com/36190
Reviewed-by: dsinclair <dsinclair@chromium.org>
Commit-Queue: Tom Sepez <tsepez@chromium.org>
|