aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/ports/SkGlobalInitialization_default.cpp
Commit message (Collapse)AuthorAge
* Implement a generic matrix transform image filter.Gravatar senorblanco@chromium.org2014-03-25
| | | | | | | | | | | | | This will be used in Blink to accommodate matrices that contain rotation or shearing. This is a generalization of SkResizeImageFilter, so I've replaced all uses of SkResizeImageFilter in Skia. (It might be easier to review by diffing it with SkResizeImageFilter, too.) R=reed@google.com Review URL: https://codereview.chromium.org/211103006 git-svn-id: http://skia.googlecode.com/svn/trunk@13941 2bbb7eff-a529-9590-31e7-b0007b416f81
* Fixing SkPicture serializationGravatar commit-bot@chromium.org2014-03-12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Fixed a few issues while attempting to use the new serialization path for SkPicture inside a fuzzer: - SkReadBuffer and SkValidatingReadBuffer both had a fReader member instead of sharing the same member, which leads to problems if a base class function is used - In SkPicture, a header is now written as a single chunk of data, so it also has to be read as a single chunk of data - In the SkPicturePlayback destructor, a bad deserialization would lead to a crash if we don't safely unref fOpData - Also in SkPicturePlayback, if we only use a ReadBuffer for the whole deserialization, additional tags must be added to parseBufferTag() - SkValidatingReadBuffer::readBitmap() was broken, but this path wasn't usen't since the only use case for SkValidatingReadBuffer is currently image filters and bitmaps are unflattened as part of the deserialization of SkBitmapSource - SkPictureImageFilter was not deserializable. Added it to SkGlobalInitialization* - Added a test that exercises the SkPicture serialization / deserialization code BUG=skia: R=senorblanco@google.com, senorblanco@chromium.org, reed@google.com, robertphillips@google.com Author: sugoi@chromium.org Review URL: https://codereview.chromium.org/195223003 git-svn-id: http://skia.googlecode.com/svn/trunk@13764 2bbb7eff-a529-9590-31e7-b0007b416f81
* Implement a resize image filter. This is needed for the "filterRes" feature ↵Gravatar senorblanco@chromium.org2014-01-15
| | | | | | | | | | | | | | | | | in SVG filter effects, which specifies the required size for intermediate processing buffers. In order to make this work, we need to render the primitive at the given resolution (doable at the callsite in Blink), and then to resize the result to the actual on-screen size. The latter is where this filter comes in. It simply applies a scaling factor (and the current CTM) to its input, and draws its input bitmap at that size. R=reed@google.com Committed: https://code.google.com/p/skia/source/detail?r=13077 Reverted: https://code.google.com/p/skia/source/detail?r=13078 BUG= Review URL: https://codereview.chromium.org/136863006 git-svn-id: http://skia.googlecode.com/svn/trunk@13082 2bbb7eff-a529-9590-31e7-b0007b416f81
* Initial error handling codeGravatar commit-bot@chromium.org2013-10-23
| | | | | | | | | | | | | | | | I made it as simple as possible. The impact seems minimal and it should do what's necessary to make this code secure. BUG= Committed: http://code.google.com/p/skia/source/detail?r=11247 R=reed@google.com, scroggo@google.com, djsollen@google.com, sugoi@google.com, bsalomon@google.com, mtklein@google.com, senorblanco@google.com, senorblanco@chromium.org Author: sugoi@chromium.org Review URL: https://codereview.chromium.org/23021015 git-svn-id: http://skia.googlecode.com/svn/trunk@11922 2bbb7eff-a529-9590-31e7-b0007b416f81
* Remove SkColorTable from SkFlattenable hierarchy.Gravatar commit-bot@chromium.org2013-10-15
| | | | | | | | | | | BUG= R=reed@google.com Author: mtklein@google.com Review URL: https://codereview.chromium.org/27392002 git-svn-id: http://skia.googlecode.com/svn/trunk@11791 2bbb7eff-a529-9590-31e7-b0007b416f81
* change SkAnnotation to not inherit from SkFlattenable (does not need dynamic ↵Gravatar reed@google.com2013-10-14
| | | | | | | | | | | factories) BUG= R=scroggo@google.com Review URL: https://codereview.chromium.org/26606004 git-svn-id: http://skia.googlecode.com/svn/trunk@11762 2bbb7eff-a529-9590-31e7-b0007b416f81
* remove SkDataSet, and just store a key/value in SkAnnotationGravatar reed@google.com2013-10-14
| | | | | | | | | BUG= R=mtklein@google.com Review URL: https://codereview.chromium.org/27208002 git-svn-id: http://skia.googlecode.com/svn/trunk@11759 2bbb7eff-a529-9590-31e7-b0007b416f81
* SkData need not be a Flattenable, since it does not need subclass/factoriesGravatar reed@google.com2013-10-14
| | | | | | | | | BUG= R=mtklein@google.com Review URL: https://codereview.chromium.org/26928002 git-svn-id: http://skia.googlecode.com/svn/trunk@11754 2bbb7eff-a529-9590-31e7-b0007b416f81
* Remove SkLumaXfermode.Gravatar commit-bot@chromium.org2013-10-14
| | | | | | | | | | | | | | Possibly the shortest-lived Skia feature, SkLumaXfermode is now replaced by a color filter implementation (SkLumaColorFilter). All known existing clients (Blink) have been converted. R=reed@google.com Author: fmalita@chromium.org Review URL: https://codereview.chromium.org/26916002 git-svn-id: http://skia.googlecode.com/svn/trunk@11750 2bbb7eff-a529-9590-31e7-b0007b416f81
* Luminance-to-alpha color filter (SkLumaColorFilter).Gravatar commit-bot@chromium.org2013-10-07
| | | | | | | | | | | | | Adding a color filter luma implementation. The plan is to convert existing clients and then deprecate SkLumaXfermode. R=bsalomon@google.com, reed@google.com, robertphillips@google.com Author: fmalita@chromium.org Review URL: https://codereview.chromium.org/25453004 git-svn-id: http://skia.googlecode.com/svn/trunk@11636 2bbb7eff-a529-9590-31e7-b0007b416f81
* Added SkTileImageFilter to SkFlattenable::InitializeFlattenables()Gravatar sugoi@google.com2013-09-26
| | | | | | | | | BUG= R=bsalomon@google.com Review URL: https://codereview.chromium.org/24764003 git-svn-id: http://skia.googlecode.com/svn/trunk@11477 2bbb7eff-a529-9590-31e7-b0007b416f81
* [External patch] Source-over support for SkLumaXfermode.Gravatar fmalita@google.com2013-09-17
| | | | | | | | | | | | | | | | | | | | | | This is a patch by Andrei Parvu <parvu@adobe.com> (Adobe CLA signer). Original CL/review: https://codereview.chromium.org/24078006/ GM:lumamode will need rebaselining after landing this. --- In order to use CSS luminance masking, we need to be able to create an instance of SkLumaXfermode which can receive a kSrcOver mode, and applies that mode after converting the source using the luminance-to-alpha coefficients. BUG=289420 R=reed@google.com Review URL: https://codereview.chromium.org/23710053 git-svn-id: http://skia.googlecode.com/svn/trunk@11312 2bbb7eff-a529-9590-31e7-b0007b416f81
* Added a missing filter in SkFlattenable::InitializeFlattenables().Gravatar commit-bot@chromium.org2013-09-05
| | | | | | | | | | | BUG= R=reed@google.com, scroggo@google.com, djsollen@google.com, mtklein@google.com Author: sugoi@chromium.org Review URL: https://chromiumcodereview.appspot.com/23444005 git-svn-id: http://skia.googlecode.com/svn/trunk@11110 2bbb7eff-a529-9590-31e7-b0007b416f81
* Add luminance mask transfer modes.Gravatar commit-bot@chromium.org2013-08-23
| | | | | | | | | | | | | | | | | This adds kSrcInLum_Mode and kDstInLum_Mode, to support CSS and SVG luminance masks (http://www.w3.org/TR/css-masking/#MaskValues , http://www.w3.org/TR/SVG/masking.html#Masking ). The transfer coefficient is computed according to http://www.w3.org/TR/2011/REC-SVG11-20110816/filters.html#feColorMatrixElement "luminance-to-alpha": luma = 0.2125 * r + 0.7154 * g + 0.0721 * b R=bsalomon@google.com, reed@google.com, robertphillips@google.com, vandebo@chromium.org Author: fmalita@chromium.org Review URL: https://chromiumcodereview.appspot.com/22918012 git-svn-id: http://skia.googlecode.com/svn/trunk@10887 2bbb7eff-a529-9590-31e7-b0007b416f81
* Upstreaming DropShadowImageFilter into skia, from BlinkGravatar junov@chromium.org2013-08-07
| | | | | | | | | | | | GM imagefiltersbase will need rebaselining after this change R=senorblanco@chromium.org Committed: https://code.google.com/p/skia/source/detail?r=10583 Review URL: https://codereview.chromium.org/22258005 git-svn-id: http://skia.googlecode.com/svn/trunk@10626 2bbb7eff-a529-9590-31e7-b0007b416f81
* Move SkComposeImageFilter into its own {.h, .cpp} filesGravatar commit-bot@chromium.org2013-08-07
| | | | | | | | | | | | | | | In http://crrev.com/21154002, SkComposeImageFilter will be used outside of tests. Consequently, this moves SkComposeImageFilter from SkTestImageFilters.{h, cpp} into its own {.h, .cpp} files. BUG=181613 R=senorblanco@chromium.org Author: ajuma@chromium.org Review URL: https://chromiumcodereview.appspot.com/22438003 git-svn-id: http://skia.googlecode.com/svn/trunk@10591 2bbb7eff-a529-9590-31e7-b0007b416f81
* Remove SkBlendImageFilter, and all tests. Its functionality has been ↵Gravatar senorblanco@chromium.org2013-08-01
| | | | | | | | | | subsumed by SkXfermodeImageFilter. R=robertphillips@google.com Review URL: https://codereview.chromium.org/21404002 git-svn-id: http://skia.googlecode.com/svn/trunk@10482 2bbb7eff-a529-9590-31e7-b0007b416f81
* Implement SkXfermode image filter. This required changing the signature of ↵Gravatar senorblanco@chromium.org2013-05-31
| | | | | | | | | | | | | | SkXfermode::asNewEffectOrCoeffs(), to add an optional background texture. For the raster path, we do a straightforward 2-pass method: draw background, then composite the foreground over it. For the GPU path, if the xfermode can be expressed as an effect, we build an effect with the background texture incorporated, then do a single-pass draw fetching both foreground and background textures, and compositing to the result. If the xfermode is expressed as src/dst coefficients, we do a 2-pass draw as in the raster path and use fixed-function blending. R=bsalomon@google.com, reed@google.com Review URL: https://codereview.chromium.org/16125008 git-svn-id: http://skia.googlecode.com/svn/trunk@9373 2bbb7eff-a529-9590-31e7-b0007b416f81
* Provide a GPU implementation of SkArithmeticMode, using a custom GrEffect ↵Gravatar senorblanco@chromium.org2013-05-29
| | | | | | | | | | | | | | | | | exposed via asNewEffectOrCoeff(). Doing it this way required modifying the arithmode GM to use saveLayer()/restore() rather than creating an offscreen SkBitmap, since otherwise the compositing is always done in raster mode. Fixing that in turn exposed that SkArithmeticMode did not work in Picture mode, since it wasn't flattenable. Made it so. Note: this will require rebaselining the arithmode GM (again). R=bsalomon@google.com, reed@google.com Originally committed: https://code.google.com/p/skia/source/detail?r=9324 Reverted: https://code.google.com/p/skia/source/detail?r=9325 Review URL: https://codereview.chromium.org/16064002 git-svn-id: http://skia.googlecode.com/svn/trunk@9330 2bbb7eff-a529-9590-31e7-b0007b416f81
* Revert "Provide a GPU implementation of SkArithmeticMode, using a custom ↵Gravatar senorblanco@chromium.org2013-05-29
| | | | | | | | | | | | GrEffect exposed via asNewEffectOrCoeff()." This reverts commit b8ffe17b5c684f9cfff02285f27e6aa1f75c9b53. TBR=robertphillips Review URL: https://codereview.chromium.org/16115007 git-svn-id: http://skia.googlecode.com/svn/trunk@9325 2bbb7eff-a529-9590-31e7-b0007b416f81
* Provide a GPU implementation of SkArithmeticMode, using a custom GrEffect ↵Gravatar senorblanco@chromium.org2013-05-29
| | | | | | | | | | | | | | exposed via asNewEffectOrCoeff(). Doing it this way required modifying the arithmode GM to use saveLayer()/restore() rather than creating an offscreen SkBitmap, since otherwise the compositing is always done in raster mode. Fixing that in turn exposed that SkArithmeticMode did not work in Picture mode, since it wasn't flattenable. Made it so. Note: this will require rebaselining the arithmode GM (again). R=bsalomon@google.com, reed@google.com Review URL: https://codereview.chromium.org/16064002 git-svn-id: http://skia.googlecode.com/svn/trunk@9324 2bbb7eff-a529-9590-31e7-b0007b416f81
* reenable lerpmode in gms, now that I think we fixed the global-initializationGravatar reed@google.com2013-05-22
| | | | | | | | BUG= Review URL: https://codereview.chromium.org/15737004 git-svn-id: http://skia.googlecode.com/svn/trunk@9234 2bbb7eff-a529-9590-31e7-b0007b416f81
* New SVG turbulence in SkiaGravatar sugoi@google.com2013-04-05
| | | | | | | | | This cl contains the code for CPU generation of noise. TEST:Added 'perlinnoise' gm Review URL: https://codereview.chromium.org/13094003 git-svn-id: http://skia.googlecode.com/svn/trunk@8541 2bbb7eff-a529-9590-31e7-b0007b416f81
* Reverting r8376, r8373 and r8371 due to Android shader compilation failuresGravatar robertphillips@google.com2013-03-25
| | | | git-svn-id: http://skia.googlecode.com/svn/trunk@8378 2bbb7eff-a529-9590-31e7-b0007b416f81
* New SVG turbulence in SkiaGravatar sugoi@google.com2013-03-25
| | | | | | | | | | This cl contains the code for both CPU and GPU generation of noise. Both codepaths yield equivalent results. TEST:Added 'perlinnoise' gm Review URL: https://codereview.chromium.org/13047005 git-svn-id: http://skia.googlecode.com/svn/trunk@8371 2bbb7eff-a529-9590-31e7-b0007b416f81
* PDF: add support for named destinations.Gravatar epoger@google.com2013-03-08
| | | | | | | Landing patchset 7 from https://codereview.appspot.com/7374052 for dml@google.com Review URL: https://codereview.chromium.org/12533009 git-svn-id: http://skia.googlecode.com/svn/trunk@8034 2bbb7eff-a529-9590-31e7-b0007b416f81
* Revert r8000 due to failures on some buildbotsGravatar epoger@google.com2013-03-06
| | | | git-svn-id: http://skia.googlecode.com/svn/trunk@8001 2bbb7eff-a529-9590-31e7-b0007b416f81
* PDF: add support for named destinations Gravatar epoger@google.com2013-03-06
| | | | | | | Imported from https://codereview.appspot.com/7374052/ on behalf of dml@google.com Review URL: https://codereview.chromium.org/12466008 git-svn-id: http://skia.googlecode.com/svn/trunk@8000 2bbb7eff-a529-9590-31e7-b0007b416f81
* Fix android errors when unflattening an SkImageRef_ashmem object.Gravatar djsollen@google.com2013-02-01
| | | | | | Review URL: https://codereview.appspot.com/7228071 git-svn-id: http://skia.googlecode.com/svn/trunk@7514 2bbb7eff-a529-9590-31e7-b0007b416f81
* (Relanding r7275 with assert fix, plus fixes from r7276, r7280, r7283.)Gravatar senorblanco@chromium.org2013-01-18
| | | | | | | | | | | | Implement a bicubic resampling image filter, with raster and GPU backends. In order to get this to work on the GPU side, I had to modify the width and height of the drawn texture in drawSprite() and drawDevice() to use the filtered texture's dimensions, instead of the source texture. (This wasn't a problem before since all other image filters produce results the same dimensions as their input texture.) For now, this implementation only does axis-aligned scaling (same as the Lanczos-3 implementation in Chrome). It's also done for correctness and clarity, not speed, so there are lots of opportunities for speedups. Committed: https://code.google.com/p/skia/source/detail?r=7275 Review URL: https://codereview.appspot.com/7033049 git-svn-id: http://skia.googlecode.com/svn/trunk@7287 2bbb7eff-a529-9590-31e7-b0007b416f81
* Reverting chain of SkBicubicImageFilter changes (7275, 7276, 7280 & 7283)Gravatar robertphillips@google.com2013-01-18
| | | | git-svn-id: http://skia.googlecode.com/svn/trunk@7285 2bbb7eff-a529-9590-31e7-b0007b416f81
* Implement a bicubic resampling image filter, with raster and GPU backends.Gravatar senorblanco@chromium.org2013-01-18
| | | | | | | | | In order to get this to work on the GPU side, I had to modify the width and height of the drawn texture in drawSprite() and drawDevice() to use the filtered texture's dimensions, instead of the source texture. (This wasn't a problem before since all other image filters produce results the same dimensions as their input texture.) For now, this implementation only does axis-aligned scaling (same as the Lanczos-3 implementation in Chrome). It's also done for correctness and clarity, not speed, so there are lots of opportunities for speedups. Review URL: https://codereview.appspot.com/7033049 git-svn-id: http://skia.googlecode.com/svn/trunk@7275 2bbb7eff-a529-9590-31e7-b0007b416f81
* Implementation of the displacement effect (both CPU and GPU)Gravatar sugoi@google.com2013-01-15
| | | | | | | TEST=Added new GM called "displacement" Review URL: https://codereview.appspot.com/7058075 git-svn-id: http://skia.googlecode.com/svn/trunk@7182 2bbb7eff-a529-9590-31e7-b0007b416f81
* Pull SkMergeImageFilter out into its own file.Gravatar senorblanco@chromium.org2012-12-04
| | | | | | Review URL: https://codereview.appspot.com/6873052 git-svn-id: http://skia.googlecode.com/svn/trunk@6662 2bbb7eff-a529-9590-31e7-b0007b416f81
* Break out SkOffsetImageFilter into its own file, and derive it fromGravatar senorblanco@chromium.org2012-11-06
| | | | | | | | SkSingleInputImageFilter, to make it DAG-friendly. Review URL: https://codereview.appspot.com/6822086 git-svn-id: http://skia.googlecode.com/svn/trunk@6315 2bbb7eff-a529-9590-31e7-b0007b416f81
* Add the ability to provide function pointers to SkPicture serializationGravatar scroggo@google.com2012-10-04
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | and deserialization for encoding and decoding bitmaps. Remove kForceFlattenBitmapPixels_Flag, which is no longer used. When an SkOrderedReadBuffer needs to read a bitmap, if it does not have an image decoder, use a dummy bitmap. In GM, add a tolerance option for color differences, used when testing picture serialization, so it can assume two images are the same even though PNG encoding/decoding may have resulted in small differences. Create dummy implementations for SkImageDecoder and SkImageEncoder functions in SkImageDecoder_empty so that a project that does not want to include the images project it can still build. Allow ports to build without images project. In Mac's image encoder, copy 4444 to 8888 before encoding. Add SkWriter32::reservePad, to provide a pointer to write non 4 byte aligned data, padded with zeroes. In bench_ and render_ pictures, pass decode function to SkPicture creation from a stream. BUG=https://code.google.com/p/skia/issues/detail?id=842 Review URL: https://codereview.appspot.com/6551071 git-svn-id: http://skia.googlecode.com/svn/trunk@5818 2bbb7eff-a529-9590-31e7-b0007b416f81
* Make flattenables no longer depend on global static initializers.Gravatar scroggo@google.com2012-09-21
| | | | | | | | | | | | | | | | | Instead, force all builds to call InitializeFlattenables. Remove the make_debugger script, which was created to force rebuilding without global static initializers so that all flattenables would be linked. It is no longer necessary since all flattenables will be linked thanks to InitializeFlattenables, which now can (and must) be called when global static initializers are turned on. BUG=https://code.google.com/p/skia/issues/detail?id=903 BUG=https://code.google.com/p/skia/issues/detail?id=902 Review URL: https://codereview.appspot.com/6548044 git-svn-id: http://skia.googlecode.com/svn/trunk@5642 2bbb7eff-a529-9590-31e7-b0007b416f81
* Yet another speculative Android fix. Unreviewed.Gravatar senorblanco@chromium.org2012-09-19
| | | | git-svn-id: http://skia.googlecode.com/svn/trunk@5600 2bbb7eff-a529-9590-31e7-b0007b416f81
* Make texteffects gm work through serialization and pipe.Gravatar scroggo@google.com2012-09-12
| | | | | | | | | | | | | | | Move Line2DPathEffect (now Sk_) into a separate header file so it can be shared and initialized. Switch to the shared version in SampleAll and SampleSlides. Remove the skip pipe flag from texteffects, since it can now be serialized. I have a separate change to turn serialization on by default at https://codereview.appspot.com/6498121/ Review URL: https://codereview.appspot.com/6503106 git-svn-id: http://skia.googlecode.com/svn/trunk@5512 2bbb7eff-a529-9590-31e7-b0007b416f81
* Proper Android fix, and revert of workaround in r5267. Unreviewed.Gravatar senorblanco@chromium.org2012-08-23
| | | | git-svn-id: http://skia.googlecode.com/svn/trunk@5269 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
* Android build fix (unreviewed).Gravatar senorblanco@chromium.org2012-08-22
| | | | git-svn-id: http://skia.googlecode.com/svn/trunk@5236 2bbb7eff-a529-9590-31e7-b0007b416f81
* Implements the non-Porter-Duff compositing modes required for SVG's feBlendGravatar senorblanco@chromium.org2012-08-22
| | | | | | | | | | | | element. This filter has two inputs, since normal blending can't be used. The GPU side uses two filter stages to accomplish this: one to sample the background, and one to sample the foreground and blend it. Review URL: https://codereview.appspot.com/6463081/ git-svn-id: http://skia.googlecode.com/svn/trunk@5231 2bbb7eff-a529-9590-31e7-b0007b416f81
* Android build fix; unreviewed.Gravatar senorblanco@chromium.org2012-08-20
| | | | git-svn-id: http://skia.googlecode.com/svn/trunk@5199 2bbb7eff-a529-9590-31e7-b0007b416f81
* (Attempt to) fix Android build from r5056, thanks to suggestion by senorblanco@.Gravatar tomhudson@google.com2012-08-13
| | | | git-svn-id: http://skia.googlecode.com/svn/trunk@5062 2bbb7eff-a529-9590-31e7-b0007b416f81
* Add a zoom filter to Skia. This will be used on ChromeOS to implement the ↵Gravatar bsalomon@google.com2012-08-13
| | | | | | | | | | | screen magnifier. Committed on behalf of zork@chromium.org Review URL: http://codereview.appspot.com/6354065/ git-svn-id: http://skia.googlecode.com/svn/trunk@5056 2bbb7eff-a529-9590-31e7-b0007b416f81
* remove SkShape (unused)Gravatar reed@google.com2012-08-09
| | | | | | Review URL: https://codereview.appspot.com/6461069 git-svn-id: http://skia.googlecode.com/svn/trunk@5033 2bbb7eff-a529-9590-31e7-b0007b416f81
* Provide static global initializers for SkColorTable and SkComposeShader.Gravatar scroggo2012-07-02
| | | | | | | | | | This makes some GMs which were broken on Android work. Reenable them on Android. Also fix a typo in gmmain. Review URL: https://codereview.appspot.com/6344069 git-svn-id: http://skia.googlecode.com/svn/trunk@4426 2bbb7eff-a529-9590-31e7-b0007b416f81
* Cleanup flattening code to properly serialize lighting image filters.Gravatar djsollen@google.com2012-06-26
| | | | | | Review URL: https://codereview.appspot.com/6333070 git-svn-id: http://skia.googlecode.com/svn/trunk@4340 2bbb7eff-a529-9590-31e7-b0007b416f81
* Added missing #include in SkGlobalInitialization_default.cpp for Android buildGravatar robertphillips@google.com2012-06-05
| | | | git-svn-id: http://skia.googlecode.com/svn/trunk@4156 2bbb7eff-a529-9590-31e7-b0007b416f81