aboutsummaryrefslogtreecommitdiffhomepage
path: root/include/pdf
Commit message (Collapse)AuthorAge
...
* [PDF] Improve efficiency of glyph id collection during font subsetting.Gravatar vandebo@chromium.org2011-07-27
| | | | | | | | Patch from Arthur Hsu, original CL: http://codereview.appspot.com/4828044/ Review URL: http://codereview.appspot.com/4798057 git-svn-id: http://skia.googlecode.com/svn/trunk@1978 2bbb7eff-a529-9590-31e7-b0007b416f81
* Cleanup from r1843 based on revision comments.Gravatar ctguil@chromium.org2011-07-27
| | | | | | Review URL: http://codereview.appspot.com/4794044 git-svn-id: http://skia.googlecode.com/svn/trunk@1966 2bbb7eff-a529-9590-31e7-b0007b416f81
* [PDF] Refactor SkPDFFont to enable font/cmap subsetting.Gravatar vandebo@chromium.org2011-07-25
| | | | | | | | | | | Patch from Arthur Hsu, original CL: http://codereview.appspot.com/4633050/ Committed: http://code.google.com/p/skia/source/detail?r=1943 Reverted: http://code.google.com/p/skia/source/detail?r=1944 Review URL: http://codereview.appspot.com/4811049 git-svn-id: http://skia.googlecode.com/svn/trunk@1956 2bbb7eff-a529-9590-31e7-b0007b416f81
* Revert "[PDF] Refactor SkPDFFont to enable font/cmap subsetting."Gravatar vandebo@chromium.org2011-07-23
| | | | | | | | The PDF xref table is corrupt with this change. Revert until we figure it out. Review URL: http://codereview.appspot.com/4803049 git-svn-id: http://skia.googlecode.com/svn/trunk@1944 2bbb7eff-a529-9590-31e7-b0007b416f81
* [PDF] Refactor SkPDFFont to enable font/cmap subsetting.Gravatar vandebo@chromium.org2011-07-23
| | | | | | | | Patch from Arthur Hsu, original CL: http://codereview.appspot.com/4633050/ Review URL: http://codereview.appspot.com/4811049 git-svn-id: http://skia.googlecode.com/svn/trunk@1943 2bbb7eff-a529-9590-31e7-b0007b416f81
* replace SkRefPtr for parameters with simple pointersGravatar reed@google.com2011-07-20
| | | | git-svn-id: http://skia.googlecode.com/svn/trunk@1913 2bbb7eff-a529-9590-31e7-b0007b416f81
* [PDF] Make stream compression optional on a per device basis.Gravatar vandebo@chromium.org2011-07-20
| | | | | | | | | | | | | | | There are a lot of small pieces to make this change work: - SkPDFDocument (and SkPDFCatalog) take flags to disable compression (and font embedding - not implemented yet, can disable font subsetting for now). - SkPDFStream now defers compression until the size/emit step. - Classes that *had* a stream (because they didn't know the stream size at construction time) now *are* streams to make the substitution work correctly. - The SkPDFShader implementation got pulled apart into two classes, one that is a SkPDFDict, and one that is a SkPDFStream (making the common ancestor SkPDFObject). - Added helper methods in SkPDFObject for children that have simple resource lists. - Added an iterator to SkPDFDict so that a substitute SkPDFStream can get a copy of the stream dictionary. - Change SkPDFDocument to have a pointer to an SkPDFCatalog to remove a new circular header reference. Review URL: http://codereview.appspot.com/4700045 git-svn-id: http://skia.googlecode.com/svn/trunk@1911 2bbb7eff-a529-9590-31e7-b0007b416f81
* fix Capitalization of static methodsGravatar reed@google.com2011-07-20
| | | | git-svn-id: http://skia.googlecode.com/svn/trunk@1910 2bbb7eff-a529-9590-31e7-b0007b416f81
* helpers for append and insert when the value is a POD.Gravatar reed@google.com2011-07-20
| | | | | | | | reduces code-size and perf: fewer refs/unrefs git-svn-id: http://skia.googlecode.com/svn/trunk@1909 2bbb7eff-a529-9590-31e7-b0007b416f81
* [PDF] Fix substitute resources size calculation.Gravatar vandebo@chromium.org2011-07-20
| | | | | | Review URL: http://codereview.appspot.com/4803041 git-svn-id: http://skia.googlecode.com/svn/trunk@1908 2bbb7eff-a529-9590-31e7-b0007b416f81
* [PDF] Add setPage method to SkPDFDocument.Gravatar vandebo@chromium.org2011-07-18
| | | | | | | | BUG=312 Review URL: http://codereview.appspot.com/4763047 git-svn-id: http://skia.googlecode.com/svn/trunk@1892 2bbb7eff-a529-9590-31e7-b0007b416f81
* [PDF] Make color shaders work correctly.Gravatar vandebo@chromium.org2011-07-18
| | | | | | | | | Make SkPDFShader correctly bail out for color shaders. Fix the bail out handling code. Review URL: http://codereview.appspot.com/4750045 git-svn-id: http://skia.googlecode.com/svn/trunk@1886 2bbb7eff-a529-9590-31e7-b0007b416f81
* Modified to add support to print in the margins of pdf documentsGravatar ctguil@chromium.org2011-07-12
| | | | | | Review URL: http://codereview.appspot.com/4657087 git-svn-id: http://skia.googlecode.com/svn/trunk@1843 2bbb7eff-a529-9590-31e7-b0007b416f81
* [PDF] Add a concept of a substitute object to the SkPDFCatalog class.Gravatar vandebo@chromium.org2011-07-06
| | | | | | | | Code by Arthur Hsu, original code review: http://codereview.appspot.com/4650060/ Review URL: http://codereview.appspot.com/4639102 git-svn-id: http://skia.googlecode.com/svn/trunk@1812 2bbb7eff-a529-9590-31e7-b0007b416f81
* remove SkDeviceFactory from the collective consciousness, now that devices knowGravatar reed@google.com2011-07-06
| | | | | | | | how to create compatible siblings. git-svn-id: http://skia.googlecode.com/svn/trunk@1808 2bbb7eff-a529-9590-31e7-b0007b416f81
* A bit set class. Will be used for font subsetting.Gravatar vandebo@chromium.org2011-07-02
| | | | | | | | | | Committed on behalf of arthurhsu@chromium.org with a few final nits. Original CL: http://codereview.appspot.com/4627077 Review URL: http://codereview.appspot.com/4657070 git-svn-id: http://skia.googlecode.com/svn/trunk@1788 2bbb7eff-a529-9590-31e7-b0007b416f81
* remove drawShape from canvas apiGravatar reed@google.com2011-06-27
| | | | git-svn-id: http://skia.googlecode.com/svn/trunk@1723 2bbb7eff-a529-9590-31e7-b0007b416f81
* update doxGravatar reed@google.com2011-06-24
| | | | git-svn-id: http://skia.googlecode.com/svn/trunk@1720 2bbb7eff-a529-9590-31e7-b0007b416f81
* Fix some problems detected by coverity.Gravatar vandebo@chromium.org2011-06-21
| | | | | | | | | | | | - Uninitialized class member in GSCanonicalEntry and SkPDFDocument. - Incorrect sign extension in SkPDFFont. - Dead code in SkPDFUtils. CID=16262,16272,16273,16275 Review URL: http://codereview.appspot.com/4659041 git-svn-id: http://skia.googlecode.com/svn/trunk@1668 2bbb7eff-a529-9590-31e7-b0007b416f81
* Add createNewCompatibleDevice. Allow devices to have a NULL factory and ↵Gravatar bsalomon@google.com2011-06-17
| | | | | | | | | | saveLayer will fall back on createNewCompatibleDevice. Review URL: http://codereview.appspot.com/4633044/ git-svn-id: http://skia.googlecode.com/svn/trunk@1625 2bbb7eff-a529-9590-31e7-b0007b416f81
* [PDF] Add pages accessor to SkPDFDocument.Gravatar vandebo@chromium.org2011-05-31
| | | | | | | | Also add SK_API to SkPDFPage::getFontResources. Review URL: http://codereview.appspot.com/4561050 git-svn-id: http://skia.googlecode.com/svn/trunk@1453 2bbb7eff-a529-9590-31e7-b0007b416f81
* Add more SK_API declarations to fix Chrome.Gravatar vandebo@chromium.org2011-05-30
| | | | | | | | TBR=ctguil@chromium.org Review URL: http://codereview.appspot.com/4526088 git-svn-id: http://skia.googlecode.com/svn/trunk@1445 2bbb7eff-a529-9590-31e7-b0007b416f81
* [PDF] Add plumbing and accessors so that Chrome can record the font types ↵Gravatar vandebo@chromium.org2011-05-29
| | | | | | | | | | | used in a PDF. - Add a font type accessor to SkPDFFont. - Plumb font resource retrivial up to SkPDFPage. Review URL: http://codereview.appspot.com/4547069 git-svn-id: http://skia.googlecode.com/svn/trunk@1444 2bbb7eff-a529-9590-31e7-b0007b416f81
* [PDF] Reuse the invert function object for xform object masks.Gravatar vandebo@chromium.org2011-05-25
| | | | | | Review URL: http://codereview.appspot.com/4557046 git-svn-id: http://skia.googlecode.com/svn/trunk@1417 2bbb7eff-a529-9590-31e7-b0007b416f81
* [PDF] Rename ContentEntryAccessor to ScopedContentEntry.Gravatar vandebo@chromium.org2011-05-24
| | | | | | Review URL: http://codereview.appspot.com/4515134 git-svn-id: http://skia.googlecode.com/svn/trunk@1416 2bbb7eff-a529-9590-31e7-b0007b416f81
* [PDF] Fix regression - correct for fInitialTrnasform in form xobjects.Gravatar vandebo@chromium.org2011-05-24
| | | | | | | | Chrome bug http://crbug.com/83658 Review URL: http://codereview.appspot.com/4550072 git-svn-id: http://skia.googlecode.com/svn/trunk@1415 2bbb7eff-a529-9590-31e7-b0007b416f81
* [PDF] Add helper class to manage ContentEntry set up and completion.Gravatar vandebo@chromium.org2011-05-24
| | | | | | | | This stack object helper class calls finishContentEntry when it goes out of scope, maintains the current content entry, and manages the dst form xobject when it is needed. This can be made cleaner by moving the guts of SkPDFDevice into a core object, which can expose setUp/finishContentEntry as public, but that is left as a todo. Review URL: http://codereview.appspot.com/4515126 git-svn-id: http://skia.googlecode.com/svn/trunk@1409 2bbb7eff-a529-9590-31e7-b0007b416f81
* [PDF] Add clip support and some optimizations for "complex" xfer modes.Gravatar vandebo@chromium.org2011-05-24
| | | | | | | | | | | | | | For Clear, Src, Dst/Src-In/Out, we have to consider the current clip, and potentially draw Dst, clipped to the inverse of the current clip before doing the operation of interest. For clear or src, if we haven't drawn anything, or the clip is empty, there's nothing to be done. For Src/Dst-In/Out, if either is empty, the result is empty. Review URL: http://codereview.appspot.com/4538082 git-svn-id: http://skia.googlecode.com/svn/trunk@1407 2bbb7eff-a529-9590-31e7-b0007b416f81
* [PDF] Implement clear xfermode with a mask instead of pushing the clip down.Gravatar vandebo@chromium.org2011-05-18
| | | | | | | | This approach is much less likely to use an SkRegion and ends up working better for Webkit. Review URL: http://codereview.appspot.com/4550057 git-svn-id: http://skia.googlecode.com/svn/trunk@1375 2bbb7eff-a529-9590-31e7-b0007b416f81
* [PDF] Fix windows compile warning.Gravatar vandebo@chromium.org2011-05-18
| | | | | | Review URL: http://codereview.appspot.com/4545056 git-svn-id: http://skia.googlecode.com/svn/trunk@1374 2bbb7eff-a529-9590-31e7-b0007b416f81
* [PDF] Improve path effect and drawPath(prePathMatrix) support.Gravatar vandebo@chromium.org2011-05-17
| | | | | | | | | | | | Add path effect handling for drawPoints (via drawPath). Move path effect handling from drawRect to drawPath. Add prePathMatrix support to drawPath. BUG=crbug.com/82849 Review URL: http://codereview.appspot.com/4531047 git-svn-id: http://skia.googlecode.com/svn/trunk@1354 2bbb7eff-a529-9590-31e7-b0007b416f81
* [PDF] Add support for SrcIn, SrcOut, DstIn, DstOut xfermodes.Gravatar vandebo@chromium.org2011-05-13
| | | | | | | | | | This change uses the soft mask (aka soft clip) functionality of PDF to implement the xfermodes. It has to put existing content (dst) into a form xobject as well as putting the new (src) content into a different form xobject. It then draws one of them with the other as the soft mask. To accomplish this, we add a call to finishContentEntry after each call to setUpContentEntry - this is kind of a hack, but I don't see a better way to extract src. Unfortunately, soft mask is specified in the Graphic State PDF object (and not in the form xobject), so when handling one of these modes, we add a one time GS object to set the soft mask and invoke a simple GS to reset the soft mask when done. Review URL: http://codereview.appspot.com/4496041 git-svn-id: http://skia.googlecode.com/svn/trunk@1320 2bbb7eff-a529-9590-31e7-b0007b416f81
* [PDF] Fix Chrome crash - don't assume that SkDraw.fClipStack != NULL.Gravatar vandebo@chromium.org2011-05-11
| | | | | | | | Chrome bug is crbug.com/82198. Review URL: http://codereview.appspot.com/4515061 git-svn-id: http://skia.googlecode.com/svn/trunk@1306 2bbb7eff-a529-9590-31e7-b0007b416f81
* [PDF] Add a ToUnicode mapping for fonts.Gravatar vandebo@chromium.org2011-05-09
| | | | | | | | | | This makes text in PDFs searchable and copy&paste-able. Code from arthurhsu@chromium.org. Original review: http://codereview.appspot.com/4428082/ Review URL: http://codereview.appspot.com/4525042 git-svn-id: http://skia.googlecode.com/svn/trunk@1280 2bbb7eff-a529-9590-31e7-b0007b416f81
* [PDF] Add support for Clear, Src, Dst, DstOver xfermodes.Gravatar vandebo@chromium.org2011-05-09
| | | | | | | | This uses the refactoring in http://codereview.appspot.com/4459041/ to add support for additional xfer modes. Calling setupContentEntry may affect previous content entries (removing, reordering, or modifying their clip) and indicates to the caller if it should draw the new item or not. Review URL: http://codereview.appspot.com/4464043 git-svn-id: http://skia.googlecode.com/svn/trunk@1271 2bbb7eff-a529-9590-31e7-b0007b416f81
* [PDF] Fix setting of existing clip for layers.Gravatar vandebo@chromium.org2011-05-09
| | | | | | | | The current approach of setting the existing clip just before drawing a layer into a device doesn't work. SkDevice::clear() uses existing clip before that and if we need to put the content in a transparency group (i.e. for SrcIn xfermode), we need a valid existing clip. Instead, change the factory to use a special constructor when creating a layer device. Review URL: http://codereview.appspot.com/4495041 git-svn-id: http://skia.googlecode.com/svn/trunk@1270 2bbb7eff-a529-9590-31e7-b0007b416f81
* [PDF] Refactor content stream creation in SkPDFDevice to support more xfermodes.Gravatar vandebo@chromium.org2011-05-09
| | | | | | | | | | | Instead of writing all drawing and state updates into the final content stream immediately, this change creates a new ContentEntry each time the transform, clip, or paint changes. Drawing is done into a stream in the ContentEntry. When the consumer asks for the content, we combine all the ContentEntries with appropriate updates to the state (clip, transform, paint) in between. This allows us to modify the clip even after a drawing has completed. It also lets us remove ContentEntries with no drawing. Further optimization can be done to better use the stack features of PDF, for now we follow the previous model of having a single clip followed by a single transform on the graphic state stack. Push rectangle logic into SkPDFUtil::AppendRectangle. Change private functions to adhere to coding standards. Review URL: http://codereview.appspot.com/4459041 git-svn-id: http://skia.googlecode.com/svn/trunk@1269 2bbb7eff-a529-9590-31e7-b0007b416f81
* [PDF] Fix fallout from r1217.Gravatar vandebo@chromium.org2011-05-02
| | | | | | | | | | | The width and height we pass to SkDevice must be postive. Shader can no longer use negative coordinates (without transform). Shader unflip matrix should use same values as passed to SkPDFDevice (height). Most Shader dictionary entries should be scalars and not ints. Review URL: http://codereview.appspot.com/4454047 git-svn-id: http://skia.googlecode.com/svn/trunk@1219 2bbb7eff-a529-9590-31e7-b0007b416f81
* PDF Device should report non-transformed size for width and height.Gravatar ctguil@chromium.org2011-04-29
| | | | | | Review URL: http://codereview.appspot.com/4435074 git-svn-id: http://skia.googlecode.com/svn/trunk@1217 2bbb7eff-a529-9590-31e7-b0007b416f81
* make SkDeviceFactory reference countedGravatar mike@reedtribe.org2011-04-26
| | | | git-svn-id: http://skia.googlecode.com/svn/trunk@1180 2bbb7eff-a529-9590-31e7-b0007b416f81
* [PDF] Implement clear() method and a couple fixes.Gravatar vandebo@chromium.org2011-04-15
| | | | | | | | | + If the clip matches the initial clip, don't set the clip. + Don't change the transform for drawPaint. Review URL: http://codereview.appspot.com/4424041 git-svn-id: http://skia.googlecode.com/svn/trunk@1142 2bbb7eff-a529-9590-31e7-b0007b416f81
* Generalize the flip origin argument to the PDF device constructor.Gravatar vandebo@chromium.org2011-04-11
| | | | | | | | | | | The argument still has a default value that does what most users will want, but provides more flexibility. Chrome will use this change to support an initial translation of the origin to simulate a margin and to scale the entire content (needed on Windows). When landing to Chrome, this will need http://codereview.chromium.org/6820038 Review URL: http://codereview.appspot.com/4373052 git-svn-id: http://skia.googlecode.com/svn/trunk@1111 2bbb7eff-a529-9590-31e7-b0007b416f81
* [PDF] Make the NOT_IMPLEMENTED macro not print anything by default.Gravatar vandebo@chromium.org2011-04-04
| | | | | | Review URL: http://codereview.appspot.com/4351046 git-svn-id: http://skia.googlecode.com/svn/trunk@1050 2bbb7eff-a529-9590-31e7-b0007b416f81
* Additional SK_API annotations needed for print preview on windows.Gravatar ctguil@chromium.org2011-03-30
| | | | | | Review URL: http://codereview.appspot.com/4324042 git-svn-id: http://skia.googlecode.com/svn/trunk@1022 2bbb7eff-a529-9590-31e7-b0007b416f81
* Store content streams in an SkStream instead of an SkString (64k size limit).Gravatar vandebo@chromium.org2011-03-28
| | | | | | Review URL: http://codereview.appspot.com/4272070 git-svn-id: http://skia.googlecode.com/svn/trunk@1011 2bbb7eff-a529-9590-31e7-b0007b416f81
* Use Type3 fonts for platforms that don't yet support ↵Gravatar vandebo@chromium.org2011-03-10
| | | | | | | | SkFontHost::GetAdvancedTypefaceMetrics. Review URL: http://codereview.appspot.com/4273041 git-svn-id: http://skia.googlecode.com/svn/trunk@922 2bbb7eff-a529-9590-31e7-b0007b416f81
* [PDF] Add support for Shaders.Gravatar vandebo@chromium.org2011-03-08
| | | | | | | | | | | | - Shaders, or as they are referred to in PDF, patterns, are drawn in the coordinate system of the initial page, so when we canonicalize them, we have to consider the current transform and where they are constructed. - Image shaders are tiled by default, this makes repeat and mirror modes easy, but means we have to draw a pattern as large as the current clip to support clamp mode. - Gradient shaders are implemented with type 4 functions, which are basically small snippets of post script code. I've tried to make the code generation modular and heavily commented to make it easy to understand or expand. Review URL: http://codereview.appspot.com/4239061 git-svn-id: http://skia.googlecode.com/svn/trunk@905 2bbb7eff-a529-9590-31e7-b0007b416f81
* Add SkPDFUtils.cpp to build.Gravatar ctguil@chromium.org2011-03-04
| | | | git-svn-id: http://skia.googlecode.com/svn/trunk@893 2bbb7eff-a529-9590-31e7-b0007b416f81
* PDF Type3 Support.Gravatar ctguil@chromium.org2011-03-04
| | | | git-svn-id: http://skia.googlecode.com/svn/trunk@892 2bbb7eff-a529-9590-31e7-b0007b416f81
* [PDF] Restrict scalars to the range that PDF understands.Gravatar vandebo@chromium.org2011-03-04
| | | | | | | | | | | * Add a config flag to ignore the restrictions * Apply restriction to both SkPDFScalar and scalars used in content streams. * +/- 32,767 for the integer part. * +/1 1/65536 for the fraction part. Review URL: http://codereview.appspot.com/4240050 git-svn-id: http://skia.googlecode.com/svn/trunk@882 2bbb7eff-a529-9590-31e7-b0007b416f81