aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/pdf/SkPDFDevice.cpp
Commit message (Collapse)AuthorAge
* SkUTFGravatar Hal Canary2018-07-31
| | | | | | | | | | | | | | | | | | | | | Create new header and namespace, `SkUTF` where we are putting all of our robust, well documented UTF-8, UTF-16, and UTF-32 functions: `SkUTF::{Count,Next,To}UTF{8,16,32}()`. SkUTF.h and SkUTF.cpp do not depend on the rest of Skia and are suitable for re-use in other modules. Some of the old UTF-{8,16} functions still live in SkUtils.h; their use will be phased out in future CLs. Also added more unit testing and cleaned up old tests. Removed functions that were unused outside of tests or used only once. Change-Id: Iaa59b8705abccf9c4ba082f855da368a0bad8380 Reviewed-on: https://skia-review.googlesource.com/143306 Reviewed-by: Ben Wagner <bungeman@google.com> Commit-Queue: Hal Canary <halcanary@google.com>
* Hide SkTextBlob::GlyphPositioning from public APIGravatar Florin Malita2018-07-27
| | | | | | | | | | | | | Make private, add corresponding SkTextBlobRunIterator enum. Also move SkTextBlobRunIterator to SkTextBlobPriv.h. Change-Id: If3e0beabb0e8484b1ac73c6fc0827e920ca1f93b Reviewed-on: https://skia-review.googlesource.com/142501 Commit-Queue: Florin Malita <fmalita@chromium.org> Reviewed-by: Mike Reed <reed@google.com> Reviewed-by: Herb Derby <herb@google.com> Reviewed-by: Cary Clark <caryclark@google.com>
* const all the thingsGravatar Herb Derby2018-07-27
| | | | | | | | | | | Having the glyph run list be const as it passes through the stack means that future change can't be introduced in the device code that changes behavior. Try to force all text changes into the SkGylphRun system. Change-Id: I9412bc094c7adb8554887c725a6264af306e1d42 Reviewed-on: https://skia-review.googlesource.com/143702 Commit-Queue: Herb Derby <herb@google.com> Reviewed-by: Ben Wagner <bungeman@google.com>
* SkPDF: only draw text with SkglyphRunsGravatar Hal Canary2018-07-23
| | | | | | | Change-Id: I24e79c73a9c65a5d6a974bf52b0d0aee21be07db Reviewed-on: https://skia-review.googlesource.com/142695 Commit-Queue: Hal Canary <halcanary@google.com> Reviewed-by: Herb Derby <herb@google.com>
* Convert PDF device to use glyph runs listsGravatar Herb Derby2018-07-19
| | | | | | | Change-Id: I3d98aadead463a42dd8338c63593be22acb6dd68 Reviewed-on: https://skia-review.googlesource.com/142502 Reviewed-by: Hal Canary <halcanary@google.com> Commit-Queue: Herb Derby <herb@google.com>
* Device interface uses glyph run listGravatar Herb Derby2018-07-16
| | | | | | | | | | | | | Have devices just treat all runs as drawPosText except for SkGPUDevice and SkRemoteGlyphCache. Those two just pass the blob to the old code. This way the change over from blobs to run lists can happen in smaller steps. Change-Id: I3407bffeafe7fbd1c369f6b3c3db8d64b4b6c3b1 Reviewed-on: https://skia-review.googlesource.com/141300 Reviewed-by: Ben Wagner <bungeman@google.com> Commit-Queue: Herb Derby <herb@google.com>
* Remove SkDrawFilter.Gravatar Ben Wagner2018-07-12
| | | | | | | | | Change-Id: I0204a9522e828c87bb7c6c20ae34ce51161442af Reviewed-on: https://skia-review.googlesource.com/137895 Reviewed-by: Herb Derby <herb@google.com> Reviewed-by: Ben Wagner <bungeman@google.com> Reviewed-by: Mike Reed <reed@google.com> Commit-Queue: Ben Wagner <bungeman@google.com>
* Add color type to the image filter DAG's OutputPropertiesGravatar Brian Osman2018-07-06
| | | | | | | | | | | | Don't try to guess the pixel config to use for intermediates. Instead, just make the intermediates in the same color type (and space) as the final destination. This removes some no-longer-correct logic that was using sRGB configs, resulting in linear blending and precision loss. Change-Id: I627c47193a9f2889c3dc121170ff3e7d5d315fa0 Reviewed-on: https://skia-review.googlesource.com/139547 Reviewed-by: Mike Klein <mtklein@google.com> Commit-Queue: Brian Osman <brianosman@google.com>
* skeletal animation support added to API and software backendGravatar Ruiqi Mao2018-06-29
| | | | | | | | | | | | SkCanvas::drawVertices now supports overloads that take an array of bone deformation matrices. SkVertices::MakeCopy and SkVertices::Builder now support two additional optional attributes, boneIndices and boneWeights. Bug: skia: Change-Id: I30a3b11691e7cdb13924907cc1401ff86d127aea Reviewed-on: https://skia-review.googlesource.com/137221 Reviewed-by: Brian Osman <brianosman@google.com> Reviewed-by: Robert Phillips <robertphillips@google.com> Commit-Queue: Ruiqi Mao <ruiqimao@google.com>
* Revert "Remove drawTextBlob from device use drawGlyphRunList"Gravatar Robert Phillips2018-06-28
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This reverts commit e2e52e46ca63540d429656baeee48fd3a402be26. Reason for revert: See if this is blocking the Chrome roll Original change's description: > Remove drawTextBlob from device use drawGlyphRunList > > Convert all backends to use GlyphRunList instead of > text blobs. If the device did not originally implement > drawTextBlob it will be simulated by drawPosText on the > device. > > Other changes: > Change to using an origin from absolulte positioning. The GPU > code uses origin change to update blobs under translation. > > Change cluster to use const uint32_t instead of just > uint32_t. > > Add SkPaint to runs. > > The draw filter is hosted up to the canavas level and applied there. > > Change-Id: Ib105b6bd26b67db55f1c954e37c79fbdcaa9d4a2 > Reviewed-on: https://skia-review.googlesource.com/137224 > Reviewed-by: Herb Derby <herb@google.com> > Reviewed-by: Khusal Sagar <khushalsagar@chromium.org> > Reviewed-by: Hal Canary <halcanary@google.com> > Reviewed-by: Jim Van Verth <jvanverth@google.com> > Commit-Queue: Herb Derby <herb@google.com> TBR=jvanverth@google.com,halcanary@google.com,bungeman@google.com,herb@google.com,reed@google.com,khushalsagar@chromium.org,khushalsagar@google.com Change-Id: I4d93a534990c89deee7d3aaa00ec40d47e0d2ece No-Presubmit: true No-Tree-Checks: true No-Try: true Reviewed-on: https://skia-review.googlesource.com/138120 Reviewed-by: Robert Phillips <robertphillips@google.com> Commit-Queue: Robert Phillips <robertphillips@google.com>
* Remove drawTextBlob from device use drawGlyphRunListGravatar Herb Derby2018-06-28
| | | | | | | | | | | | | | | | | | | | | | | | | | Convert all backends to use GlyphRunList instead of text blobs. If the device did not originally implement drawTextBlob it will be simulated by drawPosText on the device. Other changes: Change to using an origin from absolulte positioning. The GPU code uses origin change to update blobs under translation. Change cluster to use const uint32_t instead of just uint32_t. Add SkPaint to runs. The draw filter is hosted up to the canavas level and applied there. Change-Id: Ib105b6bd26b67db55f1c954e37c79fbdcaa9d4a2 Reviewed-on: https://skia-review.googlesource.com/137224 Reviewed-by: Herb Derby <herb@google.com> Reviewed-by: Khusal Sagar <khushalsagar@chromium.org> Reviewed-by: Hal Canary <halcanary@google.com> Reviewed-by: Jim Van Verth <jvanverth@google.com> Commit-Queue: Herb Derby <herb@google.com>
* Use x text skew to position textGravatar Herb Derby2018-06-18
| | | | | | | | | | | | This CL fixes b/110225902. The PDF device was not taking x skew into account when calculating positions. Change-Id: I659dfeba0d31c8e1192cd3538b550c48cf5a835c Reviewed-on: https://skia-review.googlesource.com/135569 Reviewed-by: Hal Canary <halcanary@google.com> Commit-Queue: Herb Derby <herb@google.com>
* SkPDF: Annotations should be indirect objectsGravatar Hal Canary2018-06-15
| | | | | | | | | Bug: skia:8068 Change-Id: Ib761caa06e6dc2ce37fcd23bd662b13dbb5623db Reviewed-on: https://skia-review.googlesource.com/135300 Auto-Submit: Hal Canary <halcanary@google.com> Commit-Queue: Ben Wagner <bungeman@google.com> Reviewed-by: Ben Wagner <bungeman@google.com>
* Revert "Revert "SkTypes: extract SkTo""Gravatar Hal Canary2018-06-14
| | | | | | | | | | | | | | | | This reverts commit fdcfb8b7c23fbf18f872d2c31d27978235033876. > Original change's description: > > SkTypes: extract SkTo > > > > Change-Id: I8de790d5013db2105ad885fa2683303d7c250b09 > > Reviewed-on: https://skia-review.googlesource.com/133620 > > Reviewed-by: Mike Klein <mtklein@google.com> Change-Id: Ida74fbc5c21248a724a5edbf9fae18a33bcb23aa Reviewed-on: https://skia-review.googlesource.com/134506 Reviewed-by: Mike Klein <mtklein@google.com> Commit-Queue: Hal Canary <halcanary@google.com>
* Revert "SkTypes: extract SkTo"Gravatar Hal Canary2018-06-13
| | | | | | | | | | | | | | | | | | | | | | | This reverts commit 2a2f67592602b18527bc3fd449132d420cd5b62e. Reason for revert: this appears to be what is holding up the Chrome roll. Original change's description: > SkTypes: extract SkTo > > Change-Id: I8de790d5013db2105ad885fa2683303d7c250b09 > Reviewed-on: https://skia-review.googlesource.com/133620 > Reviewed-by: Mike Klein <mtklein@google.com> TBR=mtklein@google.com,halcanary@google.com No-Presubmit: true No-Tree-Checks: true No-Try: true Change-Id: Iafd738aedfb679a23c061a51afe4b98a8d4cdfae Reviewed-on: https://skia-review.googlesource.com/134504 Reviewed-by: Hal Canary <halcanary@google.com> Commit-Queue: Hal Canary <halcanary@google.com>
* SkTypes: extract SkToGravatar Hal Canary2018-06-12
| | | | | | Change-Id: I8de790d5013db2105ad885fa2683303d7c250b09 Reviewed-on: https://skia-review.googlesource.com/133620 Reviewed-by: Mike Klein <mtklein@google.com>
* Reland "Have draw(Text|PosText|PosTextH) use a single entry on the device"Gravatar Herb Derby2018-06-06
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This reverts commit 74b390d6b136a60f1df15ac5ecd19bd8ad5a394b. Reason for revert: reverting to add patch for valgrind Original change's description: > Revert "Have draw(Text|PosText|PosTextH) use a single entry on the device" > > This reverts commit 4225b3220ef4bf50f0d9403f812ea94d50c4ee59. > > Reason for revert: made valgrind unhappy. > > Original change's description: > > Have draw(Text|PosText|PosTextH) use a single entry on the device > > > > Handle the positioning of drawText at the canvas layer. Simplify > > the code by removing similar implementations. > > > > Change-Id: I8b711783435072f560e29fca1dd934fa2e345ed2 > > Reviewed-on: https://skia-review.googlesource.com/127131 > > Reviewed-by: Ben Wagner <bungeman@google.com> > > Commit-Queue: Herb Derby <herb@google.com> > > TBR=jvanverth@google.com,bungeman@google.com,herb@google.com > > Change-Id: I65c9d30ae6ecb1f87e8660e56d8f8ce5daab7551 > No-Presubmit: true > No-Tree-Checks: true > No-Try: true > Reviewed-on: https://skia-review.googlesource.com/132403 > Reviewed-by: Hal Canary <halcanary@google.com> > Commit-Queue: Hal Canary <halcanary@google.com> TBR=jvanverth@google.com,halcanary@google.com,bungeman@google.com,herb@google.com Change-Id: I9bbb73aac447b51eb8215ac42331759fa4c9fa45 No-Presubmit: true No-Tree-Checks: true No-Try: true Reviewed-on: https://skia-review.googlesource.com/132580 Reviewed-by: Herb Derby <herb@google.com> Commit-Queue: Herb Derby <herb@google.com>
* Revert "Have draw(Text|PosText|PosTextH) use a single entry on the device"Gravatar Hal Canary2018-06-06
| | | | | | | | | | | | | | | | | | | | | | | | | | | This reverts commit 4225b3220ef4bf50f0d9403f812ea94d50c4ee59. Reason for revert: made valgrind unhappy. Original change's description: > Have draw(Text|PosText|PosTextH) use a single entry on the device > > Handle the positioning of drawText at the canvas layer. Simplify > the code by removing similar implementations. > > Change-Id: I8b711783435072f560e29fca1dd934fa2e345ed2 > Reviewed-on: https://skia-review.googlesource.com/127131 > Reviewed-by: Ben Wagner <bungeman@google.com> > Commit-Queue: Herb Derby <herb@google.com> TBR=jvanverth@google.com,bungeman@google.com,herb@google.com Change-Id: I65c9d30ae6ecb1f87e8660e56d8f8ce5daab7551 No-Presubmit: true No-Tree-Checks: true No-Try: true Reviewed-on: https://skia-review.googlesource.com/132403 Reviewed-by: Hal Canary <halcanary@google.com> Commit-Queue: Hal Canary <halcanary@google.com>
* Have draw(Text|PosText|PosTextH) use a single entry on the deviceGravatar Herb Derby2018-06-05
| | | | | | | | | | Handle the positioning of drawText at the canvas layer. Simplify the code by removing similar implementations. Change-Id: I8b711783435072f560e29fca1dd934fa2e345ed2 Reviewed-on: https://skia-review.googlesource.com/127131 Reviewed-by: Ben Wagner <bungeman@google.com> Commit-Queue: Herb Derby <herb@google.com>
* SkPDF: Fastpath for clipstack flatteningGravatar Hal Canary2018-06-05
| | | | | | | | | | BUG: chromium:837279 Change-Id: I79a675e7d9e713617711948e491e28babe06b1a2 Reviewed-on: https://skia-review.googlesource.com/132092 Auto-Submit: Hal Canary <halcanary@google.com> Commit-Queue: Ben Wagner <bungeman@google.com> Reviewed-by: Ben Wagner <bungeman@google.com>
* SkPDF: scale entire canvas for non-standard rasterDpiGravatar Hal Canary2018-05-11
| | | | | | | | | | | TODO: add better testing around this. BUG: chromium:481429 Change-Id: I1296fae3fc9775febf17bba75722c30f48d67a95 Reviewed-on: https://skia-review.googlesource.com/127051 Commit-Queue: Hal Canary <halcanary@google.com> Reviewed-by: Florin Malita <fmalita@chromium.org>
* Revert "Revert "SkAdvancedTypefaceMetrics: factor out GlyphToUnicode""Gravatar Hal Canary2018-05-09
| | | | | | | | | This reverts commit 97c1108607584b6050a6880d6ce22846e4913a92. Change-Id: Ic3c6addc64ced39766bbee3e10b4d88faf61ba2f Reviewed-on: https://skia-review.googlesource.com/127021 Reviewed-by: Hal Canary <halcanary@google.com> Commit-Queue: Hal Canary <halcanary@google.com>
* Revert "SkAdvancedTypefaceMetrics: factor out GlyphToUnicode"Gravatar Greg Daniel2018-05-09
| | | | | | | | | | | | | | | | | | | | | | | | This reverts commit 1c2bcd8b14e029a70e88b1e81acd29553cab0d1c. Reason for revert: breaking chrome roll Original change's description: > SkAdvancedTypefaceMetrics: factor out GlyphToUnicode > > Change-Id: Iedce8c1ea2c405d5ab64ccac353970d5cd2b9d63 > Reviewed-on: https://skia-review.googlesource.com/126507 > Commit-Queue: Hal Canary <halcanary@google.com> > Reviewed-by: Ben Wagner <bungeman@google.com> TBR=halcanary@google.com,bungeman@google.com,reed@google.com Change-Id: Ib1ff8484ffd09cdb88d461ac00745aa32c191124 No-Presubmit: true No-Tree-Checks: true No-Try: true Reviewed-on: https://skia-review.googlesource.com/127000 Reviewed-by: Greg Daniel <egdaniel@google.com> Commit-Queue: Greg Daniel <egdaniel@google.com>
* SkAdvancedTypefaceMetrics: factor out GlyphToUnicodeGravatar Hal Canary2018-05-09
| | | | | | | Change-Id: Iedce8c1ea2c405d5ab64ccac353970d5cd2b9d63 Reviewed-on: https://skia-review.googlesource.com/126507 Commit-Queue: Hal Canary <halcanary@google.com> Reviewed-by: Ben Wagner <bungeman@google.com>
* Take sk_sp<SkDevice> instead of SkDevice*Gravatar Herb Derby2018-05-02
| | | | | | | | | Change-Id: I0b296bf5b80adc19758a3dc99160be9d2ed05680 Reviewed-on: https://skia-review.googlesource.com/125160 Commit-Queue: Herb Derby <herb@google.com> Commit-Queue: Mike Reed <reed@google.com> Reviewed-by: Mike Reed <reed@google.com> Auto-Submit: Herb Derby <herb@google.com>
* Move strike cache Find*() to strike cacheGravatar Herb Derby2018-04-18
| | | | | | | | | BUG=skia:7515 Change-Id: Ic1580d4752d51a62df5427a28f843bc7b3181797 Reviewed-on: https://skia-review.googlesource.com/122020 Commit-Queue: Herb Derby <herb@google.com> Reviewed-by: Mike Klein <mtklein@chromium.org>
* Remove SkPaint::kGenA8FromLCD_Flag.Gravatar Ben Wagner2018-04-16
| | | | | | | | | | | | | The original intent of this flag is now handled by SkPixelGeomety on SkSurfaceProps on SkSurface. BUG=skia:7515 Change-Id: I54bb1be072b5b5b2164a59196bfeacac254823c7 Reviewed-on: https://skia-review.googlesource.com/121346 Commit-Queue: Ben Wagner <bungeman@google.com> Reviewed-by: Herb Derby <herb@google.com> Reviewed-by: Jim Van Verth <jvanverth@google.com>
* SkPDF/Clusterator: expose to the light of a unit testGravatar Hal Canary2018-03-29
| | | | | | | Change-Id: I5667da133f608ab42f83daba3424134b8e956b1e Reviewed-on: https://skia-review.googlesource.com/117006 Reviewed-by: Florin Malita <fmalita@chromium.org> Commit-Queue: Hal Canary <halcanary@google.com>
* SkPDF: Accept non-monotonic text cluster indicesGravatar Hal Canary2018-03-28
| | | | | | | | BUG=skia:7055 Change-Id: Ic1540a15118dbe99db5bcff26dd1235adac5468a Reviewed-on: https://skia-review.googlesource.com/116725 Reviewed-by: Florin Malita <fmalita@chromium.org> Commit-Queue: Hal Canary <halcanary@google.com>
* Remove the last uses of auto glyph cache.Gravatar Herb Derby2018-03-22
| | | | | | | Change-Id: I15fdc5bbe29aaa969fe6ec57010919b52249fd7f Reviewed-on: https://skia-review.googlesource.com/115886 Reviewed-by: Hal Canary <halcanary@google.com> Commit-Queue: Herb Derby <herb@google.com>
* SkPDF: filter out empty clip draws more oftenGravatar Hal Canary2018-03-09
| | | | | | | Change-Id: Iff89f95b25ef9c5f57b64affc63bd77c46acd9a6 Reviewed-on: https://skia-review.googlesource.com/113273 Reviewed-by: Florin Malita <fmalita@chromium.org> Commit-Queue: Hal Canary <halcanary@google.com>
* SkPDF: simplify PathOp code, emit empty clips.Gravatar Hal Canary2018-03-09
| | | | | | | | BUG=skia:772685 Change-Id: Ia658551cadcfeb2777f4a6727b48ec9d9fc22dd8 Reviewed-on: https://skia-review.googlesource.com/113462 Reviewed-by: Florin Malita <fmalita@chromium.org> Commit-Queue: Hal Canary <halcanary@google.com>
* move the guts of SkMaskFilter.h into SkMaskFilterBase.hGravatar Mike Reed2018-01-23
| | | | | | | | | Bug: skia: Change-Id: I29ad0960156562867429542d3cfbf3d639529cab Reviewed-on: https://skia-review.googlesource.com/98802 Commit-Queue: Mike Reed <reed@google.com> Reviewed-by: Florin Malita <fmalita@chromium.org> Reviewed-by: Brian Salomon <bsalomon@google.com>
* Revert "Revert "remove SK_SUPPORT_LEGACY_PDF_PIXELSERIALIZER dead code""Gravatar Mike Reed2017-12-15
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This reverts commit 800f5541bb0f4ea0f6923592355bdb64f156d8b3. Reason for revert: google3 updated Original change's description: > Revert "remove SK_SUPPORT_LEGACY_PDF_PIXELSERIALIZER dead code" > > This reverts commit 7f846f273ceaa5a3a8880e9af260f94bd1e614b6. > > Reason for revert: missed callsite in google3 > > Original change's description: > > remove SK_SUPPORT_LEGACY_PDF_PIXELSERIALIZER dead code > > > > Bug: skia: > > Change-Id: Ia88f3e2fdf6d5c6e5128eaefda0d68c7042ae7a2 > > Reviewed-on: https://skia-review.googlesource.com/85500 > > Commit-Queue: Mike Reed <reed@google.com> > > Reviewed-by: Hal Canary <halcanary@google.com> > > TBR=halcanary@google.com,reed@google.com > > Change-Id: I232dc24831bd8d52e9cbbc7ee58177af0617574a > No-Presubmit: true > No-Tree-Checks: true > No-Try: true > Bug: skia: > Reviewed-on: https://skia-review.googlesource.com/85600 > Reviewed-by: Mike Reed <reed@google.com> > Commit-Queue: Mike Reed <reed@google.com> TBR=halcanary@google.com,reed@google.com Change-Id: I6ccd032caf87020cba8d515ffb25d07b87267363 No-Presubmit: true No-Tree-Checks: true No-Try: true Bug: skia: Reviewed-on: https://skia-review.googlesource.com/86101 Reviewed-by: Mike Reed <reed@google.com> Commit-Queue: Mike Reed <reed@google.com>
* Revert "remove SK_SUPPORT_LEGACY_PDF_PIXELSERIALIZER dead code"Gravatar Mike Reed2017-12-15
| | | | | | | | | | | | | | | | | | | | | | | | | | This reverts commit 7f846f273ceaa5a3a8880e9af260f94bd1e614b6. Reason for revert: missed callsite in google3 Original change's description: > remove SK_SUPPORT_LEGACY_PDF_PIXELSERIALIZER dead code > > Bug: skia: > Change-Id: Ia88f3e2fdf6d5c6e5128eaefda0d68c7042ae7a2 > Reviewed-on: https://skia-review.googlesource.com/85500 > Commit-Queue: Mike Reed <reed@google.com> > Reviewed-by: Hal Canary <halcanary@google.com> TBR=halcanary@google.com,reed@google.com Change-Id: I232dc24831bd8d52e9cbbc7ee58177af0617574a No-Presubmit: true No-Tree-Checks: true No-Try: true Bug: skia: Reviewed-on: https://skia-review.googlesource.com/85600 Reviewed-by: Mike Reed <reed@google.com> Commit-Queue: Mike Reed <reed@google.com>
* remove SK_SUPPORT_LEGACY_PDF_PIXELSERIALIZER dead codeGravatar Mike Reed2017-12-15
| | | | | | | | Bug: skia: Change-Id: Ia88f3e2fdf6d5c6e5128eaefda0d68c7042ae7a2 Reviewed-on: https://skia-review.googlesource.com/85500 Commit-Queue: Mike Reed <reed@google.com> Reviewed-by: Hal Canary <halcanary@google.com>
* Moving extra options/parameters into PDFMetadataGravatar Mike Reed2017-12-14
| | | | | | | | Bug: skia: Change-Id: I29aa69e5765a7f8ba05b0361912d1f5276d77de3 Reviewed-on: https://skia-review.googlesource.com/84501 Reviewed-by: Hal Canary <halcanary@google.com> Commit-Queue: Mike Reed <reed@google.com>
* SkPDF: fix fTextScaleX errorGravatar Hal Canary2017-11-28
| | | | | | | | BUG=skia:7315 Change-Id: Ic613cb6fb8faed5b0840db4f500940bd6823de66 Reviewed-on: https://skia-review.googlesource.com/76981 Reviewed-by: Ben Wagner <bungeman@google.com> Commit-Queue: Hal Canary <halcanary@google.com>
* SkPDF: less tolerance for small circlesGravatar Hal Canary2017-11-27
| | | | | | | | BUG=chromium:772953 Change-Id: I9452ac8ad66ab8be26a9388f8c85a1f0e61bd392 Reviewed-on: https://skia-review.googlesource.com/75960 Reviewed-by: Cary Clark <caryclark@google.com> Commit-Queue: Hal Canary <halcanary@google.com>
* SkPDF: TextSize > 0;Gravatar Hal Canary2017-10-18
| | | | | | | | BUG=chromium:767343 Change-Id: Ide85e82bfc53ef8cf5fb59d9c7733436f83d7209 Reviewed-on: https://skia-review.googlesource.com/61580 Reviewed-by: Ben Wagner <bungeman@google.com> Commit-Queue: Hal Canary <halcanary@google.com>
* Rename methods and enum on SkClipStack::Element to indicate "device space"Gravatar Brian Salomon2017-08-30
| | | | | | | Change-Id: I83056843b530f76590f755f97e3d0a5a58f371fa Reviewed-on: https://skia-review.googlesource.com/39402 Commit-Queue: Brian Salomon <bsalomon@google.com> Reviewed-by: Robert Phillips <robertphillips@google.com>
* SkPDF: Use DeviceGray for alpha masks.Gravatar Hal Canary2017-07-26
| | | | | | | | | | See https://groups.google.com/forum/#!topic/pdf-dev/qmdjg3w7D8E BUG=chromium:742058 Change-Id: Ia8c204a92cb2b9fc33fab60826a95e359db65f08 Reviewed-on: https://skia-review.googlesource.com/26822 Commit-Queue: Hal Canary <halcanary@google.com> Reviewed-by: Ben Wagner <bungeman@google.com>
* SkPDF: Support alpha-only images with maskfiltersGravatar Hal Canary2017-07-20
| | | | | | | | | | | | | | | | | | - Handle alpha-only images with maskfilters - No longer apply color-filter to alpha-only images (it should apply to the paint color/shader composed with the alpha image instead). - Alpha-only images without maskfilters do sub-pixel clipping. - Non-alpha-only drawImages with maskfilters do sub-pixel clipping. * Fixes `alpha_image` GM (output now matches GPU backend). * Improves GMs `imagemasksubset` and `shadows`. BUG=skia:6735 Change-Id: I62a82b4133ae0eb42d6315785bc3d2cb834bd352 Reviewed-on: https://skia-review.googlesource.com/24820 Reviewed-by: Ben Wagner <bungeman@google.com> Commit-Queue: Hal Canary <halcanary@google.com>
* SkPDF: minor cleanups of skpdfdeviceGravatar Hal Canary2017-07-20
| | | | | | | Change-Id: I2143daaa6061003d8631f38ea39724fb12d494db Reviewed-on: https://skia-review.googlesource.com/24747 Reviewed-by: Ben Wagner <bungeman@google.com> Commit-Queue: Hal Canary <halcanary@google.com>
* SkPDF: SkPDFMakeShader takes the paint color.Gravatar Hal Canary2017-07-19
| | | | | | | | | | | This allows alpha blending and also alpha shaders with color blended in. fixes GMs: composeshader_alpha, composeshader_bitmap Change-Id: I3ab9cbef216f7733798d2e29541b4211c627dab2 Reviewed-on: https://skia-review.googlesource.com/24760 Commit-Queue: Hal Canary <halcanary@google.com> Reviewed-by: Ben Wagner <bungeman@google.com>
* SkPDF: Fix color glyphs with absolute positioningGravatar Hal Canary2017-07-19
| | | | | | | | | | BUG=chromium:617403 BUG=chromium:717570 BUG=skia:3489 Change-Id: I6b336836359e2cdccf5712edce5efd89f682a74d Reviewed-on: https://skia-review.googlesource.com/24620 Reviewed-by: Ben Wagner <bungeman@google.com> Commit-Queue: Hal Canary <halcanary@google.com>
* Revert "Revert "SkPDF: Non-outline glyphs as images""Gravatar Hal Canary2017-07-18
| | | | | | | | | | | | | | | | | | | This reverts commit 63b6f8b93209e593f60b235577f5b3d660396d5f. SkPDF: Non-outline glyphs as images - Cache images in PDF Canon for de-duping - For now, rasterize at text scale. In the future, look at CTM and fRasterScale. Original CL: https://skia-review.googlesource.com/24080 BUG=chromium:705480 BUG=skia:3489 Reviewed-by: Ben Wagner <bungeman@google.com> Change-Id: I99783df72c945cfb4b24b6d4db99418aa34e0897 Reviewed-on: https://skia-review.googlesource.com/24322 Reviewed-by: Hal Canary <halcanary@google.com> Commit-Queue: Hal Canary <halcanary@google.com>
* Revert "SkPDF: Non-outline glyphs as images"Gravatar Mike Reed2017-07-17
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This reverts commit 3cf6b79e50f148cae7ed8c6ec0cd79f1ede71c95. Reason for revert: breaking build ../../../../../work/skia/src/pdf/SkPDFDevice.cpp: In member function 'void SkPDFDevice::internalDrawText(const void*, size_t, const SkScalar*, SkTextBlob::GlyphPositioning, SkPoint, const SkPaint&, const uint32_t*, uint32_t, const char*)': ../../../../../work/skia/src/pdf/SkPDFDevice.cpp:1578:31: error: missing initializer for member 'SkPoint::fX' [-Werror=missing-field-initializers] SkPoint xy = {}; ^ Original change's description: > SkPDF: Non-outline glyphs as images > > - Cache images in PDF Canon for de-duping > - For now, rasterize at text scale. in the future, look at CTM and > fRasterScale. > - add a test that works on MacOS > > BUG=chromium:705480 > BUG=skia:3489 > Change-Id: I4fbc42f218e5b81ea15ea6cdccc61c91e532f6d0 > Reviewed-on: https://skia-review.googlesource.com/24080 > Commit-Queue: Hal Canary <halcanary@google.com> > Reviewed-by: Ben Wagner <bungeman@google.com> TBR=halcanary@google.com,bungeman@google.com Change-Id: I3d8800fcb33817c6065da0860a534eb14350d132 No-Presubmit: true No-Tree-Checks: true No-Try: true Bug: chromium:705480, skia:3489 Reviewed-on: https://skia-review.googlesource.com/24160 Reviewed-by: Mike Reed <reed@google.com> Commit-Queue: Mike Reed <reed@google.com>
* SkPDF: Non-outline glyphs as imagesGravatar Hal Canary2017-07-17
| | | | | | | | | | | | | | - Cache images in PDF Canon for de-duping - For now, rasterize at text scale. in the future, look at CTM and fRasterScale. - add a test that works on MacOS BUG=chromium:705480 BUG=skia:3489 Change-Id: I4fbc42f218e5b81ea15ea6cdccc61c91e532f6d0 Reviewed-on: https://skia-review.googlesource.com/24080 Commit-Queue: Hal Canary <halcanary@google.com> Reviewed-by: Ben Wagner <bungeman@google.com>
* SkPDF: start to support AlphaOnly Images as masks.Gravatar Hal Canary2017-07-12
| | | | | | | | | Does not work when img->isAlphaOnly() && pnt.getMaskFilter(). Change-Id: I60712d035e3a505799258e24660bba30f2c0ed53 Reviewed-on: https://skia-review.googlesource.com/22723 Reviewed-by: Ben Wagner <bungeman@google.com> Commit-Queue: Hal Canary <halcanary@google.com>