aboutsummaryrefslogtreecommitdiffhomepage
path: root/gm
Commit message (Collapse)AuthorAge
* Add refcnt'ed immutable vertices class for SkCanvas::drawVertices.Gravatar Brian Salomon2017-02-06
| | | | | | | Change-Id: I44a62f5efc674d0adbbf4a33690c3ded9fab3803 Reviewed-on: https://skia-review.googlesource.com/8040 Reviewed-by: Brian Osman <brianosman@google.com> Commit-Queue: Brian Salomon <bsalomon@google.com>
* Batch across matrix changes in drawVertices and add GM to test.Gravatar Brian Salomon2017-02-03
| | | | | | | Change-Id: I6b08d37781e3c715a1d9d8c9729667ec78625836 Reviewed-on: https://skia-review.googlesource.com/7949 Commit-Queue: Brian Salomon <bsalomon@google.com> Reviewed-by: Robert Phillips <robertphillips@google.com>
* fix up shadow_utils gm dimensionsGravatar Brian Salomon2017-02-03
| | | | | | | Change-Id: I5204296871404065b4d55d53922b7cf05ca5a50f Reviewed-on: https://skia-review.googlesource.com/7990 Reviewed-by: Brian Salomon <bsalomon@google.com> Commit-Queue: Brian Salomon <bsalomon@google.com>
* Add a GM for SkShadowUtils and fix a few issues.Gravatar Brian Salomon2017-02-01
| | | | | | | | | | | | | | | 1) Transform the path center to device space before computing the shadow offset. 2) Modulate the shadow color by the color filter's output color. 3) Make the scale of path points in the spot tessellator be relative to the path centroid. 4) Clamp the shadow alphas at 1. Change-Id: I480476df79b959f11c1eca0ba2a49a134d355cbb Reviewed-on: https://skia-review.googlesource.com/7860 Reviewed-by: Jim Van Verth <jvanverth@google.com> Commit-Queue: Brian Salomon <bsalomon@google.com>
* Reduce use of SkImage_Base::peekTextureGravatar Robert Phillips2017-01-31
| | | | | | | Change-Id: I079093c9706df4911d47fba04b786e59240e8cb4 Reviewed-on: https://skia-review.googlesource.com/7792 Reviewed-by: Brian Salomon <bsalomon@google.com> Commit-Queue: Robert Phillips <robertphillips@google.com>
* Rationalize GrContext's Gr*Proxy getter namingGravatar Robert Phillips2017-01-30
| | | | | | | | | | | | | | | | | | | | | | | | This CL replaces the entry points: asDeferredSurface asDeferredTexture asDeferredRenderTarget with: GrSurfaceProxy* asSurfaceProxy sk_sp<GrSurfaceProxy> asSurfaceProxyRef GrTextureProxy* asTextureProxy sk_sp<GrTextureProxy> asTextureProxyRef GrRenderTargetProxy* asRenderTargetProxy sk_sp<GrRenderTargetProxy> asRenderTargetProxyRef Change-Id: I7c2b1ea3d702023ff23019815ca13c9ff6f3b32d Reviewed-on: https://skia-review.googlesource.com/7741 Commit-Queue: Robert Phillips <robertphillips@google.com> Reviewed-by: Brian Salomon <bsalomon@google.com>
* Push GrTextureProxy down to more effectsGravatar Robert Phillips2017-01-30
| | | | | | | Change-Id: Ie3f32a88f25af082c25bc6daf3fe24e303e80f9e Reviewed-on: https://skia-review.googlesource.com/7616 Commit-Queue: Robert Phillips <robertphillips@google.com> Reviewed-by: Brian Salomon <bsalomon@google.com>
* Update SkJPEGImageEncoderGravatar Matt Sarett2017-01-28
| | | | | | | | | | | | | | (1) Use libjpeg-turbo color space extensions when possible. (2) Use transform_scanline_procs when pre-libjpeg-turbo transformation are required. (3) Add support for Gray and F16. BUG=skia: Change-Id: I77b977cb8c9e0afc17d907dd73a1cf3f16539bcc Reviewed-on: https://skia-review.googlesource.com/7642 Reviewed-by: Leon Scroggins <scroggo@google.com> Commit-Queue: Matt Sarett <msarett@google.com>
* AA GrTessellator: fix bevelling of acute angles.Gravatar Stephen White2017-01-27
| | | | | | | | | | | | | | | | | The code to handle acute outer angles in generated geometry was pretty broken: it did a simple runnning average of consecutive acute vertices, and didn't handle acute angles between the last and first edges. Replaced it with something simpler that does proper bevelling for angles less than 2.5 degrees. This revealed a bug with thin path segments, exposed by the thinconcavepaths test. This will be fixed by upcoming changes, but I've also dded a few more test cases to make it clearer. Change-Id: I23a628ab2e16acaab798c746a5fd87842cacbfab Reviewed-on: https://skia-review.googlesource.com/7660 Reviewed-by: Brian Salomon <bsalomon@google.com> Commit-Queue: Stephan White <senorblanco@chromium.org>
* Generate Android build targets for dm and nanobenchGravatar Leon Scroggins III2017-01-27
| | | | | | | | | | | | | | | Generate targets for dm and nanobench from ninja and add them to the generated Android.bp file. Remove nanobenchAndroid and SkAndroidSDKCanvas. These rely on HWUI internals and are currently unused. Update gyp file references to removed files, just in case. Change-Id: Ic6ae18a70bfd0c33804e7996d077f2081dfdfe07 Reviewed-on: https://skia-review.googlesource.com/7635 Reviewed-by: Mike Klein <mtklein@chromium.org> Commit-Queue: Leon Scroggins <scroggo@google.com>
* Fix gradients gmGravatar Matt Sarett2017-01-26
| | | | | | | | | | | | Some of my local changes slipped into the tree. BUG=skia: Change-Id: I6e452f12608db6b80c5887ccd3cac199cfbf9494 Reviewed-on: https://skia-review.googlesource.com/7625 Reviewed-by: Matt Sarett <msarett@google.com> Reviewed-by: Mike Klein <mtklein@chromium.org> Commit-Queue: Matt Sarett <msarett@google.com>
* Add SkICC::rawTransferFnData()Gravatar Matt Sarett2017-01-26
| | | | | | | | | BUG=skia: Change-Id: I912b044a0091a4d396c954d1ad1d84f5f8d50f56 Reviewed-on: https://skia-review.googlesource.com/7366 Reviewed-by: Mike Reed <reed@google.com> Commit-Queue: Matt Sarett <msarett@google.com>
* Move SkGammaColorFilter to tools, limit to sRGBGravatar Brian Osman2017-01-26
| | | | | | | | | | | Similarly, limit GrGammaEffect to sRGB (and rename it). BUG=skia: Change-Id: I88feef11ab7040bca2fa4c2eed71923ded87a0d0 Reviewed-on: https://skia-review.googlesource.com/7375 Commit-Queue: Brian Osman <brianosman@google.com> Reviewed-by: Brian Salomon <bsalomon@google.com>
* Fix clang warning about unused lambda capture.Gravatar Brian Salomon2017-01-26
| | | | | | | | | This was found by a tip of tree build of clang. Change-Id: I9aa3fecd47ae69350e8d58e796f960a991b7759e Reviewed-on: https://skia-review.googlesource.com/7586 Commit-Queue: Brian Salomon <bsalomon@google.com> Reviewed-by: Mike Klein <mtklein@chromium.org>
* Allow GrSingleTextureEffect to take GrTextureProxiesGravatar Robert Phillips2017-01-24
| | | | | | | Change-Id: I1dd441a5838f665c6815a5c629f5763f43f66e09 Reviewed-on: https://skia-review.googlesource.com/7429 Reviewed-by: Brian Salomon <bsalomon@google.com> Commit-Queue: Robert Phillips <robertphillips@google.com>
* Add F16 and gamma correct support to webp encoderGravatar Matt Sarett2017-01-24
| | | | | | | | | BUG=skia: Change-Id: Ib788466fa1e2bed26e7ffd8f03bee42930eae1d6 Reviewed-on: https://skia-review.googlesource.com/7425 Commit-Queue: Matt Sarett <msarett@google.com> Reviewed-by: Leon Scroggins <scroggo@google.com>
* Make GrYUVEffect take GrTextureProxiesGravatar Robert Phillips2017-01-24
| | | | | | | | | This opens the door for swapping all the effects over to taking GrTextureProxies. Change-Id: I3b03ba93a68f9945c9a8fee008fd170ed57616eb Reviewed-on: https://skia-review.googlesource.com/7344 Reviewed-by: Brian Salomon <bsalomon@google.com> Commit-Queue: Robert Phillips <robertphillips@google.com>
* Temporarily restore colorcube bench and GM files.Gravatar Mike Klein2017-01-24
| | | | | | | | | | | | Just the usual... we don't generate .bp for DM or nanobench yet. See https://skia-review.googlesource.com/c/7363/ and https://googleplex-android-review.git.corp.google.com/#/c/1819530/-1..1 Change-Id: If0098ed8a71a170d5efa773495d5bbf02a1e13fc Reviewed-on: https://skia-review.googlesource.com/7427 Commit-Queue: Mike Klein <mtklein@chromium.org> Reviewed-by: Mike Klein <mtklein@chromium.org>
* Make SkWEBPImageEncoder use transform_scanline_procsGravatar Matt Sarett2017-01-23
| | | | | | | | | | | | This refactor will make it simple to add F16 and GammaCorrect support to the webp encoder. BUG=skia: Change-Id: I379ba2ff0b44d865847877322e86d0c138e727c8 Reviewed-on: https://skia-review.googlesource.com/7356 Reviewed-by: Leon Scroggins <scroggo@google.com> Commit-Queue: Matt Sarett <msarett@google.com>
* change clip-bounds getters to always return the rectGravatar Mike Reed2017-01-23
| | | | | | | | | | | | | | | | | | (actually fixes undefined result in getClipBounds) future CLs - update all callers to new apis - move/rename virtuals BUG=skia: DOCS_PREVIEW= https://skia.org/?cl=7400 Change-Id: I45b93014e915c0d1c36d97d948c9ac8931f23258 Reviewed-on: https://skia-review.googlesource.com/7400 Reviewed-by: Brian Salomon <bsalomon@google.com> Reviewed-by: Cary Clark <caryclark@google.com> Commit-Queue: Mike Reed <reed@google.com>
* Remove SkColorCubeFilter. It is unused.Gravatar Mike Klein2017-01-21
| | | | | | | Change-Id: Iec5fc759e331de24caea1347f9510917260d379b Reviewed-on: https://skia-review.googlesource.com/7363 Reviewed-by: Mike Reed <reed@google.com> Commit-Queue: Mike Klein <mtklein@chromium.org>
* Force Index8 to N32 in deferred texture path.Gravatar Brian Osman2017-01-20
| | | | | | | | | | | | | | | | | Ganesh doesn't support Index8, because GPUs don't really support it. So serializing it in the deferred blob just meant doing an expansion before upload. This forces that to happen when we build the blob. It also paves the way for removing the last usage of MakeTextureFromPixmap, which I'd like to remove. BUG=skia: Change-Id: I7c0292098d71e2f8ec1f9910e1234761822ce957 Reviewed-on: https://skia-review.googlesource.com/7340 Reviewed-by: Robert Phillips <robertphillips@google.com> Reviewed-by: Brian Salomon <bsalomon@google.com> Commit-Queue: Brian Osman <brianosman@google.com>
* Continue making Ganesh use absolute texture coordinates - take 2Gravatar Robert Phillips2017-01-20
| | | | | | | | | | | | The idea here is that the GrCoordTransform will actually hold a GrTextureProxy (rather than a GrTexture) and then, in GrGLSLPrimitiveProcessor::GetTransformMatrix, use the instantiated width & height (when uploading the transform matrix) Relanding of: https://skia-review.googlesource.com/c/6977/ Change-Id: Ibc9b9e354f7fc23b1a6e6e4fe7c9fe3cef771c02 Reviewed-on: https://skia-review.googlesource.com/7265 Reviewed-by: Brian Salomon <bsalomon@google.com> Commit-Queue: Robert Phillips <robertphillips@google.com>
* Revert "explictly fail to draw unpremul, as this is buggy, incomplete, ↵Gravatar Joe Gregorio2017-01-20
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | tricky, and unused" This reverts commit 1baaacac74d24604e3dfca9857fbd647df375997. Reason for revert: Failing the roll: https://storage.googleapis.com/chromium-layout-test-archives/linux_trusty_blink_rel/3868/layout-test-results/results.html Original change's description: > explictly fail to draw unpremul, as this is buggy, incomplete, tricky, and unused > > BUG=skia: > > Change-Id: Ie9da6015cc4955c0f27f6db53fc6ae532e0132f4 > Reviewed-on: https://skia-review.googlesource.com/7304 > Commit-Queue: Mike Reed <reed@google.com> > Reviewed-by: Matt Sarett <msarett@google.com> > TBR=bsalomon@google.com,msarett@google.com,brianosman@google.com,reed@google.com NOPRESUBMIT=true NOTREECHECKS=true NOTRY=true BUG=skia: Change-Id: Ifc808a430b8afe4fef6df3775c2bfdcede1a2dd7 Reviewed-on: https://skia-review.googlesource.com/7329 Commit-Queue: Joe Gregorio <jcgregorio@google.com> Reviewed-by: Joe Gregorio <jcgregorio@google.com>
* Add F16 support to SkPNGImageEncoderGravatar Matt Sarett2017-01-19
| | | | | | | | | | | | BUG=skia: CQ_INCLUDE_TRYBOTS=skia.primary:Test-Ubuntu-GCC-GCE-CPU-AVX2-x86_64-Release-SKNX_NO_SIMD Change-Id: Ifd221365a7b9f9a4a4fc5382621e0da7189e1148 Reviewed-on: https://skia-review.googlesource.com/6526 Reviewed-by: Mike Klein <mtklein@chromium.org> Reviewed-by: Leon Scroggins <scroggo@google.com> Commit-Queue: Matt Sarett <msarett@google.com>
* explictly fail to draw unpremul, as this is buggy, incomplete, tricky, and ↵Gravatar Mike Reed2017-01-19
| | | | | | | | | | | unused BUG=skia: Change-Id: Ie9da6015cc4955c0f27f6db53fc6ae532e0132f4 Reviewed-on: https://skia-review.googlesource.com/7304 Commit-Queue: Mike Reed <reed@google.com> Reviewed-by: Matt Sarett <msarett@google.com>
* Make savelayer_* GM be 565 friendlyGravatar Robert Phillips2017-01-19
| | | | | | | Change-Id: I0594d9e8d2495643a404bddee61d7f01c7c0103c Reviewed-on: https://skia-review.googlesource.com/7263 Reviewed-by: Robert Phillips <robertphillips@google.com> Commit-Queue: Robert Phillips <robertphillips@google.com>
* Implement sk_tool_utils::copy_to_g8(), used by gmsGravatar Matt Sarett2017-01-19
| | | | | | | | | BUG=skia: Change-Id: Ic5b2b07fb3f408edf1f2b982235424c22795fe50 Reviewed-on: https://skia-review.googlesource.com/7187 Reviewed-by: Brian Osman <brianosman@google.com> Commit-Queue: Matt Sarett <msarett@google.com>
* saveLayer experimentsGravatar Robert Phillips2017-01-18
| | | | | | | Change-Id: Ic4f916cf3483244d5a79e32dc287a01dac41a650 Reviewed-on: https://skia-review.googlesource.com/7106 Reviewed-by: Mike Reed <reed@google.com> Commit-Queue: Robert Phillips <robertphillips@google.com>
* Fix code that relied on readPixels not doing color space conversionGravatar Brian Osman2017-01-17
| | | | | | | | | | | | | SampleApp doesn't have (can't easily get) an image, so I couldn't use the new helper function there. It's probably still worth having? BUG=skia: Change-Id: I60c208ff958076015a9539359921b9aff68f25c8 Reviewed-on: https://skia-review.googlesource.com/7129 Reviewed-by: Matt Sarett <msarett@google.com> Reviewed-by: Brian Salomon <bsalomon@google.com> Commit-Queue: Brian Osman <brianosman@google.com>
* Revert "Continue making Ganesh use absolute texture coordinates"Gravatar Joe Gregorio2017-01-17
| | | | | | | | | | | This reverts commit 4493a9dc9df8cf306a974bde7e0e9c5470ebcdc9. Reason for revert: Continuing failures https://luci-milo.appspot.com/swarming/task/33c693c3539a1410 Change-Id: Id371d6df6a875a5f6872f4ebd91b08a354d949de Reviewed-on: https://skia-review.googlesource.com/7125 Commit-Queue: Joe Gregorio <jcgregorio@google.com> Reviewed-by: Joe Gregorio <jcgregorio@google.com>
* Continue making Ganesh use absolute texture coordinatesGravatar Robert Phillips2017-01-17
| | | | | | | | | The idea here is that the GrCoordTransform will actually hold a GrTextureProxy (rather than a GrTexture) and then, in GrGLSLPrimitiveProcessor::GetTransformMatrix, use the instantiated width & height (when uploading the transform matrix) Change-Id: Ibac3a540fcb1967ceef571157d41c1937acfadf8 Reviewed-on: https://skia-review.googlesource.com/6977 Reviewed-by: Brian Salomon <bsalomon@google.com> Commit-Queue: Robert Phillips <robertphillips@google.com>
* Reland "Add SkImageInfoValidConversion() and SkImageInfoIsValid"Gravatar Matt Sarett2017-01-17
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The original is at: https://skia-review.googlesource.com/c/6887/ The only change to the original is to temporarily comment out a check in SkImageInfoPriv.h until a Chrome unit test can be fixed. The idea is share these standards for the following: SkImage::readPixels() SkCanvas::readPixels() SkCanvas::writePixels() SkBitmap::readPixels() SkPixmap::readPixels() On the raster side, SkPixmap::readPixels() is the right place to check, because all raster calls go through there eventually. Then at lower levels (ex: SkPixelInfo), we can assert. There's not really a unifying location for gpu calls, so I've added this in multiple places. I haven't really dug into the gpu code to SkASSERT() on invalid cases that we will have already caught. Follow-up work: Similar refactor for SkReadPixelRec::trim(). Code cleanup in SkPixelInfo::CopyPixels() BUG=skia:6021 Change-Id: I6a16f9479bc09e3c87e10c72b0378579f1a70866 Reviewed-on: https://skia-review.googlesource.com/7104 Reviewed-by: Matt Sarett <msarett@google.com> Commit-Queue: Matt Sarett <msarett@google.com>
* GrTessellator: fix for disappearing thin path.Gravatar Stephen White2017-01-17
| | | | | | | | | | | | | | | | | | simplify_boundary() was incorrectly comparing squared distances against a non-squared constant. For .25 of a pixel, we need to compare against 0.25 squared, or 0.0625. This also includes a fix to get_edge_normal(), We were actually returning edge "vectors", instead of edge normals. This wasn't causing problems, since the error cancels itself out, but it's confusing. BUG=skia: Change-Id: I0d50f2d001ed5e41de2900139c396b9ef75d2ddf Reviewed-on: https://skia-review.googlesource.com/7043 Commit-Queue: Stephan White <senorblanco@chromium.org> Reviewed-by: Brian Salomon <bsalomon@google.com>
* Revert "Add SkImageInfoValidConversion() and SkImageInfoIsValid"Gravatar Brian Osman2017-01-15
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This reverts commit cf5d6caff7a58f1c7ecc36d9a91ccdada5fc7b78. Reason for revert: Chrome DEPS roll failing, based on the unit tests, I suspect this is the cause. Original change's description: > Add SkImageInfoValidConversion() and SkImageInfoIsValid > > The idea is share these standards for the following: > SkImage::readPixels() > SkCanvas::readPixels() > SkCanvas::writePixels() > SkBitmap::readPixels() > SkPixmap::readPixels() > > On the raster side, SkPixmap::readPixels() is the right > place to check, because all raster calls go through > there eventually. Then at lower levels (ex: SkPixelInfo), > we can assert. > > There's not really a unifying location for gpu calls, > so I've added this in multiple places. I haven't really > dug into the gpu code to SkASSERT() on invalid cases > that we will have already caught. > > Follow-up work: > Similar refactor for SkReadPixelRec::trim(). > Code cleanup in SkPixelInfo::CopyPixels() > > BUG=skia:6021 > > Change-Id: I91ecce10e46c1a6530f0af24a9eb8226dbecaaa2 > Reviewed-on: https://skia-review.googlesource.com/6887 > Reviewed-by: Brian Osman <brianosman@google.com> > Reviewed-by: Mike Reed <reed@google.com> > TBR=mtklein@google.com,msarett@google.com,brianosman@google.com,reed@google.com,reviews@skia.org # Not skipping CQ checks because original CL landed > 1 day ago. BUG=skia:6021 Change-Id: I63b88e90bdbb3051a14de00ac73a8351ab776d25 Reviewed-on: https://skia-review.googlesource.com/7095 Commit-Queue: Brian Osman <brianosman@google.com> Reviewed-by: Brian Osman <brianosman@google.com>
* savelayer gmGravatar Mike Reed2017-01-14
| | | | | | | | | BUG=skia: Change-Id: Ie24ed6e450b77447a75b5b9bdd0a4516cca5e85c Reviewed-on: https://skia-review.googlesource.com/7093 Reviewed-by: Mike Reed <reed@google.com> Commit-Queue: Mike Reed <reed@google.com>
* Switch a bunch of tests to use DEF_SIMPLE_GM.Gravatar Stephen White2017-01-13
| | | | | | | | | | | Should be no user- or test-visible changes. BUG=skia: Change-Id: I6499dc978a41fee344b847c118f84227271561c5 Reviewed-on: https://skia-review.googlesource.com/6906 Reviewed-by: Brian Salomon <bsalomon@google.com> Commit-Queue: Stephan White <senorblanco@chromium.org>
* Add SkImageInfoValidConversion() and SkImageInfoIsValidGravatar Matt Sarett2017-01-13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The idea is share these standards for the following: SkImage::readPixels() SkCanvas::readPixels() SkCanvas::writePixels() SkBitmap::readPixels() SkPixmap::readPixels() On the raster side, SkPixmap::readPixels() is the right place to check, because all raster calls go through there eventually. Then at lower levels (ex: SkPixelInfo), we can assert. There's not really a unifying location for gpu calls, so I've added this in multiple places. I haven't really dug into the gpu code to SkASSERT() on invalid cases that we will have already caught. Follow-up work: Similar refactor for SkReadPixelRec::trim(). Code cleanup in SkPixelInfo::CopyPixels() BUG=skia:6021 Change-Id: I91ecce10e46c1a6530f0af24a9eb8226dbecaaa2 Reviewed-on: https://skia-review.googlesource.com/6887 Reviewed-by: Brian Osman <brianosman@google.com> Reviewed-by: Mike Reed <reed@google.com>
* Introduce SkArenaAlloc - should be fast for POD types and RAII for types ↵Gravatar Herb Derby2017-01-13
| | | | | | | | | | | | | | with dtors. - Implementation. - Use in SkLinearPipeline. TBR=mtklein@google.com Change-Id: Ie014184469b217132b0307b5a9ae40c0c60e5fc9 Reviewed-on: https://skia-review.googlesource.com/6921 Reviewed-by: Herb Derby <herb@google.com> Commit-Queue: Herb Derby <herb@google.com>
* Delay SkPaint->GrPaint conversion in text rendering.Gravatar Brian Salomon2017-01-13
| | | | | | | | | | | This fixes an issue where color filters aren't correctly applied to color glyphs. Instead we apply the filter to the SkPaint's color which is correct for mask glyphs only. Add color filter and alpha + various effects to coloremoji gm Change-Id: If77dece71d43468fec65499857eaaaedb56428e9 Reviewed-on: https://skia-review.googlesource.com/6891 Commit-Queue: Brian Salomon <bsalomon@google.com> Reviewed-by: Jim Van Verth <jvanverth@google.com>
* refFoo variant for getters that naturally have a sk_spGravatar Mike Reed2017-01-12
| | | | | | | | | | BUG=skia: Change-Id: I13afa1b81e8a72d93e45fb4d37228be196b0f388 Reviewed-on: https://skia-review.googlesource.com/6923 Reviewed-by: Florin Malita <fmalita@chromium.org> Reviewed-by: Robert Phillips <robertphillips@google.com> Commit-Queue: Mike Reed <reed@google.com>
* GrTessellator: fix artifact with exactly-1-px-wide edges.Gravatar Stephen White2017-01-12
| | | | | | | | | | | | | | | | | | | | | | | | When path features are exactly a pixel wide, the extruded inner edges can become collinear and then be removed, since their winding is zero. We need these edges to be preserved through triangulation, otherwise opaque portions of the geometry can become transparent. Since the simplify() pass can handle zero-winding edges just fine, the the fix is to simply not remove them. In addition, this changes refactors out disconnect() from all the calls to remove_edge_above()/remove_edge_below(). It also renames the remaining function erase_edge() (since it's now unconditional). Add a new test to a new "thinconcavepaths" GM. BUG=680260 NOTRY=true Change-Id: I1d3a436c95a01c4d4ef5dc05503de4312677f65d Reviewed-on: https://skia-review.googlesource.com/6902 Reviewed-by: Brian Salomon <bsalomon@google.com> Commit-Queue: Stephan White <senorblanco@chromium.org>
* Revert "Introduce SkArenaAlloc - should be fast for POD types and RAII for ↵Gravatar Herb Derby2017-01-11
| | | | | | | | | | | | | types with dtors." This reverts commit 6ff51aedda6f3b4873c292d7e03e47ad656543f8. Reason for revert: breaks win2k8 and PDFium Change-Id: Ib1e2db8e523d5d321836ce00e3773def3db8be2f Reviewed-on: https://skia-review.googlesource.com/6898 Commit-Queue: Herb Derby <herb@google.com> Reviewed-by: Herb Derby <herb@google.com>
* Introduce SkArenaAlloc - should be fast for POD types and RAII for types ↵Gravatar Herb Derby2017-01-11
| | | | | | | | | | | | | with dtors. - Implementation. - Use in SkLinearPipeline. TBR=mtklein@google.com Change-Id: Ia8efd09b2f3139a57182889ba84d1610eae92749 Reviewed-on: https://skia-review.googlesource.com/6352 Reviewed-by: Herb Derby <herb@google.com> Commit-Queue: Herb Derby <herb@google.com>
* More fixes for distance field pathsGravatar Jim Van Verth2017-01-11
| | | | | | | | | | | | Disables use of SDFs for very small paths (because of blurring) and adds a border of 1 pixel in device space to handle antialiasing. BUG=chromium:677889 Change-Id: Icd2f7e80323b1255f8de52b97360e9a2d995c765 Reviewed-on: https://skia-review.googlesource.com/6895 Reviewed-by: Brian Salomon <bsalomon@google.com> Commit-Queue: Jim Van Verth <jvanverth@google.com>
* Make GrPaints move their GrProcessor ownership into GrPipelineBuilder.Gravatar Brian Salomon2017-01-11
| | | | | | | | | This makes GrPaints usable only once. In some places we must make copies in order to issue draws with the same paint state. Change-Id: Ie816e5185ce93a064111cad64c6880e1e21184c2 Reviewed-on: https://skia-review.googlesource.com/6844 Reviewed-by: Robert Phillips <robertphillips@google.com> Commit-Queue: Brian Salomon <bsalomon@google.com>
* move SkTRegister.h into toolsGravatar Mike Reed2017-01-11
| | | | | | | | | BUG=skia: Change-Id: Ie7d4fac3024b361a281f456fec2b3a837e2bfe43 Reviewed-on: https://skia-review.googlesource.com/6881 Commit-Queue: Mike Reed <reed@google.com> Reviewed-by: Mike Klein <mtklein@chromium.org>
* Remove SK_LEGACY_FONTMGR_FACTORY.Gravatar Ben Wagner2017-01-11
| | | | | | | | | | | | | SkFontMgr factories now return sk_sp and the legacy factories are no longer used and can be removed. BUG=skia:5077 Change-Id: Ieaff8555b297d1db157f8b78cdd6e7d07a3b5490 Reviewed-on: https://skia-review.googlesource.com/6894 Commit-Queue: Ben Wagner <bungeman@google.com> Commit-Queue: Mike Klein <mtklein@chromium.org> Reviewed-by: Mike Klein <mtklein@chromium.org>
* SkTypes.h : move SkAutoMalloc into SkAutoMalloc.hGravatar Hal Canary2017-01-11
| | | | | | | | | | | | | | | | * SkAutoFree moved to SkTemplates.h (now implmented with unique_ptr). * SkAutoMalloc and SkAutoSMalloc moved to SkAutoMalloc.h * "SkAutoFree X(sk_malloc_throw(N));" --> "SkAutoMalloc X(N);" Revert "Revert 'SkTypes.h : move SkAutoMalloc into SkAutoMalloc.h'" This reverts commit c456b73fef9589bbdc5eb83eaa83e53c357bb3da. Change-Id: Ie2c1a17c20134b8ceab85a68b3ae3e61c24fbaab Reviewed-on: https://skia-review.googlesource.com/6886 Reviewed-by: Hal Canary <halcanary@google.com> Commit-Queue: Hal Canary <halcanary@google.com>
* Revert "More fixes for distance field paths"Gravatar Jim Van Verth2017-01-11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This reverts commit d081ff314f07104adacaadc3d0f8f13dc741f016. Reason for revert: Failing unit tests. Original change's description: > More fixes for distance field paths > > Disables use of SDFs for very small paths (because of blurring) and > adds a border of 1 pixel in device space to handle antialiasing. > > BUG=chromium:677889 > > Change-Id: I81e49477c943d41523fd836e55abd696a985491f > Reviewed-on: https://skia-review.googlesource.com/6832 > Commit-Queue: Jim Van Verth <jvanverth@google.com> > Reviewed-by: Brian Salomon <bsalomon@google.com> > TBR=jvanverth@google.com,bsalomon@google.com,robertphillips@google.com,reviews@skia.org BUG=chromium:677889 NOPRESUBMIT=true NOTREECHECKS=true NOTRY=true Change-Id: I4a6a698fa2e9e58c1c98a5a89f54bed724527951 Reviewed-on: https://skia-review.googlesource.com/6890 Commit-Queue: Jim Van Verth <jvanverth@google.com> Reviewed-by: Jim Van Verth <jvanverth@google.com>