aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/pdf/SkPDFDocument.h
Commit message (Collapse)AuthorAge
* SkPDF: Glyph Useage Map improvementsGravatar halcanary2016-06-30
| | | | | | | | | | | | | | | | | | | | Instead of having a fFontGlyphUsage on each device and one on each document, just have the one on the document, and never merge. Make fGlyphUsage accesible on SkPDFDocument. Remove SkPDFGlyphSetMap::merge, ::reset, and SkPDFGlyphSet::merge. SkPDFGlyphSetMap has an TArray of SkPDFGlyphSet, not TDArray of SkPDFGlyphSet pointers. SkPDFGlyphSet and SkPDFBitset get move constructors. All tests produce exactly identical output PDFs. BUG=skia:5434 GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2112943002 Review-Url: https://codereview.chromium.org/2112943002
* SkDocument/PDF: new APIGravatar halcanary2016-04-27
| | | | | | | | | | has a pdf/a switch. sets metadata in factory. BUG=skia: GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1916093002 Review URL: https://codereview.chromium.org/1916093002
* SkPDF: PDF/A runtime switchGravatar halcanary2016-04-22
| | | | | | | | | | | | | TODO: remove gyp variable and modify API in SkDocument.h SkMD5 now moved into core as pdf depends on it now. BUG=skia:3110 GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1891873002 Committed: https://skia.googlesource.com/skia/+/570f18b43417d73c3fbd113cc0b4258e08b14c82 Review URL: https://codereview.chromium.org/1891873002
* Revert of SkPDF: PDF/A runtime switch (patchset #1 id:100001 of ↵Gravatar halcanary2016-04-15
| | | | | | | | | | | | | | | | | | | | | | | | | | https://codereview.chromium.org/1891873002/ ) Reason for revert: breaking something. Original issue's description: > SkPDF: PDF/A runtime switch > > TODO: remove gyp variable and modify API in SkDocument.h > > BUG=skia:3110 > GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1891873002 > > Committed: https://skia.googlesource.com/skia/+/570f18b43417d73c3fbd113cc0b4258e08b14c82 TBR=tomhudson@google.com # Skipping CQ checks because original CL landed less than 1 days ago. NOPRESUBMIT=true NOTREECHECKS=true NOTRY=true BUG=skia:3110 Review URL: https://codereview.chromium.org/1892203002
* SkPDF: PDF/A runtime switchGravatar halcanary2016-04-15
| | | | | | | | | TODO: remove gyp variable and modify API in SkDocument.h BUG=skia:3110 GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1891873002 Review URL: https://codereview.chromium.org/1891873002
* SkPDF: fix PDF/AGravatar halcanary2016-04-07
| | | | | | | | | TODO: get a bot to start testing this. BUG=skia: GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1864163004 Review URL: https://codereview.chromium.org/1864163004
* SkPDF: draw{Image,Bitmap} always serializes earlyGravatar halcanary2016-03-25
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Before this change, the PDFCanon held a map from BitmapKeys to SkImages for de-duping bitmaps. Even if the PDFDocument serialized images early, the Canon still held a ref to that image inside the map. With this change, the Canon holds a single map from BitmapKeys to PDFObjects. Now, Images are only held by the PDFObject, which the document serializes and drops early. This change also: - Moves SkBitmapKey into its own header (for possible reuse); it now can operate with images as well as bitmaps. - Creates SkImageBitmap, which wraps a pointer to a bitmap or an image and abstracts out some common tasks so that drawBitmap and drawImage behave the same. - Modifies SkPDFCreateBitmapObject to take and return a sk_sp<T>, not a T*. - Refactors SkPDFDevice::internalDrawImage to use bitmaps or images (via a SkImageBitmap). - Turns on pre-serialization of all images. BUG=skia:5087 GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1829693002 Review URL: https://codereview.chromium.org/1829693002
* SkPDF: speed up SkPDFShader generation.Gravatar halcanary2016-03-25
| | | | | | | | | | | | | | | | Stop using SkString::append() when SkDynamicMemoryWStream works better. Also add a bench to prove that this speeds things up: before: micros bench 59.33 ? PDFShader nonrendering after: micros bench 34.55 ? PDFShader nonrendering GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1833793002 Review URL: https://codereview.chromium.org/1833793002
* SkPDF: Hold page objects, not SkPDFDevices.Gravatar halcanary2016-03-23
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Page Contents: serialize early, at endPage() SkPDFDocument: Rather than holding all SkPDFDevices until onClose(), store fGlyphUseage and array of pages objects. perform_font_subsetting function removed: First half moved to onEndPage. Second half moved to onClose. create_pdf_page function removed: Merged into onEndPage. generate_page_tree: Refactored to use SkTArray<sk_sp<T>> over SkTDArray<T*>. (the former is explicit about ownership, the latter is unclear.) No longer populates a structure of objects to be dumped, unnecessary since dump is always called after serialization. Takes ownership of fPages and returns root of tree-ified version. Less reference churn. SkPDFGlyphSetMap: use new-style iterator. BUG=skia:5087 GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1823683005 Review URL: https://codereview.chromium.org/1823683005
* SkPDF: SkPDFDevice has ptr to SkPDFDocumentGravatar halcanary2016-03-21
| | | | | | | | | This is necessary for pre-serialization of images. BUG=skia:5087 GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1802963002 Review URL: https://codereview.chromium.org/1802963002
* SkPDF: SkPDFDocument reorganized so that some objects can be serialized early.Gravatar halcanary2016-03-21
| | | | | | | | | No change in output. BUG=skia:5087 GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1802033003 Review URL: https://codereview.chromium.org/1802033003
* SkPDF: move all pdf sources into src/pdfGravatar halcanary2016-03-12
| | | | | | | | | | | also, consolidate XPS backend into src/xps remove from include/ almost always a good thing. TBR=reed@google.com GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1781773002 CQ_EXTRA_TRYBOTS=client.skia.compile:Build-Ubuntu-GCC-x86_64-Release-CMake-Trybot,Build-Mac-Clang-x86_64-Release-CMake-Trybot Review URL: https://codereview.chromium.org/1781773002
* SkPDF: merge skdocument_pdf and skpdfdocumentGravatar halcanary2015-03-25
| | | | | | BUG=skia:3585 Review URL: https://codereview.chromium.org/1034793002
* SkPDF: skpdfdocument and skpdfpage use skpdfdevice in a const wayGravatar halcanary2015-03-25
| | | | | | BUG=skia:3585 Review URL: https://codereview.chromium.org/1035513003
* SkPDF: add canon assert before adding code that might break itGravatar halcanary2015-03-25
| | | | | | | | | | | Motivation: We can write subsets (by page) of pdf documents (but this in't yet exposed in the public API), but it is a bad idea to mix pages from multiple documents (de-duping will break). This assert verifies that we don't do this by accident in the future. BUG=skia:3585 Review URL: https://codereview.chromium.org/1037573005
* SkPDF: unclass skpdfdocumentGravatar halcanary2015-03-25
| | | | | | BUG=skia:3585 Review URL: https://codereview.chromium.org/1030193002
* SkPDF: clean up skpdfdocument, add static functionsGravatar halcanary2015-03-25
| | | | | | | | | | | | | Add SkPDFDocument::EmitPDF and SkPDFDocument::GetCountOfFontTypes Also, make SkPDFDocument::appendPage return void, not bool. Motivation: These static functions can be used to print subsets of a pdf document (functionality to be added in a later CL). BUG=skia:3585 Review URL: https://codereview.chromium.org/1036853002
* SkPDF refactor skpdfdocumentGravatar halcanary2015-03-25
| | | | | | | | | | | | | | | | | | | | | Most fields removed, made local to emitPDF function (since we never emit twice). Variables made into stack variables or auto-unrefed. we hold devices, not pages. addResourcesToCatalog inlined unused setPage function removed. deprecated getCountOfFontTypes function removed private functions removed BUG=skia:3585 Review URL: https://codereview.chromium.org/1034583002
* SkPDF: remove SK_API on no-longer-public functions.Gravatar halcanary2015-02-25
| | | | | | CQ_INCLUDE_TRYBOTS=client.skia:Mac Builder-Trybot,Linux Builder-Trybot,Win Builder-Trybot Review URL: https://codereview.chromium.org/953053002
* PDF: why do we have flags no one uses (or can use)?Gravatar mtklein2015-02-19
| | | | | | BUG=skia: Review URL: https://codereview.chromium.org/936403002
* move SkPDFD*.h from include to srcGravatar halcanary2015-02-19
| | | | | | CQ_INCLUDE_TRYBOTS=client.skia:Mac Builder-Trybot,Linux Builder-Trybot,Win Builder-Trybot Review URL: https://codereview.chromium.org/727343002
* revert buildbot breakerGravatar caryclark2015-01-07
| | | | | | | | | | | | Hals's change broke a buildbot has shown here http://build.chromium.org/p/client.skia/builders/Test-Win7-ShuttleA-HD2000-x86-Release/builds/510/steps/gm/logs/stdio Got unknown flag "--useDocumentInsteadOfDevice". Exiting. TBR=halcanary Review URL: https://codereview.chromium.org/832183006
* Remove SkPDFDocument and SkPDFDevice from the public headers.Gravatar halcanary2015-01-06
| | | | | | Committed: https://skia.googlesource.com/skia/+/8b1f761365df6652ea9304b6572d2dd91917b9aa Review URL: https://codereview.chromium.org/841533002
* Revert "Remove SkPDFDocument and SkPDFDevice from the public headers."Gravatar reed2015-01-06
| | | | | | | | | | | This reverts commit 8b1f761365df6652ea9304b6572d2dd91917b9aa. BUG=skia: TBR= NOTRY=True NOTREECHECKS=True Review URL: https://codereview.chromium.org/839603002
* Remove SkPDFDocument and SkPDFDevice from the public headers.Gravatar halcanary2015-01-06
| | | | Review URL: https://codereview.chromium.org/841533002
* Revert "move SkPDFD*.h from include to src"Gravatar Greg Humphreys2014-11-17
| | | | | | | | | | This reverts commit 693024300f79ff3fb497ddee1043b609ddf521a4. was breaking canary build BUG=skia: Review URL: https://codereview.chromium.org/731173002
* move SkPDFD*.h from include to srcGravatar halcanary2014-11-17
BUG=278148 Review URL: https://codereview.chromium.org/727343002