aboutsummaryrefslogtreecommitdiffhomepage
path: root/src
Commit message (Collapse)AuthorAge
* Add clone methods to unit test GrFragmentProcessor classesGravatar Brian Salomon2017-07-28
| | | | | | | | | Also adds testing of copying ImageStorageAccess and ref counts of proxies held by cloned FPs. Change-Id: Ia23220bf65b4df83d1c874b46d8525cc3540f716 Reviewed-on: https://skia-review.googlesource.com/28004 Commit-Queue: Brian Salomon <bsalomon@google.com> Reviewed-by: Robert Phillips <robertphillips@google.com>
* Enable Delta AA by defaultGravatar Yuqian Li2017-07-28
| | | | | | | | | Bug: skia: Change-Id: I1ff9e18cc667d719d7a692555ae5c0f9cdd88993 Reviewed-on: https://skia-review.googlesource.com/27721 Reviewed-by: Cary Clark <caryclark@google.com> Reviewed-by: Florin Malita <fmalita@chromium.org> Commit-Queue: Yuqian Li <liyuqian@google.com>
* Make op-level texture uploading be GrProxy-basedGravatar Robert Phillips2017-07-28
| | | | | | | Change-Id: I898d626eff059fa7c687357b536d09409a174358 Reviewed-on: https://skia-review.googlesource.com/28001 Reviewed-by: Brian Salomon <bsalomon@google.com> Commit-Queue: Robert Phillips <robertphillips@google.com>
* Implement clone for GrLightingEffect descendantsGravatar Brian Salomon2017-07-28
| | | | | | | | | Also use sk_sp for ref management of owned light object. Change-Id: I2fa8427a9374351996c09f992f74cc83008605f1 Reviewed-on: https://skia-review.googlesource.com/28040 Commit-Queue: Brian Salomon <bsalomon@google.com> Reviewed-by: Robert Phillips <robertphillips@google.com>
* Add missing clone method to GrMorphologyEffectGravatar Brian Salomon2017-07-28
| | | | | | | Change-Id: Id0e435e7f8d055db336e5be80ae1c308197dd950 Reviewed-on: https://skia-review.googlesource.com/28042 Reviewed-by: Ethan Nicholas <ethannicholas@google.com> Commit-Queue: Brian Salomon <bsalomon@google.com>
* Make GrGpuCommandBuffer's methods take a GrRenderTargetProxy (rather than a ↵Gravatar Robert Phillips2017-07-28
| | | | | | | | | | | | | | | | | | | | GrRenderTarget) In https://skia-review.googlesource.com/c/26363/ (Remove origin field from GrSurface) I just passed an extra GrSurfaceOrigin parameter to all these methods. Besides being verbose this also led to the "discard" method having an origin (to support the GrVkGpuCommandBuffer). It think this approach is better and is plausible if the GrGpuCommandBuffer is viewed as an intermediary between the GrProxy-based Ops and the Gpu. In isolation this CL doesn't really show why we want to percolate the Proxy down. Once GrSurface no longer has an origin a lot of the GrGpu methods need it passed in explicitly. By having the GrGpuCommandBuffer get the proxy it can then pass the origin to GrGpu and removes a layer of functions with an extra origin parameter. Change-Id: Ie223fdee930171a32a5923155a0322e9a9c2aaa9 Reviewed-on: https://skia-review.googlesource.com/27980 Reviewed-by: Brian Salomon <bsalomon@google.com> Commit-Queue: Robert Phillips <robertphillips@google.com>
* Implement clone for 6 additional GrFragmentProcessor subclasses.Gravatar Brian Salomon2017-07-28
| | | | | | | | | | | | | | | GrMagnifierEffect GrMorphologyEffect GrBicubicEffect GrGaussianConvolutionFragmentProcessor GrMatrixConvolutionEffect GrTextureDomainEffect Bug: skia: Change-Id: I69721b9b95346b365723e5ee21dff2dee8884466 Reviewed-on: https://skia-review.googlesource.com/27900 Commit-Queue: Brian Salomon <bsalomon@google.com> Reviewed-by: Robert Phillips <robertphillips@google.com>
* Remove the now unused GR_PROXY_MOVE macroGravatar Brian Salomon2017-07-28
| | | | | | | Change-Id: I9655a3032aea9c40e87742c76ad9a9ab42a159dc Reviewed-on: https://skia-review.googlesource.com/27841 Reviewed-by: Robert Phillips <robertphillips@google.com> Commit-Queue: Brian Salomon <bsalomon@google.com>
* Don't re-enter mutex in SkFontMgr_fontconfig.Gravatar Ben Wagner2017-07-27
| | | | | | | | | | | | | | | | | | | | | The FCLocker lock cannot be held while calling fTFCache::add. The ~SkTypeface_fontconfig method must take the FCLocker lock to destroy its FcPattern since a typeface may be destroyed by any last owner. However, fTFCache may be the last owner of some of its cached typefaces, and so a purge when calling ::add to make space for the new entry may cause a typeface to be destroyed. As a result, createTypefaceFromFcPattern must not hold the FCLocker lock when calling fTFCache::add. Fortunately, the FCLocker lock is only needed to serialize calls into FontConfig. If acquire and release were free then they would be used around each individual call to FontConfig. As a result it is fine to give up the lock at any point in Skia code so long as no FontConfig calls are made while the FCLocker lock is not held. Change-Id: I37224d4b38bf88ace482496ce7530c84158d2d2e Reviewed-on: https://skia-review.googlesource.com/27663 Reviewed-by: Mike Klein <mtklein@google.com> Commit-Queue: Ben Wagner <bungeman@google.com>
* Pull non-substantive changes out of omnibus GrSurface CLGravatar Robert Phillips2017-07-27
| | | | | | | | | https://skia-review.googlesource.com/c/26363 (Remove origin field from GrSurface) is already too large. This pulls some of the cosmetic changes out for separate review. Change-Id: I1d8b95522144b2f4cbd916ef38faa3dde6f78087 Reviewed-on: https://skia-review.googlesource.com/27840 Reviewed-by: Brian Salomon <bsalomon@google.com> Commit-Queue: Robert Phillips <robertphillips@google.com>
* Remove internal use of SkTypeface::Style.Gravatar Ben Wagner2017-07-27
| | | | | | | Change-Id: I71cf04b12be95a54b7fb47d048ba1f8672ed9a8f Reviewed-on: https://skia-review.googlesource.com/27760 Commit-Queue: Ben Wagner <bungeman@google.com> Reviewed-by: Mike Klein <mtklein@chromium.org>
* switched to infra version of clang-format for skslcGravatar Ethan Nicholas2017-07-27
| | | | | | | Change-Id: I3e993e271cb5e26816d37c70d9ad62acce3ed84c Reviewed-on: https://skia-review.googlesource.com/27800 Reviewed-by: Mike Klein <mtklein@google.com> Commit-Queue: Ethan Nicholas <ethannicholas@google.com>
* Implement clone() for Gradient GrFragmentProcessorsGravatar Brian Salomon2017-07-27
| | | | | | | | | Also removes the hard stop gradient conditional compilation macro. Change-Id: Idd56b5f3061db063d650a0090406ec192acc0b53 Reviewed-on: https://skia-review.googlesource.com/27661 Commit-Queue: Brian Salomon <bsalomon@google.com> Reviewed-by: Greg Daniel <egdaniel@google.com>
* Revert "Remove the temporary flag SK_NO_ANALYTIC_AA"Gravatar Yuqian Li2017-07-27
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | This reverts commit dbce07d80334a89b225280bdd6152c916a0a7919. Reason for revert: need rebaseline in Google3 Original change's description: > Remove the temporary flag SK_NO_ANALYTIC_AA > > It seems that this temp flag lives for too long... > > Bug: skia: > Change-Id: I48b49af8b7f372abac88a8cd5440def3791e635a > Reviewed-on: https://skia-review.googlesource.com/27662 > Reviewed-by: Cary Clark <caryclark@google.com> > Reviewed-by: Florin Malita <fmalita@chromium.org> > Commit-Queue: Yuqian Li <liyuqian@google.com> TBR=caryclark@google.com,fmalita@chromium.org,liyuqian@google.com,reed@google.com Change-Id: I35a91923f16f4e1f530fae20599240cde73438b6 No-Presubmit: true No-Tree-Checks: true No-Try: true Bug: skia: Reviewed-on: https://skia-review.googlesource.com/27722 Reviewed-by: Yuqian Li <liyuqian@google.com> Commit-Queue: Yuqian Li <liyuqian@google.com>
* Remove GrTraceMarker and friendsGravatar Brian Osman2017-07-27
| | | | | | | | | | This has been disabled for almost two years. Bug: skia: Change-Id: Idc1dbf2220514947d2ccd91968e6e173d44d1b86 Reviewed-on: https://skia-review.googlesource.com/27740 Reviewed-by: Brian Salomon <bsalomon@google.com> Commit-Queue: Brian Osman <brianosman@google.com>
* Remove the temporary flag SK_NO_ANALYTIC_AAGravatar Yuqian Li2017-07-27
| | | | | | | | | | | It seems that this temp flag lives for too long... Bug: skia: Change-Id: I48b49af8b7f372abac88a8cd5440def3791e635a Reviewed-on: https://skia-review.googlesource.com/27662 Reviewed-by: Cary Clark <caryclark@google.com> Reviewed-by: Florin Malita <fmalita@chromium.org> Commit-Queue: Yuqian Li <liyuqian@google.com>
* rearrange SkJumper registers on 32-bit x86Gravatar Mike Klein2017-07-27
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | There are not many registers on 32-bit x86, and we're using most to pass Stage function arguments. This means few are available as temporaries, and we're forced to hit the stack all the time. xmm registers are the most egregious example: we use all 8 registers pass data, leaving none free as temporaries. This CL cuts things down pretty dramatically, from passing 5 general purpose and 8 xmm registers to 2 general purpose and 4 xmm registers. One of the two general purpose registers is a pointer to space on the stack where we store all those other values. Every stage function needs to use the program pointer, so that stays in a general purpose register. Almost every stage uses the r,g,b,a vectors, so they stay in xmm registers. The rest (destination x,y, the tail mask, a pointer to tricky constants, and the dr,dg,db,da vectors) now live on the stack. The generated code is about 20K smaller and runs about 20% faster. $ out/monobench SkRasterPipeline_srgb 200 Before: 358.784ns After: 282.563ns Change-Id: Icc117af95c1a81c41109984b32e0841022f0d1a6 Reviewed-on: https://skia-review.googlesource.com/27620 Reviewed-by: Florin Malita <fmalita@chromium.org> Commit-Queue: Mike Klein <mtklein@chromium.org>
* Make StencilPathArgs hold a GrRenderTargetProxy (rather than a GrRenderTarget)Gravatar Robert Phillips2017-07-27
| | | | | | | | | Again, this will be useful when GrSurface does not have a origin field. Change-Id: I0c4ef5b441eaf38f3489e8631aced11b11fdb6ac Reviewed-on: https://skia-review.googlesource.com/27540 Reviewed-by: Brian Salomon <bsalomon@google.com> Commit-Queue: Robert Phillips <robertphillips@google.com>
* clean up SK_SUPPORT_LEGACY_WIN32_JUMPERGravatar Mike Klein2017-07-27
| | | | | | | Change-Id: Icae3c6ce80a0bef097ea1010a4d065cc9d5a4c88 Reviewed-on: https://skia-review.googlesource.com/27560 Reviewed-by: Mike Klein <mtklein@chromium.org> Commit-Queue: Mike Klein <mtklein@chromium.org>
* Implement GrFragmentProcessor::clone for 6 additional subclasses.Gravatar Brian Salomon2017-07-27
| | | | | | | | | | | | | PremulInputFragmentProcessor UnpremulInputFragmentProcessor PremulFragmentProcessor ReplaceInputFragmentProcessor SeriesFragmentProcessor Change-Id: Ided1a6c6b66e12bfd8ee005950443333cc23b830 Reviewed-on: https://skia-review.googlesource.com/26680 Reviewed-by: Brian Osman <brianosman@google.com> Commit-Queue: Brian Salomon <bsalomon@google.com>
* Remove Gr1DKernelEffect "helper" class.Gravatar Brian Salomon2017-07-27
| | | | | | | Change-Id: I748e49eeacb782fb738c08d5475c442dbce3ad5a Reviewed-on: https://skia-review.googlesource.com/27500 Commit-Queue: Brian Salomon <bsalomon@google.com> Reviewed-by: Ethan Nicholas <ethannicholas@google.com>
* Implement clone() for 4 additional GrFragmentProcessor subclassesGravatar Brian Salomon2017-07-27
| | | | | | | | | | | | HighContrastFilterEffect LumaColorFilterEffect OverdrawFragmentProcessor RRectsGaussianEdgeFP Change-Id: Ie843e025e49dd46e3f75a5f79d399ddd3ceba5cd Reviewed-on: https://skia-review.googlesource.com/26660 Commit-Queue: Brian Salomon <bsalomon@google.com> Reviewed-by: Greg Daniel <egdaniel@google.com>
* Expose srgbDecodeDisableSupport in GrCapsGravatar Brian Osman2017-07-27
| | | | | | | | | | | This will allow Flutter to workaround the lack of this extension on a small number of devices. Bug: skia: Change-Id: I46e54aaffc0551a7a17758ebc2016b39bda19abf Reviewed-on: https://skia-review.googlesource.com/27440 Reviewed-by: Brian Salomon <bsalomon@google.com> Commit-Queue: Brian Osman <brianosman@google.com>
* Unify DAA and AAA usage decisionGravatar Yuqian Li2017-07-27
| | | | | | | | Bug: skia: Change-Id: I2481d872e072fdd638640ef2306aa89c1a1d6d94 Reviewed-on: https://skia-review.googlesource.com/26801 Commit-Queue: Yuqian Li <liyuqian@google.com> Reviewed-by: Cary Clark <caryclark@google.com>
* Revert "Revert "Fix SkPathRef deserialization malloc crash""Gravatar Mike Reed2017-07-27
| | | | | | | | | | | | | | | | This reverts commit a4ce4b1f6bef22e7ca5c7a952197fc2bc70923fc. Fix SkPathRef deserialization malloc crash If the path says it has more points/verbs/etc than the buffer could be holding, then resetToSize could try to allocate something huge and crash. Bug: skia: Change-Id: I23b8870e9f74386aca89fb8f9a60d3b452044094 Reviewed-on: https://skia-review.googlesource.com/26805 Commit-Queue: Mike Klein <mtklein@chromium.org> Reviewed-by: Mike Klein <mtklein@chromium.org>
* Remove GrSingleTextureEffectGravatar Brian Salomon2017-07-26
| | | | | | | Change-Id: I510cc0657f9433b206dc2ab643fa557667263294 Reviewed-on: https://skia-review.googlesource.com/27180 Commit-Queue: Brian Salomon <bsalomon@google.com> Reviewed-by: Ethan Nicholas <ethannicholas@google.com>
* remove SK_SUPPORT_LEGACY_CODEC_NEW dead codeGravatar Mike Reed2017-07-26
| | | | | | | | Bug: skia: Change-Id: I59185b8acc00b6df854c613ba29d1002111fcb42 Reviewed-on: https://skia-review.googlesource.com/27240 Commit-Queue: Mike Klein <mtklein@google.com> Reviewed-by: Mike Klein <mtklein@google.com>
* Make GrPipeline hold a GrRenderTargetProxy (instead of a GrRenderTarget)Gravatar Robert Phillips2017-07-26
| | | | | | | | | | | In a future world where GrSurface no longer has an origin it will be useful for the GrPipeline to be holding the GrRenderTargetProxy (which will still have an origin). Change-Id: I743a8cc07b6b92f8116227fb77b7c37da43cde8a Reviewed-on: https://skia-review.googlesource.com/26804 Reviewed-by: Brian Salomon <bsalomon@google.com> Commit-Queue: Robert Phillips <robertphillips@google.com>
* moved changes out of autogenerated .cpp file and into source .fp fileGravatar Ethan Nicholas2017-07-26
| | | | | | | | Bug: skia: Change-Id: Ia849b8745d10fe252eee04ae9444b98befac6e76 Reviewed-on: https://skia-review.googlesource.com/26700 Reviewed-by: Brian Salomon <bsalomon@google.com> Commit-Queue: Ethan Nicholas <ethannicholas@google.com>
* Don't clamp in GrGLNonlinearColorSpaceXformEffect to support scRGBGravatar Stan Iliev2017-07-26
| | | | | | | | | | | Remove color clamp to allow for negative and greater than 1.0 values, when converting to scRGB. Bug: b/62347704 Change-Id: I5b811d5dd464cf3bb126ad435a7d27c4563fdacc Reviewed-on: https://skia-review.googlesource.com/26862 Commit-Queue: Stan Iliev <stani@google.com> Reviewed-by: Brian Osman <brianosman@google.com>
* Implement GrFragmentProcessor::clone() for lighting and perlin noise classesGravatar Brian Salomon2017-07-26
| | | | | | | Change-Id: I4c6d426f170711a06d833257422092bb4b9de20c Reviewed-on: https://skia-review.googlesource.com/26945 Reviewed-by: Ethan Nicholas <ethannicholas@google.com> Commit-Queue: Brian Salomon <bsalomon@google.com>
* Compose and YUV fragment processor clone implementationsGravatar Brian Salomon2017-07-26
| | | | | | | Change-Id: If4d9f1aaf0e5939afb5ad5825d7198db18541926 Reviewed-on: https://skia-review.googlesource.com/27060 Reviewed-by: Robert Phillips <robertphillips@google.com> Commit-Queue: Brian Salomon <bsalomon@google.com>
* Revert "Fix SkPathRef deserialization malloc crash"Gravatar Mike Reed2017-07-26
| | | | | | | | | | | | | | | | | | | | | | | | | | | | This reverts commit df6660f64e4d915de7471c3daa67f9b68037ff3f. Reason for revert: crashing dm on android and windows Original change's description: > Fix SkPathRef deserialization malloc crash > > If the path says it has more points/verbs/etc than the buffer could > be holding, then resetToSize could try to allocate something huge > and crash. > > Change-Id: I40e8db87e4f61abb23217281ab0365c6af222fa3 > Reviewed-on: https://skia-review.googlesource.com/24802 > Reviewed-by: Mike Reed <reed@google.com> > Commit-Queue: Mike Reed <reed@google.com> TBR=bungeman@google.com,reed@google.com,enne@chromium.org Change-Id: I06fa89c05b785652b097ae04e7ebc001a7c176b2 No-Presubmit: true No-Tree-Checks: true No-Try: true Reviewed-on: https://skia-review.googlesource.com/26944 Reviewed-by: Mike Reed <reed@google.com> Commit-Queue: Mike Reed <reed@google.com>
* More GrFragmentProcessor::clone() implementations.Gravatar Brian Salomon2017-07-26
| | | | | | | | | | | | | GrSRGBEffect EllipticalRRectEffect CircularRRectEffect GrNonlinearColorSpaceXformEffect GrDeviceSpaceTextureDecalFragmentProcessor Change-Id: I701fb7ed36e66414adba2eea73f6eed306691b49 Reviewed-on: https://skia-review.googlesource.com/26942 Reviewed-by: Ethan Nicholas <ethannicholas@google.com> Commit-Queue: Brian Salomon <bsalomon@google.com>
* Fix SkPathRef deserialization malloc crashGravatar Adrienne Walker2017-07-26
| | | | | | | | | | | If the path says it has more points/verbs/etc than the buffer could be holding, then resetToSize could try to allocate something huge and crash. Change-Id: I40e8db87e4f61abb23217281ab0365c6af222fa3 Reviewed-on: https://skia-review.googlesource.com/24802 Reviewed-by: Mike Reed <reed@google.com> Commit-Queue: Mike Reed <reed@google.com>
* Implement clone for 4 additional GrFragmentProcessors.Gravatar Brian Salomon2017-07-26
| | | | | | | | | | | | GrConfigConversionEffect GrConstColorProcessor GrConvexPolyEffect AARectEffect Change-Id: I3b103ed045db0825fc193ee7d6e61c8fe8e5c634 Reviewed-on: https://skia-review.googlesource.com/26842 Reviewed-by: Robert Phillips <robertphillips@google.com> Commit-Queue: Brian Salomon <bsalomon@google.com>
* Use ifdef instead of ifndefGravatar Yuqian Li2017-07-26
| | | | | | | | Bug: skia: Change-Id: I9f86f71247379713ffaf14e5c704c2ac4c6f9cbd Reviewed-on: https://skia-review.googlesource.com/26861 Reviewed-by: Mike Reed <reed@google.com> Commit-Queue: Yuqian Li <liyuqian@google.com>
* SkPDF: Use DeviceGray for alpha masks.Gravatar Hal Canary2017-07-26
| | | | | | | | | | See https://groups.google.com/forum/#!topic/pdf-dev/qmdjg3w7D8E BUG=chromium:742058 Change-Id: Ia8c204a92cb2b9fc33fab60826a95e359db65f08 Reviewed-on: https://skia-review.googlesource.com/26822 Commit-Queue: Hal Canary <halcanary@google.com> Reviewed-by: Ben Wagner <bungeman@google.com>
* add Make factory to SkMemoryStream (simplify call-sites)Gravatar Mike Reed2017-07-26
| | | | | | | | Bug: skia:6888 Change-Id: Ia4e432673ed089a91229697c8dde0489f220000d Reviewed-on: https://skia-review.googlesource.com/26884 Reviewed-by: Mike Reed <reed@google.com> Commit-Queue: Mike Reed <reed@google.com>
* Normalize canvas tracingGravatar Brian Osman2017-07-26
| | | | | | | | | | | | | | Only trace the non-virtual entry points, and only the last such function on any chain before dispatching to the onXXX virtual. Cuts down on nested event chatter, and adds in events for several draw functions that had no tracing at all. Bug: skia: Change-Id: I89648769d4c900e27159e4f51af889347fc0f196 Reviewed-on: https://skia-review.googlesource.com/26900 Commit-Queue: Brian Osman <brianosman@google.com> Reviewed-by: Mike Klein <mtklein@chromium.org>
* Further reduce stack size according to -fstack-usageGravatar Yuqian Li2017-07-26
| | | | | | | | | | | It seems that google3 is using -fstack-usage to determine whether we exceed 16k. Bug: skia: Change-Id: I259ff7fc0e6614dde83eb340f0a17efbc52ebf57 Reviewed-on: https://skia-review.googlesource.com/26940 Reviewed-by: Yuqian Li <liyuqian@google.com> Commit-Queue: Yuqian Li <liyuqian@google.com>
* Automatically prepend "disabled-by-default-" to TRACE categoriesGravatar Brian Osman2017-07-26
| | | | | | | | | | | Ensures that all Skia events are disabled by default in Chrome, and eliminates redundant typing. Bug: skia: Change-Id: I289c5e5a01084fcf4cccf512da65a4727f4aeca2 Reviewed-on: https://skia-review.googlesource.com/26880 Commit-Queue: Mike Klein <mtklein@chromium.org> Reviewed-by: Mike Klein <mtklein@chromium.org>
* Further reduce google3 stack sizeGravatar Yuqian Li2017-07-26
| | | | | | | | | | | It seems that the compiler added the stack size of two "if" branches, rather than get the max of them... Bug: skia: Change-Id: Idf6b47cafd84c9a53a7b8dafb38f815e08094100 Reviewed-on: https://skia-review.googlesource.com/26780 Reviewed-by: Yuqian Li <liyuqian@google.com> Commit-Queue: Yuqian Li <liyuqian@google.com>
* Tracing macro cleanup continuedGravatar Brian Osman2017-07-26
| | | | | | | | | | | - Remove one especially chatty event, and one pointless test - Use TRACE_FUNC everywhere, rather than manual strings Bug: skia: Change-Id: Icb795294009150ca9a260436738d79546a733337 Reviewed-on: https://skia-review.googlesource.com/26701 Reviewed-by: Mike Klein <mtklein@chromium.org> Commit-Queue: Brian Osman <brianosman@google.com>
* guard SkTableColorFilter against out-of-range inputsGravatar Mike Klein2017-07-26
| | | | | | | | | | | | | | I was going to be clever here and only clamp when we know the inputs are out of range, but this filter is rare and slow enough that I think I'd rather it just be super paranoid safe. The test crashes without this fix and passes with it. Change-Id: I4e17aad2b5c1e96180ce8d73b97bee746cf985c2 Reviewed-on: https://skia-review.googlesource.com/26702 Commit-Queue: Brian Osman <brianosman@google.com> Reviewed-by: Brian Osman <brianosman@google.com>
* Fix flutter and g3 buildGravatar Yuqian Li2017-07-26
| | | | | | | | | | | Replace deprecated function call and reduce stack usage in g3 Bug: skia: Change-Id: Ib49ccecef4711c92ea2e62e772d98c0f5097e30d TBR: reed@google.com, caryclark@google.com Reviewed-on: https://skia-review.googlesource.com/26565 Reviewed-by: Yuqian Li <liyuqian@google.com> Commit-Queue: Yuqian Li <liyuqian@google.com>
* New analytic AA scan converter using delta (I call it DAA for now)Gravatar Yuqian Li2017-07-25
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | DAA is: 1. Much simpler than AAA. SkScan_AAAPath.cpp is about 1700 lines. SkScan_DAAPath.cpp is about 300 lines. The whole DAA CL is only about 800 lines. 2. Much faster than AAA for complicated paths. The speedup applies to GL backend (including ccpr)! Here's the frame time of 'SampleApp --slide Chart' on macbook pro: AAA-raster: 33ms DAA-raster: 21ms AAA-gl: 30ms DAA-gl: 20ms AAA-ccpr: 18ms DAA-ccpr: 12ms My linux desktop doesn't have SSE3 so the speedup is smaller (~25% for Chart). I believe that DAA is so fast that I can enable it for any paths (AAA is not enabled by default for complicated paths because it is slow; hence our older supersampling scan converter is used for stroking on Chart for AAA-xxx config.) 3. The SkCoverageDelta is suitable for threaded backend with out-of-order concurrent scan conversion as commented in the source code. Maybe we can also just send deltas to GPU. 4. Similar to most analytic path renderers, the quality is on the best ground-truth level, unless there are intersections within a pixel. The intersections look good to my eyes although theoretically that could be arbitrary far from the ground truth (see my AAA slides). 5. For simple paths, such as circle, triangle, rrect, etc., DAA is slower than AAA. But DAA is faster than our older supersampling scan converter in most cases. As those simple paths usually don't constitute the bottleneck of a picture (skp or svg), I strongly recommend use DAA. 6. DAA also heavily favors blitMask so it may work quite well with SkRasterPipeline and SkRasterPipelineBlitter. Finally, please check https://skia-review.googlesource.com/c/22420/ which accelerate DAA by specializing blitCoverageDeltas for SkARGB32_Blitter and SkARGB32_Black_Blitter. It brings a little(<5%) speedup. But I couldn't figure out how to reduce the duplicate code so I don't intend to land it. Bug: skia: Change-Id: I3b7ed6a727447922e645b1acb737a506e7c09a4c Reviewed-on: https://skia-review.googlesource.com/19666 Reviewed-by: Mike Reed <reed@google.com> Reviewed-by: Cary Clark <caryclark@google.com> Commit-Queue: Yuqian Li <liyuqian@google.com>
* Implement clone() for GrDisplacementEffectGravatar Brian Salomon2017-07-25
| | | | | | | | | | | | This also adds copy constructors for: GrTextureDomain GrFragmentProcessor::TextureSampler GrCoordTransform Change-Id: I23cb85113e236f8b6fd1d91163c80d2a41931691 Reviewed-on: https://skia-review.googlesource.com/26621 Reviewed-by: Ethan Nicholas <ethannicholas@google.com> Reviewed-by: Robert Phillips <robertphillips@google.com> Commit-Queue: Brian Salomon <bsalomon@google.com>
* fix legacy compileGravatar Mike Reed2017-07-25
| | | | | | | Bug: skia: Change-Id: I81953c3c980ef88b168b3a9f9ce94445d0a61218 Reviewed-on: https://skia-review.googlesource.com/26623 Reviewed-by: Mike Reed <reed@google.com>
* Always postConcat() pipeline gradient matricesGravatar Florin Malita2017-07-25
| | | | | | | | | | | | | In order to unblock https://skia-review.googlesource.com/c/26564 & https://skia-review.googlesource.com/c/26427, switch all impls to use a single/atomic postConcat for the gradient matrix. This is much easier to guard than the changes above. Change-Id: Ib72dbc7b5a56a96390f4468fd12caf8b6a0e46ef Reviewed-on: https://skia-review.googlesource.com/26620 Reviewed-by: Mike Klein <mtklein@chromium.org> Commit-Queue: Florin Malita <fmalita@chromium.org>