aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/pdf
Commit message (Collapse)AuthorAge
* 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
* Rename onCreateDevice -> onCreateCompatibleDeviceGravatar fmalita2014-11-13
| | | | | | | | | | | | | | | | This is a port of https://codereview.chromium.org/723743002/ with the following changes: * drop the legacy onCreateDevice variant completely * also convert SkXPSDevice & SkGatherPixelRefsAndRects to the new API This is expected to break canaries and will require a manual/cowboy roll. TBR=reed@google.com NOTREECHECKS=true Review URL: https://codereview.chromium.org/720213002
* Revert of move to modify onCreateDevice virtual (patchset #2 id:20001 of ↵Gravatar reed2014-11-13
| | | | | | | | | | | | | | | | | | | | | | | | | | | https://codereview.chromium.org/723743002/) Reason for revert: mac_chromium_rel_ng unittest failures. speculating caused by this cl. http://build.chromium.org/p/tryserver.chromium.mac/builders/mac_chromium_rel_ng/builds/5262 Original issue's description: > start to replace onCreateDevice with onCreateCompatibleDevice > > the new virtual takes a struct which we can amend in the future w/o having to > update our subclasses in chrome. > > BUG=skia: > NOTRY=True > > Committed: https://skia.googlesource.com/skia/+/b122ee50fb56cf6669fe1668b82c8815896e9943 TBR=fmalita@google.com,fmalita@chromium.org,reed@google.com NOTREECHECKS=true NOTRY=true BUG=skia: Review URL: https://codereview.chromium.org/728433002
* start to replace onCreateDevice with onCreateCompatibleDeviceGravatar reed2014-11-12
| | | | | | | | | | the new virtual takes a struct which we can amend in the future w/o having to update our subclasses in chrome. BUG=skia: NOTRY=True Review URL: https://codereview.chromium.org/723743002
* Add `SkIRect bounds()` convenience method to SkImageInfo and SkBitmap.Gravatar halcanary2014-10-24
| | | | Review URL: https://codereview.chromium.org/646213003
* Fix image filters for PDF backend.Gravatar senorblanco2014-10-20
| | | | | | | | | | | | | | | | Currently, the PDF backend does not support image filters (since PDF does not have that functionality), so it simply removes them. This is causing Chrome print preview to render incorrectly (see bug). The fix here is to fall back to a raster device for image filters, as we used to do in Blink. The resulting bitmap will be drawn to the destination device as a normal main-memory-backed bitmap. Note: this change invalidates the PDF results of all GMs containing image filters (since they'll actually be rendered). BUG=422144 Review URL: https://codereview.chromium.org/644323006
* Const-correctness in PDF drawText() callGravatar halcanary2014-10-16
| | | | | | | | | | If SkPDFDevice::drawText is called with glyph encoding and a font with cubic outlines (CFF or Type1) and a glyph code > 255 then it was mutating the in(const) glyph codes in place. Instead, a copy is made. BUG=skia:3019 Review URL: https://codereview.chromium.org/656143002
* Fix int16_t for glyphs, const glyphs, and clarify glyph loop.Gravatar bungeman2014-10-03
| | | | | | | | | | | | | | | | | | Several places in the PDF code are using int16_t for glyphs. With newer NotoSans fonts, all possible glyph ids are being used, so this can lead to problems. The PDF glyphs from text code returns the text for the glyphs if the encoding is for glyphs. However, it returns this using an unsafe const cast which is hiding possible bugs and preventing correct use of const in other places. The way the glyph loop in SkPDFDevice::drawPosText is written uses a '--i' in the loop, which makes it appear this can loop forever. I don't believe it can, but it is an unecessary code folding. We should also at least assert the forward progress correctness here. Review URL: https://codereview.chromium.org/626613002
* Revert of Revert of Fix SkTextBlob offset semantics. (patchset #1 id:1 of ↵Gravatar fmalita2014-09-29
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | https://codereview.chromium.org/609223003/) Reason for revert: Re-landing: Chromium-side fix to be landed with the roll (https://codereview.chromium.org/607853003/) Original issue's description: > Revert of Fix SkTextBlob offset semantics. (patchset #2 id:20001 of https://codereview.chromium.org/605533002/) > > Reason for revert: > Breaking the Chrome builds with the error: > > [14:54:14.317833] ../../skia/ext/pixel_ref_utils.cc:221:16: error: 'drawPosText' marked 'override' but does not override any member functions > [14:54:14.318022] virtual void drawPosText(const SkDraw& draw, > [14:54:14.318082] ^ > > Original issue's description: > > Fix SkTextBlob offset semantics. > > > > Implement proper x/y drawTextBlob() handling by plumbing a > > drawPosText() offset parameter (to act as an additional glyph pos > > translation) throughout the device layer. > > > > The new offset superceeds the existing constY, with a minor semantic > > tweak: whereas previous implementations were ignoring constY in 2D > > positioning mode (scalarsPerGlyph == 2), now the offset is always > > observed, in all positioning modes. We can do this because existing > > drawPosText() clients always pass constY == 0 for full positioning mode. > > > > R=reed@google.com, jvanverth@google.com, robertphillips@google.com > > > > Committed: https://skia.googlesource.com/skia/+/c13bc571d3e61a43b87eb97f0719abd304cafaf2 > > TBR=jvanverth@google.com,reed@google.com,bsalomon@google.com,fmalita@chromium.org > NOTREECHECKS=true > NOTRY=true > > Committed: https://skia.googlesource.com/skia/+/d46b8d2bab7cfba8458432248e1568ac377429e9 R=jvanverth@google.com, reed@google.com, bsalomon@google.com, robertphillips@google.com TBR=bsalomon@google.com, jvanverth@google.com, reed@google.com, robertphillips@google.com NOTREECHECKS=true NOTRY=true Author: fmalita@chromium.org Review URL: https://codereview.chromium.org/607413003
* Revert of Fix SkTextBlob offset semantics. (patchset #2 id:20001 of ↵Gravatar robertphillips2014-09-29
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | https://codereview.chromium.org/605533002/) Reason for revert: Breaking the Chrome builds with the error: [14:54:14.317833] ../../skia/ext/pixel_ref_utils.cc:221:16: error: 'drawPosText' marked 'override' but does not override any member functions [14:54:14.318022] virtual void drawPosText(const SkDraw& draw, [14:54:14.318082] ^ Original issue's description: > Fix SkTextBlob offset semantics. > > Implement proper x/y drawTextBlob() handling by plumbing a > drawPosText() offset parameter (to act as an additional glyph pos > translation) throughout the device layer. > > The new offset superceeds the existing constY, with a minor semantic > tweak: whereas previous implementations were ignoring constY in 2D > positioning mode (scalarsPerGlyph == 2), now the offset is always > observed, in all positioning modes. We can do this because existing > drawPosText() clients always pass constY == 0 for full positioning mode. > > R=reed@google.com, jvanverth@google.com, robertphillips@google.com > > Committed: https://skia.googlesource.com/skia/+/c13bc571d3e61a43b87eb97f0719abd304cafaf2 R=jvanverth@google.com, reed@google.com, bsalomon@google.com, fmalita@chromium.org TBR=bsalomon@google.com, fmalita@chromium.org, jvanverth@google.com, reed@google.com NOTREECHECKS=true NOTRY=true Author: robertphillips@google.com Review URL: https://codereview.chromium.org/609223003
* Fix SkTextBlob offset semantics.Gravatar Florin Malita2014-09-26
| | | | | | | | | | | | | | | | Implement proper x/y drawTextBlob() handling by plumbing a drawPosText() offset parameter (to act as an additional glyph pos translation) throughout the device layer. The new offset superceeds the existing constY, with a minor semantic tweak: whereas previous implementations were ignoring constY in 2D positioning mode (scalarsPerGlyph == 2), now the offset is always observed, in all positioning modes. We can do this because existing drawPosText() clients always pass constY == 0 for full positioning mode. R=reed@google.com, jvanverth@google.com, robertphillips@google.com Review URL: https://codereview.chromium.org/605533002
* Introduce Props to surface (patchset #27 id:520001 of ↵Gravatar reed2014-09-22
| | | | | | | | | | | | https://codereview.chromium.org/551463004/)" This reverts commit 29c857d0f3a1cb837f73406eeb6ba9771879b5e7. TBR= Author: reed@google.com Review URL: https://codereview.chromium.org/588143004
* Revert of introduce Props to surface (patchset #27 id:520001 of ↵Gravatar reed2014-09-21
| | | | | | | | | | | | | | | | | | | | | | | | https://codereview.chromium.org/551463004/) Reason for revert: Broke call site in WebKit Original issue's description: > introduce Props to surface (work in progress) > > BUG=skia: > > Committed: https://skia.googlesource.com/skia/+/3716fd067a5621bb94a6cb08d72afec8bf3aceda R=robertphillips@google.com, bsalomon@google.com, jvanverth@google.com, bungeman@google.com, fmalita@google.com, vangelis@chromium.org, reed@google.com TBR=bsalomon@google.com, bungeman@google.com, fmalita@google.com, jvanverth@google.com, reed@google.com, robertphillips@google.com, vangelis@chromium.org NOTREECHECKS=true NOTRY=true BUG=skia: Author: reed@chromium.org Review URL: https://codereview.chromium.org/583773004
* introduce Props to surface (work in progress)Gravatar reed2014-09-21
| | | | | | | | | BUG=skia: R=robertphillips@google.com, bsalomon@google.com, jvanverth@google.com, bungeman@google.com, fmalita@google.com, vangelis@chromium.org, reed@chromium.org Author: reed@google.com Review URL: https://codereview.chromium.org/551463004
* SkData can allocate room for its contents in the same blockGravatar reed2014-09-11
| | | | | | | | | BUG=skia: R=bungeman@google.com, mtklein@google.com Author: reed@google.com Review URL: https://codereview.chromium.org/560653004
* make allocPixels throw on failureGravatar reed2014-09-02
| | | | | | | | | BUG=skia: R=mtklein@google.com, fmalita@google.com, fmalita@chromium.org Author: reed@google.com Review URL: https://codereview.chromium.org/510423005
* Fix memory leak in SkPDFType1FontGravatar djsollen2014-08-28
| | | | | | | | | BUG=skia:2880 R=bungeman@google.com Author: djsollen@google.com Review URL: https://codereview.chromium.org/514313003
* JPEG(JFIF only) directly embedded into PDFGravatar halcanary2014-08-27
| | | | | | | | R=reed@google.com, djsollen@google.com, mtklein@google.com Author: halcanary@google.com Review URL: https://codereview.chromium.org/515493003
* Assert allocation so we can catch it sooner.Gravatar halcanary2014-08-07
| | | | | | | | R=bungeman@google.com, mtklein@google.com Author: halcanary@google.com Review URL: https://codereview.chromium.org/445363007
* Remove ALL font fallback logic from Skia.Gravatar djsollen2014-08-06
| | | | | | | | R=reed@google.com, bungeman@google.com, caryclark@google.com Author: djsollen@google.com Review URL: https://codereview.chromium.org/434623002
* Fix thread unsafe mutex initialization.Gravatar bungeman2014-07-25
| | | | | | | | | BUG=skia:2779 R=robertphillips@google.com, mtklein@google.com, reed@android.com, bsalomon@google.com Author: bungeman@google.com Review URL: https://codereview.chromium.org/419113002
* Fix memory leak introduced in http://crrev.com/387863005Gravatar halcanary2014-07-14
| | | | | | | | | NOTRY=true R=bungeman@google.com, mtklein@google.com Author: halcanary@google.com Review URL: https://codereview.chromium.org/395543002
* Move SkPDFStream back to SkStream to save memory.Gravatar halcanary2014-07-14
| | | | | | | | | | | | | | | SkPDFStream stores data as a SkStreamRewindable to minimize deep duplication and memory overhead. SkStreamToStreamRewindable function to deal with fact that SkTypeface returns a SkStream. BUG=skia:2743 R=djsollen@google.com, mtklein@google.com, bungeman@google.com, reed@google.com Author: halcanary@google.com Review URL: https://codereview.chromium.org/387863005
* Make SkPDFFont::fFontInfo a const pointer.Gravatar halcanary2014-07-11
| | | | | | | | | BUG=skia:2742 R=djsollen@google.com, scroggo@google.com Author: halcanary@google.com Review URL: https://codereview.chromium.org/383063007
* Switch SkPDFStream's internal storage from SkStream to SkDataGravatar halcanary2014-06-27
| | | | | | | | | | | | | | | | | | | Motivation: This makes SkPDFStream thread-safe for two threads serializing it at once, since a SkStream has an internal position. Updated SkPDFFont, SkPDFGraphicState, and SkPDFPage's use of SkPDFStream to use the SkData constructor rather than the SkStream constructor (saving a memcpy). BUG=skia:2683 Committed: https://skia.googlesource.com/skia/+/c1dfa14b645ae274780f026dd86c9b633fbdad06 R=mtklein@google.com, djsollen@google.com, rmistry@google.com, robertphillips@google.com Author: halcanary@google.com Review URL: https://codereview.chromium.org/340783013
* change gpudevice and pdfdevice to inherit from basedeviceGravatar reed2014-06-27
| | | | | | | | | BUG=skia: R=robertphillips@google.com Author: reed@google.com Review URL: https://codereview.chromium.org/354133002
* Add lock to SkPDFDictGravatar halcanary2014-06-27
| | | | | | | | | | | | Add mutex lock to all functions. Remove dictionary iterator, and replace with new thread-safe functions. BUG=skia:2683 R=mtklein@google.com, djsollen@google.com Author: halcanary@google.com Review URL: https://codereview.chromium.org/360473005
* Revert of Switch SkPDFStream's internal storage from SkStream to SkData ↵Gravatar rmistry2014-06-26
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | (https://codereview.chromium.org/340783013/) Reason for revert: Causes canary failures Original issue's description: > Switch SkPDFStream's internal storage from SkStream to SkData > > Motivation: This makes SkPDFStream thread-safe for two threads > serializing it at once, since a SkStream has an internal position. > > Updated SkPDFFont, SkPDFGraphicState, and SkPDFPage's use of > SkPDFStream to use the SkData constructor rather than the SkStream > constructor (saving a memcpy). > > BUG=skia:2683 > > Committed: https://skia.googlesource.com/skia/+/c1dfa14b645ae274780f026dd86c9b633fbdad06 R=mtklein@google.com, djsollen@google.com, halcanary@google.com TBR=djsollen@google.com, halcanary@google.com, mtklein@google.com NOTREECHECKS=true NOTRY=true BUG=skia:2683 Author: rmistry@google.com Review URL: https://codereview.chromium.org/354043005
* Switch SkPDFStream's internal storage from SkStream to SkDataGravatar halcanary2014-06-26
| | | | | | | | | | | | | | | | Motivation: This makes SkPDFStream thread-safe for two threads serializing it at once, since a SkStream has an internal position. Updated SkPDFFont, SkPDFGraphicState, and SkPDFPage's use of SkPDFStream to use the SkData constructor rather than the SkStream constructor (saving a memcpy). BUG=skia:2683 R=mtklein@google.com, djsollen@google.com Author: halcanary@google.com Review URL: https://codereview.chromium.org/340783013
* Use SkMutex::assertHeld in SkPDFFont and SkPDFShader.Gravatar halcanary2014-06-20
| | | | | | | | R=mtklein@google.com Author: halcanary@google.com Review URL: https://codereview.chromium.org/348113002
* [PDF] Fix font embedding restrictions.Gravatar vandebo2014-06-19
| | | | | | | | | | | | Stop using restricted font outlines and honor don't subset restriction. Resubmit of r12600. R=halcanary@google.com, bungeman@google.com, reed@google.com Author: vandebo@chromium.org Review URL: https://codereview.chromium.org/334443002
* Add assertHeld() to SkMutex.Gravatar mtklein2014-06-09
| | | | | | | | | BUG=skia: R=bungeman@google.com, mtklein@google.com, reed@google.com Author: mtklein@chromium.org Review URL: https://codereview.chromium.org/313823004
* use colortype instead of configGravatar reed2014-06-02
| | | | | | | | | | | | clone of https://codereview.chromium.org/305133006/ TBR= BUG=skia: Author: reed@google.com Review URL: https://codereview.chromium.org/301233011
* Revert "Revert of setConfig -> setInfo ↵Gravatar commit-bot@chromium.org2014-05-30
| | | | | | | | | | | | | | (https://codereview.chromium.org/308683005/)" This reverts commit eecaea4148805834f223681f70b6488ceba12d09. R=robertphillips@google.com, scroggo@google.com Author: reed@google.com Review URL: https://codereview.chromium.org/301283003 git-svn-id: http://skia.googlecode.com/svn/trunk@14989 2bbb7eff-a529-9590-31e7-b0007b416f81
* Revert of setConfig -> setInfo (https://codereview.chromium.org/308683005/)Gravatar commit-bot@chromium.org2014-05-29
| | | | | | | | | | | | | | | | | | | | | | | | Reason for revert: broke all Windows bots Original issue's description: > setConfig -> setInfo > > BUG=skia: > > Committed: http://code.google.com/p/skia/source/detail?r=14978 R=robertphillips@google.com, reed@google.com TBR=reed@google.com, robertphillips@google.com NOTREECHECKS=true NOTRY=true BUG=skia: Author: epoger@google.com Review URL: https://codereview.chromium.org/302053002 git-svn-id: http://skia.googlecode.com/svn/trunk@14979 2bbb7eff-a529-9590-31e7-b0007b416f81
* setConfig -> setInfoGravatar commit-bot@chromium.org2014-05-29
| | | | | | | | | | | BUG=skia: R=robertphillips@google.com Author: reed@google.com Review URL: https://codereview.chromium.org/308683005 git-svn-id: http://skia.googlecode.com/svn/trunk@14978 2bbb7eff-a529-9590-31e7-b0007b416f81
* turn assert into not_implemented_yet for patheffects on textGravatar reed@google.com2014-05-22
| | | | git-svn-id: http://skia.googlecode.com/svn/trunk@14854 2bbb7eff-a529-9590-31e7-b0007b416f81
* re-land hide get/setLocalMatrixGravatar commit-bot@chromium.org2014-05-12
| | | | | | | | | | | | This reverts commit b1d702a43b07934f5b001b1b09db2c57ede909a1. TBR=scroggo@google.com Author: reed@google.com Review URL: https://codereview.chromium.org/279903002 git-svn-id: http://skia.googlecode.com/svn/trunk@14702 2bbb7eff-a529-9590-31e7-b0007b416f81
* Revert of hide get/setLocalMatrix (https://codereview.chromium.org/279563002/)Gravatar commit-bot@chromium.org2014-05-09
| | | | | | | | | | | | | | | | | | | | | | | | Reason for revert: broke gms Original issue's description: > hide get/setLocalMatrix > > BUG=skia: > > Committed: http://code.google.com/p/skia/source/detail?r=14675 R=fmalita@google.com, dominikg@chromium.org, fmalita@chromium.org TBR=dominikg@chromium.org, fmalita@chromium.org, fmalita@google.com NOTREECHECKS=true NOTRY=true BUG=skia: Author: reed@google.com Review URL: https://codereview.chromium.org/278903002 git-svn-id: http://skia.googlecode.com/svn/trunk@14677 2bbb7eff-a529-9590-31e7-b0007b416f81
* hide get/setLocalMatrixGravatar commit-bot@chromium.org2014-05-09
| | | | | | | | | | | BUG=skia: R=fmalita@google.com, dominikg@chromium.org, fmalita@chromium.org Author: reed@google.com Review URL: https://codereview.chromium.org/279563002 git-svn-id: http://skia.googlecode.com/svn/trunk@14675 2bbb7eff-a529-9590-31e7-b0007b416f81
* fix int/size_t warningsGravatar reed@google.com2014-04-18
| | | | | | | | | | | patch from issue 239933002 BUG=skia: R=bungeman@google.com Review URL: https://codereview.chromium.org/242113010 git-svn-id: http://skia.googlecode.com/svn/trunk@14259 2bbb7eff-a529-9590-31e7-b0007b416f81
* SkNonCopyable should be used with private inheritance.Gravatar commit-bot@chromium.org2014-04-07
| | | | | | | | | | | | | | | This is mostly s/public SkNoncopyable/SkNoncopyable/g. Two classes (SkDrawLooper::Context and SkPicture::OperationList) don't actually work with SkNoncopyable because they introduce a virtual destructor. I added SkNoncopyableVirtual to make them work as intended. Sort of questionable whether they really need to be noncopyable in the first place, but I guess it doesn't hurt to keep the behavior the same. BUG=skia: R=reed@google.com, mtklein@google.com Author: mtklein@chromium.org Review URL: https://codereview.chromium.org/226183018 git-svn-id: http://skia.googlecode.com/svn/trunk@14081 2bbb7eff-a529-9590-31e7-b0007b416f81
* remove all references to legacy Config8888Gravatar reed@google.com2014-03-26
| | | | | | | | | BUG=skia: R=bsalomon@google.com Review URL: https://codereview.chromium.org/211043002 git-svn-id: http://skia.googlecode.com/svn/trunk@13952 2bbb7eff-a529-9590-31e7-b0007b416f81
* Remove SkCanvas matrix ops return value.Gravatar commit-bot@chromium.org2014-03-18
| | | | | | | | | | | | | The internal SkMatrix ops can no longer fail -> we can remove the bool return value. R=bsalomon@google.com, reed@google.com, robertphillips@google.com, scroggo@google.com, fmalita@google.com Author: fmalita@chromium.org Review URL: https://codereview.chromium.org/200223008 git-svn-id: http://skia.googlecode.com/svn/trunk@13849 2bbb7eff-a529-9590-31e7-b0007b416f81
* add new readPixels with direct memory parametersGravatar commit-bot@chromium.org2014-03-17
| | | | | | | | | | | BUG=skia: R=scroggo@google.com, bsalomon@google.com, robertphillips@google.com, fmalita@google.com Author: reed@google.com Review URL: https://codereview.chromium.org/199413013 git-svn-id: http://skia.googlecode.com/svn/trunk@13840 2bbb7eff-a529-9590-31e7-b0007b416f81
* getDeviceCapabilities is no longer need, so remove itGravatar commit-bot@chromium.org2014-03-13
| | | | | | | | | | | BUG=skia: R=bungeman@google.com, vandebo@chromium.org Author: reed@google.com Review URL: https://codereview.chromium.org/198943003 git-svn-id: http://skia.googlecode.com/svn/trunk@13797 2bbb7eff-a529-9590-31e7-b0007b416f81
* Drop executable flag from headers so that they can be packagedGravatar robertphillips@google.com2014-03-11
| | | | | | | | https://codereview.chromium.org/194883004/ git-svn-id: http://skia.googlecode.com/svn/trunk@13746 2bbb7eff-a529-9590-31e7-b0007b416f81
* use colortype instead of configGravatar reed@google.com2014-02-20
| | | | | | | | | | | patch from issue 172063004 BUG=skia: R=scroggo@google.com Review URL: https://codereview.chromium.org/173893002 git-svn-id: http://skia.googlecode.com/svn/trunk@13520 2bbb7eff-a529-9590-31e7-b0007b416f81
* Offer single-param version of deepCopyTo -- much easier to migrate to colortypesGravatar commit-bot@chromium.org2014-02-20
| | | | | | | | | | | BUG=skia: R=reed@google.com Author: reed@chromium.org Review URL: https://codereview.chromium.org/167683006 git-svn-id: http://skia.googlecode.com/svn/trunk@13516 2bbb7eff-a529-9590-31e7-b0007b416f81