aboutsummaryrefslogtreecommitdiffhomepage
Commit message (Collapse)AuthorAge
* Pass GrAppliedClip to pipeline creation.Gravatar Brian Salomon2017-01-17
| | | | | | | | | This skips adding the clip's coverage processor to the GrPipelineBuilder before creating GrPipeline. Change-Id: I1282dd8600701ab2b6a049abd8ad571abbbcbbe5 Reviewed-on: https://skia-review.googlesource.com/7020 Commit-Queue: Brian Salomon <bsalomon@google.com> Reviewed-by: Robert Phillips <robertphillips@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>
* Revert "Revert "Enforce our rules about valid images when making textures""Gravatar Brian Osman2017-01-17
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This reverts commit 8bbdd49805bd77fec61e6e31f59d31a361e8be30. Reason for revert: Original change re-landed. Original change's description: > Revert "Enforce our rules about valid images when making textures" > > This reverts commit 7035f3c466826a4116e2f31deb64d1645ea9441b. > > Reason for revert: Need to revert earlier change to fix DEPS roll. > > Original change's description: > > Enforce our rules about valid images when making textures > > > > I'm working to make GrUploadPixmapToTexture more robust > > and easier to follow. This is one step on that journey. > > > > BUG=skia: > > > > Change-Id: I3ac39057e20ff8249843bb41ceca25f629aff31c > > Reviewed-on: https://skia-review.googlesource.com/7037 > > Commit-Queue: Brian Osman <brianosman@google.com> > > Reviewed-by: Matt Sarett <msarett@google.com> > > Reviewed-by: Brian Salomon <bsalomon@google.com> > > > > TBR=bsalomon@google.com,msarett@google.com,robertphillips@google.com,brianosman@google.com > NOPRESUBMIT=true > NOTREECHECKS=true > NOTRY=true > BUG=skia: > > Change-Id: I1d7fef2d3777f0fcabc6c36749908409bd31a0f1 > Reviewed-on: https://skia-review.googlesource.com/7094 > Commit-Queue: Brian Osman <brianosman@google.com> > Reviewed-by: Brian Osman <brianosman@google.com> > TBR=bsalomon@google.com,msarett@google.com,robertphillips@google.com,brianosman@google.com # Not skipping CQ checks because original CL landed > 1 day ago. BUG=skia: Change-Id: I53319ebca4b13175014e6000d7b613932d02612b Reviewed-on: https://skia-review.googlesource.com/7114 Commit-Queue: Brian Osman <brianosman@google.com> Reviewed-by: Brian Osman <brianosman@google.com>
* Remove (most) usage of MakeTextureFromPixmapGravatar Brian Osman2017-01-17
| | | | | | | | | | | | | | Planning to remove this API entirely, as it's not really needed. There is one remaining call-site that requires a bigger change, so I want to land these first. BUG=skia: Change-Id: I6c6ae88202291c4896c1ba8f47824596ac8a150f Reviewed-on: https://skia-review.googlesource.com/7105 Reviewed-by: Brian Salomon <bsalomon@google.com> Reviewed-by: Robert Phillips <robertphillips@google.com> Commit-Queue: Brian Osman <brianosman@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>
* Simplify GrProcOptInfo initialization.Gravatar Brian Salomon2017-01-17
| | | | | | | | | | | | | Removes unused single channel tracking. Makes it so that only the op/gp can initiate lcd coverage. Makes GrProcOptInfo fragment processor analysis continuable. Change-Id: I003a8aa3836bb64d04b230ddee581dc500e613a9 Reviewed-on: https://skia-review.googlesource.com/7039 Reviewed-by: Greg Daniel <egdaniel@google.com> Commit-Queue: Brian Salomon <bsalomon@google.com>
* hide getClipStackGravatar Mike Reed2017-01-17
| | | | | | | | | BUG=skia:6122 Change-Id: I0aca03b349541174ced019f4f2116e0015c980c4 Reviewed-on: https://skia-review.googlesource.com/7097 Reviewed-by: Florin Malita <fmalita@chromium.org> Commit-Queue: Mike Reed <reed@google.com>
* add and test SkFixed15::to_u8()Gravatar Mike Klein2017-01-17
| | | | | | | Change-Id: Iedbcd2d938122cdc8f6b235745eb6165e348c237 Reviewed-on: https://skia-review.googlesource.com/7108 Commit-Queue: Mike Klein <mtklein@chromium.org> Reviewed-by: Herb Derby <herb@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>
* Add a bench to exercise legacy-mode SkRasterPipeline behavior.Gravatar Mike Klein2017-01-17
| | | | | | | | | | No fancy f16 or sRGB here... just good old legacy 8888. Change-Id: I21eb7c0d8e2c7a7d92e9d8a8bae9d318c4daa7e5 Reviewed-on: https://skia-review.googlesource.com/7109 Reviewed-by: Mike Klein <mtklein@chromium.org> Reviewed-by: Herb Derby <herb@google.com> Commit-Queue: Mike Klein <mtklein@chromium.org>
* SkSplicer: fix a typo in srcover stage.Gravatar Mike Klein2017-01-17
| | | | | | | | Change-Id: Iafd23c860395587c77cd412a3b522ba851b4570d Reviewed-on: https://skia-review.googlesource.com/7107 Commit-Queue: Mike Klein <mtklein@chromium.org> Reviewed-by: Mike Klein <mtklein@chromium.org> Reviewed-by: Herb Derby <herb@google.com>
* do/while loops in SPIR-V no longer cause an assertion failureGravatar Ethan Nicholas2017-01-17
| | | | | | | | | BUG=skia: Change-Id: Ic5f590879d8ada5d4580b5c6e9091ccc9532be4b Reviewed-on: https://skia-review.googlesource.com/6605 Reviewed-by: Greg Daniel <egdaniel@google.com> Commit-Queue: Ethan Nicholas <ethannicholas@google.com>
* Update Buildbot doc for Task SchedulerGravatar Eric Boren2017-01-17
| | | | | | | | | | | | BUG=skia:6118 NOTRY=true DOCS_PREVIEW= https://skia.org/?cl=7023 Change-Id: I398f4fd98959bb37bcb5499d38e517542e0df90f Reviewed-on: https://skia-review.googlesource.com/7023 Commit-Queue: Ben Wagner <benjaminwagner@google.com> Reviewed-by: Ben Wagner <benjaminwagner@google.com>
* Test PGGravatar Ravi Mistry2017-01-17
| | | | | | | | | | | CQ_INCLUDE_TRYBOTS=skia.primary:Test-Ubuntu-GCC-GCE-CPU-AVX2-x86_64-Release-SKNX_NO_SIMD NOTRY=true BUG=skia: Change-Id: Ida204d1c58671c4d79d6fc3d95bf8ddf3cef77b4 Reviewed-on: https://skia-review.googlesource.com/7103 Commit-Queue: Ravi Mistry <rmistry@google.com> Reviewed-by: Ravi Mistry <rmistry@google.com>
* Temporarily restore FixedAllocTest.cppGravatar Mike Klein2017-01-17
| | | | | | | | | | This adds it back as an empty file, so that the existing Android DM build keeps working. We can remove it once DM's Android build config is generated with gn_to_bp.py too. Change-Id: I27b8ff480044a0824d24395c4498bf593cdd9747 Reviewed-on: https://skia-review.googlesource.com/7102 Reviewed-by: Mike Klein <mtklein@chromium.org>
* Move recipe modules to shared repoGravatar Eric Boren2017-01-17
| | | | | | | | | | BUG=skia:6070 Change-Id: I6c487e77ddfddb6164b983981dff5ee8ae870376 Reviewed-on: https://skia-review.googlesource.com/6946 Commit-Queue: Eric Boren <borenet@google.com> Reviewed-by: Ravi Mistry <rmistry@google.com> Reviewed-by: Stephan Altmueller <stephana@google.com>
* Split ShadowMaskFilter into separate ambient and spot mask filtersGravatar Jim Van Verth2017-01-16
| | | | | | | | | | | | This does not change the public API. BUG=skia:6119 Change-Id: Ibdcd2f8611bc2eec332d8a65e5d51246b89a0a90 Reviewed-on: https://skia-review.googlesource.com/7083 Commit-Queue: Jim Van Verth <jvanverth@google.com> Reviewed-by: Jim Van Verth <jvanverth@google.com> Reviewed-by: Robert Phillips <robertphillips@google.com>
* Remove SkFallbackAlloc and SkFixedAlloc.Gravatar Herb Derby2017-01-16
| | | | | | | | | | | CQ_INCLUDE_TRYBOTS=skia.primary:Test-Ubuntu-Clang-GCE-CPU-AVX2-x86_64-Debug-ASAN;skia.primary:Test-Ubuntu-Clang-GCE-CPU-AVX2-x86_64-Debug-MSAN TBR=reed@google.com Change-Id: I1000dc9ed8ad65b249798759d9af99f47fc237d2 Reviewed-on: https://skia-review.googlesource.com/6809 Reviewed-by: Herb Derby <herb@google.com> Commit-Queue: Herb Derby <herb@google.com>
* Update SKP versionGravatar UpdateSKPs2017-01-16
| | | | | | | | | | | | Automatic commit by the RecreateSKPs bot. TBR=update-skps@skia.org NO_MERGE_BUILDS Change-Id: I029f220cc2d35d6567e02dbaea3a118ef60ded77 Reviewed-on: https://skia-review.googlesource.com/7042 Reviewed-by: update-skps <update-skps@skia.org> Commit-Queue: update-skps <update-skps@skia.org>
* 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>
* Revert "Enforce our rules about valid images when making textures"Gravatar Brian Osman2017-01-14
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This reverts commit 7035f3c466826a4116e2f31deb64d1645ea9441b. Reason for revert: Need to revert earlier change to fix DEPS roll. Original change's description: > Enforce our rules about valid images when making textures > > I'm working to make GrUploadPixmapToTexture more robust > and easier to follow. This is one step on that journey. > > BUG=skia: > > Change-Id: I3ac39057e20ff8249843bb41ceca25f629aff31c > Reviewed-on: https://skia-review.googlesource.com/7037 > Commit-Queue: Brian Osman <brianosman@google.com> > Reviewed-by: Matt Sarett <msarett@google.com> > Reviewed-by: Brian Salomon <bsalomon@google.com> > TBR=bsalomon@google.com,msarett@google.com,robertphillips@google.com,brianosman@google.com NOPRESUBMIT=true NOTREECHECKS=true NOTRY=true BUG=skia: Change-Id: I1d7fef2d3777f0fcabc6c36749908409bd31a0f1 Reviewed-on: https://skia-review.googlesource.com/7094 Commit-Queue: Brian Osman <brianosman@google.com> Reviewed-by: Brian Osman <brianosman@google.com>
* Enforce our rules about valid images when making texturesGravatar Brian Osman2017-01-14
| | | | | | | | | | | | | I'm working to make GrUploadPixmapToTexture more robust and easier to follow. This is one step on that journey. BUG=skia: Change-Id: I3ac39057e20ff8249843bb41ceca25f629aff31c Reviewed-on: https://skia-review.googlesource.com/7037 Commit-Queue: Brian Osman <brianosman@google.com> Reviewed-by: Matt Sarett <msarett@google.com> Reviewed-by: Brian Salomon <bsalomon@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>
* Revert "Exercise concave analytic AA"Gravatar Mike Reed2017-01-14
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This reverts commit 480a1c6a1643ccbe959fa849fb91df6d86d51ec3. Reason for revert: <INSERT REASONING HERE> 2.32m done 8888 skp http___www_yespornplease_com.skp 2.32m start 8888 skp http___www_freepostcodelottery_com.skp 2.32m done 8888 skp http___www_pingwest_com.skp 2.32m start 8888 skp http___www_fbdown_net.skp ../../../../../work/skia/src/core/SkAnalyticEdge.cpp:116: fatal error: "assert(slope == SK_MaxS32 || SkAbs32(fSnappedX + SkFixedMul(slope, newSnappedY - fSnappedY) - newSnappedX) < SK_FixedHalf)" ../../../src/core/SkScan_AAAPath.cpp:746:61: runtime error: left shift of negative value -1 #0 0x30c120a in blit_aaa_trapezoid_row(AdditiveBlitter*, int, int, int, int, int, int, int, unsigned char, unsigned char*, bool, bool, bool) (/b/swarm_slave/w/irNiQodn/out/Debug/dm+0x30c120a) #1 0x30bc557 in aaa_walk_edges(SkAnalyticEdge*, SkAnalyticEdge*, SkPath::FillType, AdditiveBlitter*, int, int, int, int, bool, bool, bool, bool) (/b/swarm_slave/w/irNiQodn/out/Debug/dm+0x30bc557) #2 0x30aed31 in aaa_fill_path(SkPath const&, SkIRect const&, AdditiveBlitter*, int, int, bool, bool, bool) (/b/swarm_slave/w/irNiQodn/out/Debug/dm+0x30aed31) #3 0x30addc5 in SkScan::AAAFillPath(SkPath const&, SkRegion const&, SkBlitter*, bool) (/b/swarm_slave/w/irNiQodn/out/Debug/dm+0x30addc5) #4 0x30af56d in SkScan::AAAFillPath(SkPath const&, SkRasterClip const&, SkBlitter*) (/b/swarm_slave/w/irNiQodn/out/Debug/dm+0x30af56d) #5 0x30dc96b in SkScan::AntiFillPath(SkPath const&, SkRasterClip const&, SkBlitter*) (/b/swarm_slave/w/irNiQodn/out/Debug/dm+0x30dc96b) Original change's description: > Exercise concave analytic AA > > This will allow Skia trybots (e.g., 1M skp) to exercise analytic AA. > There's still a guard flag in Chromium that prevents layout tests failure. > > TBR=reed@google.com,caryclark@google.com > > BUG=skia: > > Change-Id: Ie893c10d34bf969e013ef047c1bbf4b004d584cc > Reviewed-on: https://skia-review.googlesource.com/7091 > Reviewed-by: Yuqian Li <liyuqian@google.com> > Commit-Queue: Yuqian Li <liyuqian@google.com> > TBR=caryclark@google.com,liyuqian@google.com,reed@google.com,reviews@skia.org NOPRESUBMIT=true NOTREECHECKS=true NOTRY=true BUG=skia: Change-Id: I9b621f2d0cd143b37a2570a10471d2ad8cb149fd Reviewed-on: https://skia-review.googlesource.com/7092 Commit-Queue: Mike Reed <reed@google.com> Reviewed-by: Mike Reed <reed@google.com>
* Exercise concave analytic AAGravatar Yuqian Li2017-01-14
| | | | | | | | | | | | | | This will allow Skia trybots (e.g., 1M skp) to exercise analytic AA. There's still a guard flag in Chromium that prevents layout tests failure. TBR=reed@google.com,caryclark@google.com BUG=skia: Change-Id: Ie893c10d34bf969e013ef047c1bbf4b004d584cc Reviewed-on: https://skia-review.googlesource.com/7091 Reviewed-by: Yuqian Li <liyuqian@google.com> Commit-Queue: Yuqian Li <liyuqian@google.com>
* Revert "move SkDevice.h and SkBitmapDevice.h contents in to src headers"Gravatar Mike Reed2017-01-13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This reverts commit 2f719a6b9214997e4cc24646d4b280038962b836. Reason for revert: <INSERT REASONING HERE> swf/transform/jsrunner/swiffy_canvas.h caller included SkDevice.h, but really wanted SkBitmap and SkColor Original change's description: > move SkDevice.h and SkBitmapDevice.h contents in to src headers > > BUG=skia: > > Change-Id: I3d8d313f0500c13db21cb973fed4064ec3816912 > Reviewed-on: https://skia-review.googlesource.com/7082 > Reviewed-by: Florin Malita <fmalita@chromium.org> > Commit-Queue: Mike Reed <reed@google.com> > TBR=bungeman@google.com,fmalita@chromium.org,reed@google.com NOPRESUBMIT=true NOTREECHECKS=true NOTRY=true BUG=skia: Change-Id: I40f7f1e4ad62685facdd39492da7a0b105178221 Reviewed-on: https://skia-review.googlesource.com/7087 Commit-Queue: Mike Reed <reed@google.com> Reviewed-by: Mike Reed <reed@google.com>
* move SkDevice.h and SkBitmapDevice.h contents in to src headersGravatar Mike Reed2017-01-13
| | | | | | | | | BUG=skia: Change-Id: I3d8d313f0500c13db21cb973fed4064ec3816912 Reviewed-on: https://skia-review.googlesource.com/7082 Reviewed-by: Florin Malita <fmalita@chromium.org> Commit-Queue: Mike Reed <reed@google.com>
* Fix ASANGravatar Matt Sarett2017-01-13
| | | | | | | | | | | NOTREECHECKS=true BUG=skia: Change-Id: I8104112ade6671b06fb5eb83b73f691fee99ea80 Reviewed-on: https://skia-review.googlesource.com/7081 Commit-Queue: Kevin Lubick <kjlubick@google.com> Reviewed-by: Kevin Lubick <kjlubick@google.com>
* Fix syntax error for adjusting old stdc++ headers.Gravatar Herb Derby2017-01-13
| | | | | | | | Change-Id: Ibc99ae943b275b770e8767b80400b8e1520e70a5 Reviewed-on: https://skia-review.googlesource.com/7035 Commit-Queue: Herb Derby <herb@google.com> Commit-Queue: Ben Wagner <bungeman@google.com> Reviewed-by: Ben Wagner <bungeman@google.com>
* Fix Android rollGravatar Mike Klein2017-01-13
| | | | | | | | | | - only depend on cpu-features when we know we have an NDK - disable SkSplicer Change-Id: I89e4cc70d6ddf0ebb7005d1cb453768d946cd205 Reviewed-on: https://skia-review.googlesource.com/7060 Reviewed-by: Derek Sollenberger <djsollen@google.com> Commit-Queue: Mike Klein <mtklein@chromium.org>
* Use GrRenderTargetContext::readPixels in GrTextureToYUVPlanesGravatar Robert Phillips2017-01-13
| | | | | | | | | This is salvaged from an ancient CL or mine. Thoughts? Change-Id: I3712ca911d1ab5def3f4dcb080a3f9e226cdd44b Reviewed-on: https://skia-review.googlesource.com/7031 Reviewed-by: Brian Osman <brianosman@google.com> Commit-Queue: Robert Phillips <robertphillips@google.com>
* Remove (unused) YUV API from SkPixelRefGravatar Brian Osman2017-01-13
| | | | | | | | | | | YUV conversion happens via SkImage now. BUG=skia: Change-Id: I6e1fa18effb72cbb00a173a346769b873e372c40 Reviewed-on: https://skia-review.googlesource.com/7034 Reviewed-by: Mike Reed <reed@google.com> Commit-Queue: Brian Osman <brianosman@google.com>
* SkSplicer: implement load_tables and matrix_3x4Gravatar Mike Klein2017-01-13
| | | | | | | | | | | | | | These are enough to splice interesting SkColorSpaceXform pipelines. SkSplicer_stages.cpp is similar to but still intentionally distinct from SkRasterPipeline_opts. I hope to unify them next week. unaligned_load() is nothing tricky... just a little refactor. Change-Id: I05d0fc38dac985aa351d88776ecc14d2457f2124 Reviewed-on: https://skia-review.googlesource.com/7022 Reviewed-by: Matt Sarett <msarett@google.com> Commit-Queue: Mike Klein <mtklein@chromium.org>
* Decode system font weight correctly on Mac.Gravatar bungeman2017-01-13
| | | | | | | | | | The -1 to 1 weights reported by CTFontDescriptors have different mappings depending on if the CTFont is native or created from a CGDataProvider. Change-Id: I725b04a31c224a4b01c0763137fa04bb4088def7 Reviewed-on: https://skia-review.googlesource.com/6979 Reviewed-by: Mike Reed <reed@google.com> Commit-Queue: Ben Wagner <bungeman@google.com>
* Revert "Optimize SkBlend by using NEON intrinsics"Gravatar Mike Klein2017-01-13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This reverts commit 7adde145d3913cfd67b90bf83a9ea54386a285a7. Reason for revert: may be breaking our Android One test bots. Original change's description: > Optimize SkBlend by using NEON intrinsics > > Use NEON intrinsics to check the alpha channel of the pixels. > > In some case, it's about 14 times faster than the original implementation. > > $ ./bin/droid out/arm64_release/nanobench --samples 300 --nompd --match LinearSrcOver -v > neon_opt.log > $ ./bin/compare neon_opt.log clean.log > LinearSrcOver_yellow_rose.pngVSkOptsDefault 1.8ms -> 24.9ms 13.8x > LinearSrcOver_iconstrip.pngVSkOptsDefault 5.71ms -> 69.8ms 12.2x > LinearSrcOver_plane.pngVSkOptsDefault 1.45ms -> 11ms 7.62x > LinearSrcOver_baby_tux.pngVSkOptsDefault 1.88ms -> 9.96ms 5.29x > LinearSrcOver_mandrill_512.pngVSkOptsDefault 1.41ms -> 4.62ms 3.29x > LinearSrcOver_yellow_rose.pngVSkOptsTrivial 24.9ms -> 24.9ms 1x > LinearSrcOver_yellow_rose.pngVSkOptsNonSimdCore 2.17ms -> 2.18ms 1x > LinearSrcOver_plane.pngVSkOptsTrivial 11.1ms -> 11.1ms 1x > LinearSrcOver_plane.pngVSkOptsNonSimdCore 1.5ms -> 1.5ms 1x > LinearSrcOver_mandrill_512.pngVSkOptsNonSimdCore 2.39ms -> 2.39ms 1x > LinearSrcOver_iconstrip.pngVSkOptsNonSimdCore 6.43ms -> 6.43ms 1x > LinearSrcOver_baby_tux.pngVSkOptsBruteForce 22.3ms -> 22.3ms 1x > LinearSrcOver_yellow_rose.pngVSkOptsBruteForce 45.5ms -> 45.5ms 1x > LinearSrcOver_baby_tux.pngVSkOptsNonSimdCore 2.02ms -> 2.02ms 1x > LinearSrcOver_iconstrip.pngVSkOptsTrivial 69.7ms -> 69.7ms 1x > LinearSrcOver_baby_tux.pngVSkOptsTrivial 9.96ms -> 9.95ms 1x > LinearSrcOver_mandrill_512.pngVSkOptsBruteForce 99.3ms -> 99.2ms 1x > > BUG=skia: > > CQ_INCLUDE_TRYBOTS=skia.primary:Test-Ubuntu-GCC-GCE-CPU-AVX2-x86_64-Release-SKNX_NO_SIMD > > Change-Id: Ia576365578d65b771440da65fdf41f090ccf0541 > Reviewed-on: https://skia-review.googlesource.com/6860 > Reviewed-by: Mike Klein <mtklein@chromium.org> > Commit-Queue: Mike Klein <mtklein@chromium.org> > TBR=mtklein@chromium.org,bsalomon@google.com,joel.liang@arm.com,reviews@skia.org BUG=skia: NOPRESUBMIT=true NOTREECHECKS=true NOTRY=true Change-Id: Ie40eb5a7c27807aaf396429a82a1a2dd328c2b5b Reviewed-on: https://skia-review.googlesource.com/7036 Commit-Queue: Mike Klein <mtklein@chromium.org> Reviewed-by: Mike Klein <mtklein@chromium.org>
* Move Android shadow rendering interface to util library.Gravatar Jim Van Verth2017-01-13
| | | | | | | | | BUG=skia:6119 Change-Id: I8318cf2758042ffd0c81c5fa74240acbf7bea61f Reviewed-on: https://skia-review.googlesource.com/6999 Commit-Queue: Jim Van Verth <jvanverth@google.com> Reviewed-by: Brian Salomon <bsalomon@google.com>
* Remove most modifiers of processors on GrPipelineBuilderGravatar Brian Salomon2017-01-13
| | | | | | | Change-Id: I2fc12a97d694e5c0d86c9a4e0818a058905c8cf0 Reviewed-on: https://skia-review.googlesource.com/6993 Commit-Queue: Brian Salomon <bsalomon@google.com> Reviewed-by: Robert Phillips <robertphillips@google.com>
* Fixed another division by zero error in skslcGravatar Ethan Nicholas2017-01-13
| | | | | | | | | | | | You'd think by now it would have occurred to me that mod is also a kind of division. BUG=skia:6087 Change-Id: I5128d09db94d06f10762ad5c23df32551c5e5855 Reviewed-on: https://skia-review.googlesource.com/6607 Reviewed-by: Greg Daniel <egdaniel@google.com> Commit-Queue: Ethan Nicholas <ethannicholas@google.com>
* Fix out of bounds read in RP::load_tables_u16_be()Gravatar Matt Sarett2017-01-13
| | | | | | | | | | | BUG=skia: CQ_INCLUDE_TRYBOTS=skia.primary:Test-Ubuntu-GCC-GCE-CPU-AVX2-x86_64-Release-SKNX_NO_SIMD Change-Id: I4f6dd002b03812d63bf62342c346ea21f6865466 Reviewed-on: https://skia-review.googlesource.com/7027 Reviewed-by: Mike Klein <mtklein@chromium.org> Commit-Queue: Matt Sarett <msarett@google.com>
* Simplify k.w calculation in getConicKLM.Gravatar Dean McNamee2017-01-13
| | | | | | | | | | | | Additionally reformat the equations to better expose the symmetry. BUG=skia: Change-Id: If485cc7aeae97b89dedeb4d6b23efbe945036e3a Reviewed-on: https://skia-review.googlesource.com/7000 Reviewed-by: Greg Daniel <egdaniel@google.com> Reviewed-by: Dean McNamee <deanm@chromium.org> Commit-Queue: Greg Daniel <egdaniel@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>
* simplify round_down_to_int by using ceil instead of floorGravatar Lee Salzman2017-01-13
| | | | | | | | | BUG=skia: Change-Id: I465d98d6b0d97e1ede82670c663f9695b5a0a1de Reviewed-on: https://skia-review.googlesource.com/7041 Reviewed-by: Cary Clark <caryclark@google.com> Commit-Queue: Cary Clark <caryclark@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>
* Revert "Revert "Hide SkCanvas getDevice() & getTopDevice()}""Gravatar Florin Malita2017-01-13
| | | | | | | | | | | This reverts commit e050ca783297db6d88d4d8d0f466f12020747cb8. Reason for revert: Chromium change is sticking, revert not needed. Change-Id: Ic3004460606e4c512f79ba0923746706b960881a Reviewed-on: https://skia-review.googlesource.com/7021 Commit-Queue: Florin Malita <fmalita@chromium.org> Reviewed-by: Florin Malita <fmalita@google.com>
* call fetch-gn from git-sync-depsGravatar Mike Klein2017-01-13
| | | | | | | | | | https://skia.org/?cl=6994 Change-Id: Icac009bdef49f38ae7b8f082ffda6408481a03cd Reviewed-on: https://skia-review.googlesource.com/6994 Reviewed-by: Hal Canary <halcanary@google.com> Reviewed-by: Brian Salomon <bsalomon@google.com> Commit-Queue: Mike Klein <mtklein@chromium.org>
* some armv7 hackingGravatar Mike Klein2017-01-13
| | | | | | | | | | | | | | | | | | | | | | | | | | | We can splice these stages if we drop them down to 2 at a time. Turns out this is significantly (2-3x) faster than the status quo. SkRasterPipeline_… …f16_compile 1x …srgb_compile 2.06x …f16_run 3.08x …srgb_run 4.61x Added a couple ways to detect (likely) the required VFPv4 support: - use hwcap when available (NDK ≥21, Android framework) - use cpu-features when not (NDK <21) The code in SkSplicer_generated.h is ARM, not Thumb2. SkSplicer seems to be blx'ing into it, so that's great, and we bx lr out. There's no point in attempting to use Thumb2 in vector heavy code... it'll all be 4 byte anyway. Follow ups: - vpush {d8-d9} before the loop, vpop {d8-d9} afterwards, skip these instructions when splicing; - (probably) drop jumping stages down to 2-at-a-time also. Change-Id: If151394ec10e8cbd6a05e2d81808488d743bfe15 Reviewed-on: https://skia-review.googlesource.com/6940 Reviewed-by: Herb Derby <herb@google.com> Commit-Queue: Mike Klein <mtklein@chromium.org>
* Minor Ganesh refFoo cleanupGravatar Robert Phillips2017-01-13
| | | | | | | Change-Id: I2c66693c280225795a5d36ccc0391fcd4056420d Reviewed-on: https://skia-review.googlesource.com/6995 Reviewed-by: Mike Reed <reed@google.com> Commit-Queue: Robert Phillips <robertphillips@google.com>
* Try out new refFoo pattern on GrStyleGravatar Robert Phillips2017-01-13
| | | | | | | Change-Id: Ic7f30e3730a3431adf365d729320fe50f38dcea8 Reviewed-on: https://skia-review.googlesource.com/6907 Reviewed-by: Brian Salomon <bsalomon@google.com> Commit-Queue: Robert Phillips <robertphillips@google.com>