aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/pdf/SkPDFShader.cpp
Commit message (Collapse)AuthorAge
...
* [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] 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
* Fix a batch of coverity defects, uninitialized class fields.Gravatar vandebo@chromium.org2011-06-21
| | | | | | | | | In SkClipStack::B2FIter::Clip, SkWriter32, SkClipStack::Rec, SkDeque::F2BIter, SkPDFShader::State CID 15427,15433,15533,15532,16274,16740 Review URL: http://codereview.appspot.com/4630055 git-svn-id: http://skia.googlecode.com/svn/trunk@1669 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
* 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
* Correction of the non-portable use of dynamically allocated stack arrays in theGravatar twiz@google.com2011-03-09
| | | | | | | | | | | | | | | pdf shader code. I briefly looked into making use of alloca, but that is also non-portable, and deprecated in many environments. Fell back to the SkTDArray class as a common denominator. This problem was introduce by the following CL: http://codereview.appspot.com/4239061/ git-svn-id: http://skia.googlecode.com/svn/trunk@912 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