aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/pdf
Commit message (Collapse)AuthorAge
* 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
* Make PDF clip code handle rrects.Gravatar commit-bot@chromium.org2014-02-16
| | | | | | | | | | | | | | Fixes bug introduced in https://code.google.com/p/skia/source/detail?r=13465 http://108.170.217.252:10117/builders/Test-ChromeOS-Daisy-MaliT604-Arm7-Debug/builds/1382/steps/RenderPdfs/logs/stdio R=robertphillips@google.com TBR=robertphillips@google.com Author: bsalomon@google.com Review URL: https://codereview.chromium.org/166313003 git-svn-id: http://skia.googlecode.com/svn/trunk@13467 2bbb7eff-a529-9590-31e7-b0007b416f81
* Store SkRRects in SkClipStackGravatar commit-bot@chromium.org2014-02-16
| | | | | | | | | | | BUG=skia:2181 R=robertphillips@google.com Author: bsalomon@google.com Review URL: https://codereview.chromium.org/163683002 git-svn-id: http://skia.googlecode.com/svn/trunk@13465 2bbb7eff-a529-9590-31e7-b0007b416f81
* Change device factories to take SkImageInfo instead of SkBitmap::ConfigGravatar commit-bot@chromium.org2014-02-16
| | | | | | | | | | | | | patch from issue 167033002 BUG=skia: R=reed@google.com Author: reed@chromium.org Review URL: https://codereview.chromium.org/168653002 git-svn-id: http://skia.googlecode.com/svn/trunk@13463 2bbb7eff-a529-9590-31e7-b0007b416f81
* Drawing fake bold text, line and normal text made normal text bolder on PDF.Gravatar commit-bot@chromium.org2014-02-07
| | | | | | | | | | | | | | | | | | | | | | | | When PDF uses fake bold text, it uses stroke and fill for the text. After that, line is drawn. It creates new ContextEntry which GraphicStateEntry has 0 fTextScaleX. Since fTextScaleX is 0, GraphicStackState::updateDrawingState() doesn't update text fill mode or the PDF page. When the normal text is drawn, it reuse the line's ContextEntry because GraphicStateEntry::compareInitialState() returns true. However, since the reused GraphicsStateEntry's fTextScaleX is 0, the text fill mode is not updated to fill, and the text is drawn in stroke and fill mode. When the fTextScaleX is changed, we should not reuse GraphicStateEntry even if ether of fTextScaleX is 0. BUG=skia:2132 R=reed@google.com, vandebo@chromium.org, bungeman@google.com Author: yuki.sekiguchi@access-company.com Review URL: https://codereview.chromium.org/137923005 git-svn-id: http://skia.googlecode.com/svn/trunk@13369 2bbb7eff-a529-9590-31e7-b0007b416f81
* Make SkImageFilter methods const.Gravatar commit-bot@chromium.org2014-02-05
| | | | | | | | | | | | | | SkImageFilter had some non-const methods that could all be made const. This is a first step towards making SkImageFilter immutable. BUG=skia:2097 R=mtklein@google.com, reed@google.com, robertphillips@google.com Author: dominikg@chromium.org Review URL: https://codereview.chromium.org/148883011 git-svn-id: http://skia.googlecode.com/svn/trunk@13330 2bbb7eff-a529-9590-31e7-b0007b416f81
* add installPixelsGravatar reed@google.com2014-01-24
| | | | | | | | | BUG=skia: R=halcanary@google.com Review URL: https://codereview.chromium.org/143073008 git-svn-id: http://skia.googlecode.com/svn/trunk@13174 2bbb7eff-a529-9590-31e7-b0007b416f81
* reenable vertices gm, adding picture supportGravatar reed@google.com2013-12-30
| | | | | | | | BUG= Review URL: https://codereview.chromium.org/112913005 git-svn-id: http://skia.googlecode.com/svn/trunk@12845 2bbb7eff-a529-9590-31e7-b0007b416f81
* [PDF] Fix clipping in xfermode improvement.Gravatar commit-bot@chromium.org2013-12-17
| | | | | | | | | | | | | | In some cases, the wrong clip (src clip instead of initial clip) was used. Switch almost exclusively to initial clip because it is safe and generates a smaller result. BUG=chromium:328009 R=reed@google.com, bungeman@google.com Author: vandebo@chromium.org Review URL: https://codereview.chromium.org/116423004 git-svn-id: http://skia.googlecode.com/svn/trunk@12729 2bbb7eff-a529-9590-31e7-b0007b416f81