aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/pdf/SkPDFShader.cpp
Commit message (Collapse)AuthorAge
* Make SkShader store localM directly rather than as a separate alloc.Gravatar bsalomon@google.com2012-10-31
| | | | | | | May cause very slight GM changes in gpu two pt radial/conical radients. Review URL: https://codereview.appspot.com/6821056 git-svn-id: http://skia.googlecode.com/svn/trunk@6221 2bbb7eff-a529-9590-31e7-b0007b416f81
* [PDF] Fix gradient generation code (remove extra 'dup' in some cases)Gravatar vandebo@chromium.org2012-10-22
| | | | | | | | Fixes http://crbug.com/157006 Review URL: https://codereview.appspot.com/6733061 git-svn-id: http://skia.googlecode.com/svn/trunk@6035 2bbb7eff-a529-9590-31e7-b0007b416f81
* Result of running tools/sanitize_source_files.py (which was added in ↵Gravatar rmistry@google.com2012-08-23
| | | | | | | | | https://codereview.appspot.com/6465078/) This CL is part II of IV (I broke down the 1280 files into 4 CLs). Review URL: https://codereview.appspot.com/6474054 git-svn-id: http://skia.googlecode.com/svn/trunk@5263 2bbb7eff-a529-9590-31e7-b0007b416f81
* Use asNewCustomStage instead of asABitmap in SkGpuDevice, also removed ↵Gravatar rileya@google.com2012-07-25
| | | | | | | | | now-unecessary twoPointRadialParams parameter from asABitmap. In SkGpuDevice we still fall back on using asABitmap for effects that don't have asNewCustomStage implemented, but it still simplifies things a fair amount. Review URL: https://codereview.appspot.com/6430060 git-svn-id: http://skia.googlecode.com/svn/trunk@4755 2bbb7eff-a529-9590-31e7-b0007b416f81
* Replace all instances of 'clear' with 'pop's in conical gradient pdf impl, ↵Gravatar rileya@google.com2012-07-10
| | | | | | looks like the pdf spec doesn't support Postscript's 'clear' stack operator. Should fix some warnings on mac buildbots. git-svn-id: http://skia.googlecode.com/svn/trunk@4521 2bbb7eff-a529-9590-31e7-b0007b416f81
* Added pdf implementation of conical gradient.Gravatar rileya@google.com2012-07-10
| | | | | | | Also fixed an erroneous comment in the gpu implementation. Review URL: https://codereview.appspot.com/6351076 git-svn-id: http://skia.googlecode.com/svn/trunk@4520 2bbb7eff-a529-9590-31e7-b0007b416f81
* [PDF] Fix PDF code to not crash on SkComposeShader.Gravatar vandebo@chromium.org2012-06-28
| | | | | | Review URL: https://codereview.appspot.com/6354053 git-svn-id: http://skia.googlecode.com/svn/trunk@4400 2bbb7eff-a529-9590-31e7-b0007b416f81
* fix missing switch-statement handler (for conical gradient)Gravatar reed@google.com2012-06-11
| | | | git-svn-id: http://skia.googlecode.com/svn/trunk@4229 2bbb7eff-a529-9590-31e7-b0007b416f81
* extend asAGradient for Conical type (to be implemented by PDF and XPS)Gravatar reed@google.com2012-06-07
| | | | | | Review URL: https://codereview.appspot.com/6308051 git-svn-id: http://skia.googlecode.com/svn/trunk@4207 2bbb7eff-a529-9590-31e7-b0007b416f81
* Fixed minor c++ issues found by cppcheckGravatar robertphillips@google.com2012-04-27
| | | | | | | | http://codereview.appspot.com/6127049/ git-svn-id: http://skia.googlecode.com/svn/trunk@3771 2bbb7eff-a529-9590-31e7-b0007b416f81
* [PDF] Handle failures of matrix inversionGravatar vandebo@chromium.org2012-04-17
| | | | | | | | | Previously reviewed in https://codereview.appspot.com/6033047. Rolled back because of unrelated fixed-point bugs. Review URL: https://codereview.appspot.com/6052051 git-svn-id: http://skia.googlecode.com/svn/trunk@3715 2bbb7eff-a529-9590-31e7-b0007b416f81
* Fix some fixed-point bugs.Gravatar vandebo@chromium.org2012-04-17
| | | | | | Review URL: https://codereview.appspot.com/6047046 git-svn-id: http://skia.googlecode.com/svn/trunk@3714 2bbb7eff-a529-9590-31e7-b0007b416f81
* Revert "[PDF] Handle failures of matrix inversion" while I investigate fixed ↵Gravatar vandebo@chromium.org2012-04-17
| | | | | | | | | | point failures. This reverts commit r3711 Review URL: https://codereview.appspot.com/6050049 git-svn-id: http://skia.googlecode.com/svn/trunk@3712 2bbb7eff-a529-9590-31e7-b0007b416f81
* [PDF] Handle failures of matrix inversion.Gravatar vandebo@chromium.org2012-04-17
| | | | | | Review URL: https://codereview.appspot.com/6033047 git-svn-id: http://skia.googlecode.com/svn/trunk@3711 2bbb7eff-a529-9590-31e7-b0007b416f81
* [PDF] If matrix inversion fails, use the identity matrix.Gravatar vandebo@chromium.org2012-04-13
| | | | | | | | BUG=chrome:123078 Review URL: https://codereview.appspot.com/6007044 git-svn-id: http://skia.googlecode.com/svn/trunk@3676 2bbb7eff-a529-9590-31e7-b0007b416f81
* [PDF] Fix memory hungry inefficiency in pdf resource tracking.Gravatar vandebo@chromium.org2012-03-09
| | | | | | | | | | | | | When moving the content of a device into a PDF object like SkPDFFormXObject or SkPDFShader does, we only need the top level resources in the new object's resource list, not the recursive set of objects. Otherwise, when you put a form on a form on form, etc, references to the objects multiply. This fixed http://crbug.com/117321 Review URL: https://codereview.appspot.com/5796048 git-svn-id: http://skia.googlecode.com/svn/trunk@3360 2bbb7eff-a529-9590-31e7-b0007b416f81
* [PDF] Fix some fixed/float-point mismatches for image shaders.Gravatar vandebo@chromium.org2012-03-09
| | | | | | | | BUG=520 Review URL: https://codereview.appspot.com/5787061 git-svn-id: http://skia.googlecode.com/svn/trunk@3356 2bbb7eff-a529-9590-31e7-b0007b416f81
* posix: Avoid static initializers in static/global mutexesGravatar digit@google.com2012-01-26
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch removes static initializers related to static and global mutexes from the final library's machine code when building on a pthread-capable system. We use PTHREAD_MUTEX_INITIALIZER to perform POD-style initialization. You need a line like the following to declare a global mutex with it: SkBaseMutex gMutex = { PTHREAD_MUTEX_INITIALIZER }; We introduce the SK_DECLARE_STATIC_MUTEX and SK_DECLARE_GLOBAL_MUTEX macros to be able to declare static/global mutexes in the source tree uniformly. SkMutex is now defined as a sub-class of SkBaseMutex, with standard construction/destruction semantics. This is useful if the mutex object is a member of another C++ class, or allocated dynamically. We also modify a few places to refer to SkBaseMutex instead of a SkMutex, where it makes sense. Generally speaking, client code should hold and use pointers to SkBaseMutex whenever they can now. We defined a new built-time macro named SK_USE_POSIX_THREADS to indicate that we're using a pthread-based SkThread.h interface. The macro will also be used in future patches to implement other helper thread synchronization classes. Finally, we inline the acquire() and release() functions in the case of Posix to improve performance a bit. Running: 'bench -repeat 10 -match mutex' on an Android device or a 2.4GHz Xeon Linux desktop shows the following improvements: Before After Galaxy Nexus 1.64 1.45 Nexus S 1.47 1.16 Xoom 1.86 1.66 Xeon 0.36 0.31 This removes 5 static mutex initializers from the library Review URL: https://codereview.appspot.com/5501066 git-svn-id: http://skia.googlecode.com/svn/trunk@3091 2bbb7eff-a529-9590-31e7-b0007b416f81
* [PDF] Fix some scalar/int assumptions.Gravatar vandebo@chromium.org2012-01-05
| | | | | | Review URL: http://codereview.appspot.com/5516043 git-svn-id: http://skia.googlecode.com/svn/trunk@2975 2bbb7eff-a529-9590-31e7-b0007b416f81
* Coverity: Add a default case in SkPDFShader. CID=101159Gravatar vandebo@chromium.org2011-12-21
| | | | | | | | Code from thestig@chromium.org original CL: http://codereview.appspot.com/5498052/ Review URL: http://codereview.appspot.com/5502052 git-svn-id: http://skia.googlecode.com/svn/trunk@2913 2bbb7eff-a529-9590-31e7-b0007b416f81
* Address lint issues in pdf directories.Gravatar ctguil@chromium.org2011-08-15
| | | | | | Review URL: http://codereview.appspot.com/4887042 git-svn-id: http://skia.googlecode.com/svn/trunk@2117 2bbb7eff-a529-9590-31e7-b0007b416f81
* Automatic update of all copyright notices to reflect new license terms.Gravatar epoger@google.com2011-07-28
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | I have manually examined all of these diffs and restored a few files that seem to require manual adjustment. The following files still need to be modified manually, in a separate CL: android_sample/SampleApp/AndroidManifest.xml android_sample/SampleApp/res/layout/layout.xml android_sample/SampleApp/res/menu/sample.xml android_sample/SampleApp/res/values/strings.xml android_sample/SampleApp/src/com/skia/sampleapp/SampleApp.java android_sample/SampleApp/src/com/skia/sampleapp/SampleView.java experimental/CiCarbonSampleMain.c experimental/CocoaDebugger/main.m experimental/FileReaderApp/main.m experimental/SimpleCocoaApp/main.m experimental/iOSSampleApp/Shared/SkAlertPrompt.h experimental/iOSSampleApp/Shared/SkAlertPrompt.m experimental/iOSSampleApp/SkiOSSampleApp-Base.xcconfig experimental/iOSSampleApp/SkiOSSampleApp-Debug.xcconfig experimental/iOSSampleApp/SkiOSSampleApp-Release.xcconfig gpu/src/android/GrGLDefaultInterface_android.cpp gyp/common.gypi gyp_skia include/ports/SkHarfBuzzFont.h include/views/SkOSWindow_wxwidgets.h make.bat make.py src/opts/memset.arm.S src/opts/memset16_neon.S src/opts/memset32_neon.S src/opts/opts_check_arm.cpp src/ports/SkDebug_brew.cpp src/ports/SkMemory_brew.cpp src/ports/SkOSFile_brew.cpp src/ports/SkXMLParser_empty.cpp src/utils/ios/SkImageDecoder_iOS.mm src/utils/ios/SkOSFile_iOS.mm src/utils/ios/SkStream_NSData.mm tests/FillPathTest.cpp Review URL: http://codereview.appspot.com/4816058 git-svn-id: http://skia.googlecode.com/svn/trunk@1982 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] 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