aboutsummaryrefslogtreecommitdiffhomepage
path: root/bench/PDFBench.cpp
Commit message (Collapse)AuthorAge
* Mark overridden destructors with 'override' and remove 'virtual'Gravatar Brian Salomon2017-03-22
| | | | | | | | | This silences a new warning in clang 5.0 Change-Id: Ieb5b75a6ffed60107c3fd16075d2ecfd515b55e8 Reviewed-on: https://skia-review.googlesource.com/10006 Commit-Queue: Brian Salomon <bsalomon@google.com> Reviewed-by: Mike Klein <mtklein@chromium.org>
* test (and fix) clip_restriction in canvasGravatar Mike Reed2017-03-22
| | | | | | | | | BUG=skia: Change-Id: I86d25d0fd82be35d01471fba59f77b360be5373c Reviewed-on: https://skia-review.googlesource.com/9995 Reviewed-by: Derek Sollenberger <djsollen@google.com> Commit-Queue: Derek Sollenberger <djsollen@google.com>
* BUILD.gn: skia_enable_pdfGravatar Hal Canary2017-01-03
| | | | | | | | | BUG=skia: Change-Id: Icf616bec73e81aad97815b519566ff5b9db611e3 Reviewed-on: https://skia-review.googlesource.com/6495 Commit-Queue: Hal Canary <halcanary@google.com> Reviewed-by: Mike Klein <mtklein@chromium.org>
* Remove SkAutoTDelete.Gravatar Ben Wagner2016-11-03
| | | | | | | | | Replace with std::unique_ptr. Change-Id: I5806cfbb30515fcb20e5e66ce13fb5f3b8728176 Reviewed-on: https://skia-review.googlesource.com/4381 Commit-Queue: Ben Wagner <bungeman@google.com> Reviewed-by: Mike Klein <mtklein@chromium.org>
* SkPDF: in-place font subsettingGravatar halcanary2016-08-18
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Motivation: gross code simplification, also no bitset lookups at draw time. SkPDFFont owns its glyph useage bitset. SkPDFSubstituteMap goes away. SkPDFObject interface is simplified. SkPDFDocument tracks font usage (as hash set), not glyph usage. SkPDFFont gets a simpler constructor. SkPDFFont has first and last glyph set in constructor, not adjusted later. SkPDFFont implementations are simplified. SkPDFGlyphSet is replaced with simple SkBitSet. SkPDFFont sizes its SkBitSets based on glyph count. SkPDFGlyphSetMap goes away. SkBitSet is now non-copyable. SkBitSet now how utility methods to match old SkPDFGlyphSet. GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2253283004 CQ_INCLUDE_TRYBOTS=master.client.skia:Test-Win-MSVC-GCE-CPU-AVX2-x86_64-Release-GDI-Trybot,Test-Win-MSVC-GCE-CPU-AVX2-x86_64-Debug-GDI-Trybot Review-Url: https://codereview.chromium.org/2253283004
* SkPDF: PDFStream has-a not is-a PDFDictGravatar halcanary2016-07-29
| | | | | | | | | | | | | | | Motivation: SkPDFStream and SkPDFSharedStream now work the same. Also: - move SkPDFStream into SkPDFTypes (it's a fundamental PDF type). - minor refactor of SkPDFSharedStream - SkPDFSharedStream takes unique_ptr to represent ownership BUG=skia: GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2190883003 Review-Url: https://codereview.chromium.org/2190883003
* SkPdf: smaller color serializationGravatar halcanary2016-07-15
| | | | | | | | | | | | | | SkPDFUtils now has a special function (SkPDFUtils::AppendColorComponent) just for writing out (color/255) as a decimal with three digits of precision. SkPDFUnion now has a type to represent a color component. It holds a utint_8, but calls into AppendColorComponent to serialize. Added a unit test that tests all possible input values. GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2151863003 Review-Url: https://codereview.chromium.org/2151863003
* SkPDF: alloc less memory for stringsGravatar halcanary2016-06-23
| | | | | | | | | | | | | | | | | before: micros bench 250.98 WritePDFText nonrendering after: micros bench 107.10 WritePDFText nonrendering Also, be slightly more space-efficient in encoding strings. Also, add a bench. GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2099463002 Review-Url: https://codereview.chromium.org/2099463002
* 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
* SkWStream::writeText inlined.Gravatar halcanary2016-04-11
| | | | | | | | | | | | | | | | | | | | | | | | | | Motivation: This function is used throughout SkPDF. Note that the compiler can usually inline the result of strlen() for literal strings. Before: out/Release/nanobench -m WStreamWriteText -q Timer overhead: 24.2ns ! -> high variance, ? -> moderate variance micros bench 6.10 WStreamWriteText nonrendering After: out/Release/nanobench -m WStreamWriteText -q Timer overhead: 23.9ns ! -> high variance, ? -> moderate variance micros bench 2.51 WStreamWriteText nonrendering PDF runtime change: -0.8% ±0.04%. GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1844343004 Review URL: https://codereview.chromium.org/1844343004
* 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
* move setshader to sk_sp, re-using SK_SUPPORT_LEGACY_CREATESHADER_PTRGravatar reed2016-03-25
| | | | | | | BUG=skia: GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1829303002 Review URL: https://codereview.chromium.org/1829303002
* 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: add drop() virtual to release resources early.Gravatar halcanary2016-03-21
| | | | | | | | | | | | | | | | | | | Call drop() after calling emitObject() on top-level objects. In Debug mode, assert that each object is emited exactly once by asserting that emitObject is never called after drop(). Same for addResources(). To make sure that top level objects don't get deleted prematurely, SkPDFObjNumMap takes a reference. Motivation: save RAM. Allow even earlier serialization with later changes. Also: Switch some SkTDArrays to SkTArrays. BUG=skia:5087 GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1790023003 Review URL: https://codereview.chromium.org/1790023003
* update callsites for Make image factoriesGravatar reed2016-03-17
| | | | | | | | | | | not forced yet, as we still have the build-guard. waiting on chrome CL BUG=skia: GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1810813003 TBR= Review URL: https://codereview.chromium.org/1810813003
* Add SkSpecialImage::extractSubset & NewFromPixmapGravatar robertphillips2016-03-17
| | | | | | | | | | | | This is calved off of: https://codereview.chromium.org/1785643003/ (Switch SkBlurImageFilter over to new onFilterImage interface) This now relies on: https://codereview.chromium.org/1813483002/ (ImagePixelLocker now manually allocates SkPixmap) to clean up the uses of SkAutoPixmapStorage in Chromium GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1787883002 Committed: https://skia.googlesource.com/skia/+/250581493a0859987e482810879e85e5ac2dc002 Review URL: https://codereview.chromium.org/1787883002
* Revert of Add SkSpecialImage::extractSubset & NewFromPixmap (patchset #5 ↵Gravatar robertphillips2016-03-16
| | | | | | | | | | | | | | | | | | | | | | | | id:80001 of https://codereview.chromium.org/1787883002/ ) Reason for revert: Need to wean ImagePixelLocker.h off of SkAutoPixmapStorage :( Original issue's description: > Add SkSpecialImage::extractSubset & NewFromPixmap > > This is calved off of: https://codereview.chromium.org/1785643003/ (Switch SkBlurImageFilter over to new onFilterImage interface) > > GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1787883002 > > Committed: https://skia.googlesource.com/skia/+/250581493a0859987e482810879e85e5ac2dc002 TBR=bsalomon@google.com,reed@google.com # Skipping CQ checks because original CL landed less than 1 days ago. NOPRESUBMIT=true NOTREECHECKS=true NOTRY=true Review URL: https://codereview.chromium.org/1808833002
* Add SkSpecialImage::extractSubset & NewFromPixmapGravatar robertphillips2016-03-16
| | | | | | | | This is calved off of: https://codereview.chromium.org/1785643003/ (Switch SkBlurImageFilter over to new onFilterImage interface) GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1787883002 Review URL: https://codereview.chromium.org/1787883002
* SkPDF/Bench becnchmark new SkPDFUtils::FloatToDecimal function.Gravatar halcanary2016-03-09
| | | | | | GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1735063004 Review URL: https://codereview.chromium.org/1735063004
* SkPDF/Bench: add bench for SkPDFSharedStream (deflate)Gravatar halcanary2016-02-24
| | | | | | | | | Also, simplify gyp. BUG=skia:5009 GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1730833003 Review URL: https://codereview.chromium.org/1730833003
* SkPDF/Bench: add bench for SkPDFCreateBitmapObjectGravatar halcanary2016-02-24
BUG=skia:5009 Review URL: https://codereview.chromium.org/1729943003