aboutsummaryrefslogtreecommitdiffhomepage
path: root/src
Commit message (Collapse)AuthorAge
* Add some raster pipeline perspective assertsGravatar Florin Malita2017-07-12
| | | | | | | | | | | | | | | | | | | | | I meant to add these when removing the guard, but since we landed without a guard, might as well do it now. A couple of things exposed by these asserts: 1) we need to also catch perspective in local matrices 2) we need to disallow burst mode with perspective Also tweak the predicate to hasPerspective() instead of explicit mask check. Change-Id: I099e5125fca52dccffca77c60fc800bbdf539b53 Reviewed-on: https://skia-review.googlesource.com/22483 Reviewed-by: Mike Reed <reed@google.com> Reviewed-by: Mike Klein <mtklein@google.com> Reviewed-by: Herb Derby <herb@google.com> Commit-Queue: Florin Malita <fmalita@chromium.org>
* Experimental blur code with 32 bit fix.Gravatar Herb Derby2017-07-12
| | | | | | | | | | | | | | | | | This uses a new method of blurring that runs the three passes of the box filter in a single pass. This implementation currently only does 1x1 pixel at a time, but it should be simple to expand to 4x4 pixels at a time. On the blur_10_normal_high_quality benchmark, the new is 7% faster than the old code. For the blur_100.50_normal_high_quality benchmark, the new code is 11% slower. Bug: skia: Change-Id: I847270906b0ceac1dfbf43ab5446756689ef660f Reviewed-on: https://skia-review.googlesource.com/22700 Reviewed-by: Mike Reed <reed@google.com> Commit-Queue: Herb Derby <herb@google.com>
* Revert "Revert "Make DashOp a non-legacy GrMeshDrawOp.""Gravatar Brian Salomon2017-07-12
| | | | | | | | | | | This reverts commit beae8a9faa2afcdbeeec96e658db7e113a4fa1c9. Clean revert of revert. Change-Id: Ibb486bf3411ed347b560fc110a2cfbb0e0caa4f2 Reviewed-on: https://skia-review.googlesource.com/22730 Reviewed-by: Brian Salomon <bsalomon@google.com> Commit-Queue: Brian Salomon <bsalomon@google.com>
* Implement Sk4i's abs, min, maxGravatar Yuqian Li2017-07-12
| | | | | | | | | CQ_INCLUDE_TRYBOTS=skia.primary:Test-Debian9-GCC-GCE-CPU-AVX2-x86_64-Release-SKNX_NO_SIMD Bug: skia: Change-Id: Ia9ec3f72095e1c744f88df7bb990d99e0f87d578 Reviewed-on: https://skia-review.googlesource.com/22720 Commit-Queue: Yuqian Li <liyuqian@google.com> Reviewed-by: Herb Derby <herb@google.com>
* Extend final point in closed degenerate hairline segmentsGravatar Brian Osman2017-07-12
| | | | | | | | | | | | | | | For single-contour paths (MLZ), the close is ignored during iteration, and we instead process the 'Done', which does extend in both directions. But if there's a second contour (MLZM), then we process the 'Close', and only extend the degenerate segment in one direction. Depending on where the path was positioned (relative to pixel centers), this led to some contours not drawing at all. Bug: skia: Change-Id: I88aeaecc94c0e69532479e50920ba2e0cc6f4bda Reviewed-on: https://skia-review.googlesource.com/22520 Reviewed-by: Cary Clark <caryclark@google.com> Commit-Queue: Brian Osman <brianosman@google.com>
* Fix assert in lattice op triggered by GLProgramsTestGravatar Brian Salomon2017-07-12
| | | | | | Change-Id: Ia495a8c7bc7dd0832da7ad48c6dbdf4c0dc67119 Reviewed-on: https://skia-review.googlesource.com/22729 Reviewed-by: Robert Phillips <robertphillips@google.com>
* Clarify adjustMatrixAndAppendStages semanticsGravatar Florin Malita2017-07-12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | A false return from adjustMatrixAndAppendStages() currently means we'll attempt to create a legacy context wrapper stage. Only two gradient impls can return false, and they don't really want the same thing: 1) linear returns false when the stops are compressed, to get the "nice" legacy blend color behavior 2) two-point radial returns false when it cannot map the center points (degenerate matrix); in this case we prolly don't want to draw at all This setup made sense while we were retrofitting gradients with stages, but now that all of them support RP, it is confusing to sometimes get a legacy context wrapper even when we are specifically asked for stages. I propose we align the semantics with SkShader::onAppendStages(), such that a false return means "don't draw" rather than "try to draw with a legacy context". This means we're giving up the compressed stop behavior for linear, but that's such an arbitrary corner case that I don't think we care at all. Change-Id: I01256c4acb81b16fb68e6c74cf8d91ea77b95a3b Reviewed-on: https://skia-review.googlesource.com/22541 Commit-Queue: Herb Derby <herb@google.com> Reviewed-by: Herb Derby <herb@google.com>
* Revert "Make DashOp a non-legacy GrMeshDrawOp."Gravatar Brian Salomon2017-07-12
| | | | | | | | | | | | | | | | | | | | | | | | This reverts commit ebb38256c65f2d799dd64f0274256a0c1deffed1. Reason for revert: Assertions on ANGLE bots Original change's description: > Make DashOp a non-legacy GrMeshDrawOp. > > Change-Id: I84ee3c64a5af8889e9a122cbc08d70ed6b25fbab > Reviewed-on: https://skia-review.googlesource.com/22210 > Commit-Queue: Brian Salomon <bsalomon@google.com> > Reviewed-by: Greg Daniel <egdaniel@google.com> TBR=egdaniel@google.com,bsalomon@google.com Change-Id: I886a0bd75221f05d737d8b27c6b3d8d6cce5573c No-Presubmit: true No-Tree-Checks: true No-Try: true Reviewed-on: https://skia-review.googlesource.com/22680 Reviewed-by: Brian Salomon <bsalomon@google.com> Commit-Queue: Brian Salomon <bsalomon@google.com>
* Revert "Revert "Change image encode api to return sk_sp""Gravatar Mike Reed2017-07-12
| | | | | | | | | | This reverts commit 64778d9f275d8ce3df8f4ab39ff334b7ef5b70d3. Bug: skia: Change-Id: I779515ff1e16a40c33890a4bac7a8a07171aadfe Reviewed-on: https://skia-review.googlesource.com/22261 Reviewed-by: Mike Reed <reed@google.com> Commit-Queue: Mike Reed <reed@google.com>
* Make DashOp a non-legacy GrMeshDrawOp.Gravatar Brian Salomon2017-07-12
| | | | | | | Change-Id: I84ee3c64a5af8889e9a122cbc08d70ed6b25fbab Reviewed-on: https://skia-review.googlesource.com/22210 Commit-Queue: Brian Salomon <bsalomon@google.com> Reviewed-by: Greg Daniel <egdaniel@google.com>
* Revert "converted GrSimpleTextureEffect to sksl"Gravatar Ethan Nicholas2017-07-12
| | | | | | | | | | | | | | | | | | | | | | | | | | This reverts commit 46b654df9e70bbfacf6dc45d3a2a7ceb13a61edb. Reason for revert: making Vulkan mad Original change's description: > converted GrSimpleTextureEffect to sksl > > Bug: skia: > Change-Id: If556c6baad75f22135f429759feabaaec095b900 > Reviewed-on: https://skia-review.googlesource.com/21720 > Commit-Queue: Ethan Nicholas <ethannicholas@google.com> > Reviewed-by: Greg Daniel <egdaniel@google.com> TBR=egdaniel@google.com,ethannicholas@google.com Change-Id: I06fac3d106435e1d58e19cc54a919c5d84784d92 No-Presubmit: true No-Tree-Checks: true No-Try: true Bug: skia: Reviewed-on: https://skia-review.googlesource.com/22266 Reviewed-by: Ethan Nicholas <ethannicholas@google.com> Commit-Queue: Ethan Nicholas <ethannicholas@google.com>
* converted GrSimpleTextureEffect to skslGravatar Ethan Nicholas2017-07-12
| | | | | | | | Bug: skia: Change-Id: If556c6baad75f22135f429759feabaaec095b900 Reviewed-on: https://skia-review.googlesource.com/21720 Commit-Queue: Ethan Nicholas <ethannicholas@google.com> Reviewed-by: Greg Daniel <egdaniel@google.com>
* remove unreachable perspective code for imageshaderGravatar Mike Reed2017-07-12
| | | | | | | | | CQ_INCLUDE_TRYBOTS=skia.primary:Test-Debian9-GCC-GCE-CPU-AVX2-x86_64-Release-SKNX_NO_SIMD Bug: skia: Change-Id: If9a7df3e1c387098b00bf1cc1a37c36c6d256ef1 Reviewed-on: https://skia-review.googlesource.com/22348 Commit-Queue: Florin Malita <fmalita@chromium.org> Reviewed-by: Florin Malita <fmalita@chromium.org>
* Always enable Analytic AA for rectsGravatar Yuqian Li2017-07-12
| | | | | | | | | | | | Previously, suitableForAAA disabled Analytic AA for small rects. But that's a mistake. Re-enabling AAA will bring 10-20% speedup for small rects (~800ns -> ~700ns measured by path_fill_small_rect nanobench). Bug: skia: Change-Id: I943f1c754669391f55e46471781fa65840629377 Reviewed-on: https://skia-review.googlesource.com/22205 Reviewed-by: Florin Malita <fmalita@chromium.org> Commit-Queue: Yuqian Li <liyuqian@google.com>
* Make SmallPathOp a non-legacy GrMeshDrawOpGravatar Brian Salomon2017-07-12
| | | | | | | Change-Id: I7fd0739d7bae9176e816772b3aed54528c4fa576 Reviewed-on: https://skia-review.googlesource.com/21865 Commit-Queue: Brian Salomon <bsalomon@google.com> Reviewed-by: Jim Van Verth <jvanverth@google.com>
* Address ASAN complaintGravatar Robert Phillips2017-07-12
| | | | | | | | TBR=bsalomon@google.com Change-Id: Ic3b1f328a84d58939ff55b38cbc1fd4bd29ad5c6 Reviewed-on: https://skia-review.googlesource.com/22482 Reviewed-by: Robert Phillips <robertphillips@google.com> Commit-Queue: Robert Phillips <robertphillips@google.com>
* Plumb raw GrMipLevel* down instead of SkTArray<GrMipLevel> in GrGpuGravatar Robert Phillips2017-07-12
| | | | | | | Change-Id: I34033b6ecb469458eb820cbc01aad8c7bb876312 Reviewed-on: https://skia-review.googlesource.com/22212 Commit-Queue: Robert Phillips <robertphillips@google.com> Reviewed-by: Brian Salomon <bsalomon@google.com>
* Always use raster pipeline for perspectiveGravatar Florin Malita2017-07-12
| | | | | | | | | Change-Id: I6205769ea77e12647985496a5c74d3754edd3108 Reviewed-on: https://skia-review.googlesource.com/22365 Commit-Queue: Florin Malita <fmalita@chromium.org> Reviewed-by: Mike Klein <mtklein@google.com> Reviewed-by: Herb Derby <herb@google.com> Reviewed-by: Mike Reed <reed@google.com>
* Revert "Experimental blur code."Gravatar Florin Malita2017-07-12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This reverts commit d96ed9d0def2d660f537e4ab5c79e9e66470ee22. Reason for revert: dm crashing https://luci-milo.appspot.com/swarming/task/374d82c1d1263910/steps/symbolized_dm/0/stdout Likely culprit: unit test BlurDrawing Stack trace: /mnt/pd0/s/w/ir/out/Debug/dm(+0x2440eb) [0x568770eb] linux-gate.so.1(__kernel_sigreturn+0) [0xf7714ca0] /mnt/pd0/s/w/ir/out/Debug/dm(_ZNK16SkMaskBlurFilter11blurOneScanENS_10FilterInfoEPKhjS2_PhjS3_+0x236) [0x5766301e] /mnt/pd0/s/w/ir/out/Debug/dm(_ZNK16SkMaskBlurFilter4blurERK6SkMaskPS0_+0x285) [0x57663491] /mnt/pd0/s/w/ir/out/Debug/dm(_ZN10SkBlurMask7BoxBlurEP6SkMaskRKS0_f11SkBlurStyle13SkBlurQualityP8SkIPointb+0x5c) [0x5720d48e] /mnt/pd0/s/w/ir/out/Debug/dm(_ZNK20SkBlurMaskFilterImpl10filterMaskEP6SkMaskRKS0_RK8SkMatrixP8SkIPoint+0x67) [0x5720e427] /mnt/pd0/s/w/ir/out/Debug/dm(_ZNK20SkBlurMaskFilterImpl17filterRectsToNineEPK6SkRectiRK8SkMatrixRK7SkIRectPN12SkMaskFilter9NinePatchE+0x579) [0x5721a247] /mnt/pd0/s/w/ir/out/Debug/dm(_ZNK12SkMaskFilter10filterPathERK6SkPathRK8SkMatrixRK12SkRasterClipP9SkBlitterN11SkStrokeRec9InitStyleE+0xf6) [0x5706c2bc] /mnt/pd0/s/w/ir/out/Debug/dm(_ZNK6SkDraw11drawDevPathERK6SkPathRK7SkPaintbP9SkBlitterb+0x1bb) [0x57034f1b] /mnt/pd0/s/w/ir/out/Debug/dm(_ZNK6SkDraw8drawPathERK6SkPathRK7SkPaintPK8SkMatrixbbP9SkBlitter+0x47f) [0x57035dd3] /mnt/pd0/s/w/ir/out/Debug/dm(_ZN14SkBitmapDevice8drawPathERK6SkPathRK7SkPaintPK8SkMatrixb+0x6e) [0x56f937fc] /mnt/pd0/s/w/ir/out/Debug/dm(_ZN8SkCanvas10onDrawPathERK6SkPathRK7SkPaint+0x39d) [0x56fb12e5] /mnt/pd0/s/w/ir/out/Debug/dm(_ZN8SkCanvas8drawPathERK6SkPathRK7SkPaint+0x18) [0x56fad926] /mnt/pd0/s/w/ir/out/Debug/dm(+0x3f71b3) [0x56a2a1b3] /mnt/pd0/s/w/ir/out/Debug/dm(+0x2450bd) [0x568780bd] /mnt/pd0/s/w/ir/out/Debug/dm(+0x2450fb) [0x568780fb] /mnt/pd0/s/w/ir/out/Debug/dm(+0xae53e7) [0x571183e7] /mnt/pd0/s/w/ir/out/Debug/dm(_ZNKSt8functionIFvvEEclEv+0x20) [0x569f98de] /mnt/pd0/s/w/ir/out/Debug/dm(_ZN12SkThreadPool4LoopEPv+0x298) [0x57045b2f] /mnt/pd0/s/w/ir/out/Debug/dm(+0xbbd92c) [0x571f092c] /lib/i386-linux-gnu/libpthread.so.0(+0x627a) [0xf76e827a] /lib/i386-linux-gnu/libc.so.6(clone+0x66) [0xf70ecb56] Segmentation fault Original change's description: > Experimental blur code. > > This uses a new method of blurring that runs the three > passes of the box filter in a single pass. This implementation > currently only does 1x1 pixel at a time, but it should be simple > to expand to 4x4 pixels at a time. > > On the blur_10_normal_high_quality benchmark, the new is 7% faster > than the old code. For the blur_100.50_normal_high_quality > benchmark, the new code is 11% slower. > > Change-Id: Iea37294abc7c27de5ad569adf8bc62df77eafd02 > Reviewed-on: https://skia-review.googlesource.com/21739 > Commit-Queue: Herb Derby <herb@google.com> > Reviewed-by: Mike Reed <reed@google.com> TBR=herb@google.com,reed@google.com Change-Id: I9e896c548d0a4cd3308d6a311c8bd16719a08a85 No-Presubmit: true No-Tree-Checks: true No-Try: true Reviewed-on: https://skia-review.googlesource.com/22421 Reviewed-by: Florin Malita <fmalita@google.com> Commit-Queue: Florin Malita <fmalita@google.com>
* Experimental blur code.Gravatar Herb Derby2017-07-12
| | | | | | | | | | | | | | | | This uses a new method of blurring that runs the three passes of the box filter in a single pass. This implementation currently only does 1x1 pixel at a time, but it should be simple to expand to 4x4 pixels at a time. On the blur_10_normal_high_quality benchmark, the new is 7% faster than the old code. For the blur_100.50_normal_high_quality benchmark, the new code is 11% slower. Change-Id: Iea37294abc7c27de5ad569adf8bc62df77eafd02 Reviewed-on: https://skia-review.googlesource.com/21739 Commit-Queue: Herb Derby <herb@google.com> Reviewed-by: Mike Reed <reed@google.com>
* Check first deserialized verb of path is a move.Gravatar Ben Wagner2017-07-12
| | | | | | | | | | | | | SkPathRef::Iter::next and several other bits of code depend on the first verb of a path always being a move. Contructors and builders currently enforce this, so the deserializer must do so also. BUG=chromium:740789 Change-Id: Iad0f6fc6d2b2fe40064c674fa7dd1612c120bb8f Reviewed-on: https://skia-review.googlesource.com/22216 Commit-Queue: Ben Wagner <bungeman@google.com> Reviewed-by: Mike Reed <reed@google.com>
* Handle invalid lattice case in LatticeOp test factoryGravatar Brian Salomon2017-07-11
| | | | | | Change-Id: I8df10082d9c354685c39d6188340cf2972629e6b Reviewed-on: https://skia-review.googlesource.com/22214 Reviewed-by: Ethan Nicholas <ethannicholas@google.com>
* Serialize the new TileMode in SkBlurImageFilterImpl.Gravatar wutao2017-07-11
| | | | | | | | | | | | | Serialize the new TileMode in SkBlurImageFilterImpl. And also update the SkReadBuffer::Version and CURRENT_PICTURE_VERSION in SkPicture. Bug: 622128 Change-Id: I3b04be2a36406227c6d8112e943d7415566c0c42 Reviewed-on: https://skia-review.googlesource.com/22079 Commit-Queue: Robert Phillips <robertphillips@google.com> Reviewed-by: Robert Phillips <robertphillips@google.com> Reviewed-by: Stephen White <senorblanco@chromium.org> Reviewed-by: Brian Salomon <bsalomon@google.com>
* Reland "Remove support for decoding to kIndex_8"Gravatar Leon Scroggins2017-07-11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Original change's description: > > Remove support for decoding to kIndex_8 > > > > Fix up callsites, and remove tests that no longer make sense. > > > > Bug: skia:6828 > > Change-Id: I2548c4b7528b7b1be7412563156f27b52c9d4295 > > Reviewed-on: https://skia-review.googlesource.com/21664 > > Reviewed-by: Derek Sollenberger <djsollen@google.com> > > Commit-Queue: Leon Scroggins <scroggo@google.com> > > TBR=djsollen@google.com,scroggo@google.com > > Change-Id: I1bc669441f250690884e75a9a61427fdf75c6907 > No-Presubmit: true > No-Tree-Checks: true > No-Try: true > Bug: skia:6828 > Reviewed-on: https://skia-review.googlesource.com/22120 > Reviewed-by: Leon Scroggins <scroggo@google.com> > Commit-Queue: Leon Scroggins <scroggo@google.com> TBR=djsollen@google.com,scroggo@google.com Bug: skia:6828 Change-Id: I36ff5a11c529d29e8adc95f43b8edc6fd1dbf5b8 Reviewed-on: https://skia-review.googlesource.com/22320 Reviewed-by: Leon Scroggins <scroggo@google.com> Commit-Queue: Leon Scroggins <scroggo@google.com>
* Revert "Change image encode api to return sk_sp"Gravatar Mike Reed2017-07-11
| | | | | | | | | | | | | | | | | | | | | | | | | | This reverts commit dc799550e2d9965aa5b7cda496465b2a76b310a5. Reason for revert: need to fix sites in Document_none Original change's description: > Change image encode api to return sk_sp > > Bug: skia: > Change-Id: I238289bc630be27795cb1384955dd6e887597c05 > Reviewed-on: https://skia-review.googlesource.com/22208 > Commit-Queue: Mike Reed <reed@google.com> > Reviewed-by: Florin Malita <fmalita@chromium.org> TBR=scroggo@google.com,fmalita@chromium.org,reed@google.com Change-Id: Id7f67027e5f1405a60fdbde29863cdf8daef0cb7 No-Presubmit: true No-Tree-Checks: true No-Try: true Bug: skia: Reviewed-on: https://skia-review.googlesource.com/22280 Reviewed-by: Mike Reed <reed@google.com> Commit-Queue: Mike Reed <reed@google.com>
* Change image encode api to return sk_spGravatar Mike Reed2017-07-11
| | | | | | | | Bug: skia: Change-Id: I238289bc630be27795cb1384955dd6e887597c05 Reviewed-on: https://skia-review.googlesource.com/22208 Commit-Queue: Mike Reed <reed@google.com> Reviewed-by: Florin Malita <fmalita@chromium.org>
* Ensure FB sRGB conversion is on during copy-as-drawGravatar Brian Osman2017-07-11
| | | | | | | | | | | | | | | | | A recent change up-stack tickled the cross context image test, exposing this bug. I have no idea how it didn't manifest sooner. In that test, we're takng a subset of a lazy image, which implements onGenerateTexture via a surface copy. In this case, we were in legacy mode, but the textures were all created with sRGB configs. In normal drawing, we disable sRGB decode. For the copy draw, we were explicitly enabling sRGB decode, but not setting the FB setting, so if it was still off (it was), the image would get decoded but not re-encoded, coming out too dark. Bug: skia: Change-Id: I4a480b11315cc308ea016b7082aff17920764214 Reviewed-on: https://skia-review.googlesource.com/22211 Commit-Queue: Brian Osman <brianosman@google.com> Reviewed-by: Brian Salomon <bsalomon@google.com>
* Revert "Revert "Make TessellatingPathOp be a non-legacy GrMeshDrawOp""Gravatar Brian Salomon2017-07-11
| | | | | | | | | | | | This reverts commit 7343c197fc91c6cedc019dd5fed69969a5d317ca. The initial revert was because the random test factory was choosing msaa as the aatype when the render target was not msaa, triggering and assert. Bug: skia: Change-Id: I1bfec86492b69af1101c65d249140af804c16684 Reviewed-on: https://skia-review.googlesource.com/22203 Reviewed-by: Brian Salomon <bsalomon@google.com> Commit-Queue: Brian Salomon <bsalomon@google.com>
* Add serialize + catalog api to SkTextBlobGravatar Mike Reed2017-07-11
| | | | | | | | Bug: skia:6836 Change-Id: I858cf936b015c14f12a41a4912e19bb15de8abaa Reviewed-on: https://skia-review.googlesource.com/21730 Commit-Queue: Mike Reed <reed@google.com> Reviewed-by: Florin Malita <fmalita@chromium.org>
* Devolve SkTwoPointConicalGradient to SkRadialGradient when possibleGravatar Florin Malita2017-07-11
| | | | | | | | | | Blink attempts this optimization explicitly, but Skia seems like a better home for it. Change-Id: I2ecd8d0b4e91fbd9be6f89005319b2d9f04836ba Reviewed-on: https://skia-review.googlesource.com/21821 Reviewed-by: Mike Reed <reed@google.com> Commit-Queue: Florin Malita <fmalita@chromium.org>
* Don't pre-allocate GrTextBlobCache spaceGravatar Florin Malita2017-07-11
| | | | | | | | | | Let the pool handle the initial allocation on first use. Change-Id: I77e0a84f19ccefa0c3bf298483929345787c0d7e Reviewed-on: https://skia-review.googlesource.com/22078 Reviewed-by: Brian Salomon <bsalomon@google.com> Reviewed-by: Eric Karl <ericrk@chromium.org> Commit-Queue: Florin Malita <fmalita@chromium.org>
* Re-land "converted GrCircleBlurFragmentProcessor to sksl"Gravatar Ethan Nicholas2017-07-11
| | | | | | | | | | This reverts commit 818ac5a00dfd570d2b291b7524a70ecd4ef55770. Bug: skia: Change-Id: I9bd8a06bd2dbb40bd261d64d6d04daf864bc00a5 Reviewed-on: https://skia-review.googlesource.com/22075 Reviewed-by: Brian Salomon <bsalomon@google.com> Commit-Queue: Ethan Nicholas <ethannicholas@google.com>
* Convert NonAALatticeOp to non-legacy GrMeshDrawOp.Gravatar Brian Salomon2017-07-11
| | | | | | | | | | Also adds a test factory and fixes a bug in the lattice iter validator where it compared each div value against the start rather than the previous div. Bug: skia: Change-Id: I30e9ddfcbaab7829a2f646ad851f99d1e518ab4a Reviewed-on: https://skia-review.googlesource.com/21871 Reviewed-by: Brian Osman <brianosman@google.com> Commit-Queue: Brian Salomon <bsalomon@google.com>
* Move GrResourceProvider::createMipMappedTexture to ↵Gravatar Robert Phillips2017-07-11
| | | | | | | | | | | | GrSurfaceProxy::MakeDeferredMipMap Although this adds a new method to GrResourceProvider, it is a slight improvement in that it removes some GrProxy stuff from GrResourceProvider (which arguably should only deal in GrSurface-derived classes). Bug: skia: Change-Id: I6d097ed178cd2aa5662770a164135bf2553b80e6 Reviewed-on: https://skia-review.googlesource.com/22023 Reviewed-by: Brian Salomon <bsalomon@google.com> Commit-Queue: Robert Phillips <robertphillips@google.com>
* Revert "Always enable Analytic AA for rects"Gravatar Yuqian Li2017-07-10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This reverts commit 6d70274ccf6e7a3729af53e401d2d9e6726035a3. Reason for revert: need rebaseline Original change's description: > Always enable Analytic AA for rects > > Previously, suitableForAAA disabled Analytic AA for small rects. > But that's a mistake. Re-enabling AAA will bring 10-20% speedup for small rects > (~800ns -> ~700ns measured by path_fill_small_rect nanobench). > > Bug: skia: > Change-Id: I1d8bf4c105d8d116ea441a46e6c955c546bcbb22 > Reviewed-on: https://skia-review.googlesource.com/22074 > Reviewed-by: Mike Reed <reed@google.com> > Commit-Queue: Yuqian Li <liyuqian@google.com> TBR=mtklein@chromium.org,herb@google.com,caryclark@google.com,liyuqian@google.com,reed@google.com Change-Id: I87011bf7b8f30fa3be5d46287afbaf38c0be7da9 No-Presubmit: true No-Tree-Checks: true No-Try: true Bug: skia: Reviewed-on: https://skia-review.googlesource.com/22140 Reviewed-by: Yuqian Li <liyuqian@google.com> Commit-Queue: Yuqian Li <liyuqian@google.com>
* Revert "Remove support for decoding to kIndex_8"Gravatar Leon Scroggins2017-07-10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This reverts commit 742a3e298fda669006147e4a305bab8452369b1f. Reason for revert: Breaking Android roll: frameworks/base/core/jni/android/graphics/BitmapFactory.cpp:453:18: error: no member named 'fColorPtr' in 'SkAndroidCodec::AndroidOptions' codecOptions.fColorPtr = colorPtr; ~~~~~~~~~~~~ ^ frameworks/base/core/jni/android/graphics/BitmapFactory.cpp:454:18: error: no member named 'fColorCount' in 'SkAndroidCodec::AndroidOptions' codecOptions.fColorCount = colorCount; ~~~~~~~~~~~~ ^ Original change's description: > Remove support for decoding to kIndex_8 > > Fix up callsites, and remove tests that no longer make sense. > > Bug: skia:6828 > Change-Id: I2548c4b7528b7b1be7412563156f27b52c9d4295 > Reviewed-on: https://skia-review.googlesource.com/21664 > Reviewed-by: Derek Sollenberger <djsollen@google.com> > Commit-Queue: Leon Scroggins <scroggo@google.com> TBR=djsollen@google.com,scroggo@google.com Change-Id: I1bc669441f250690884e75a9a61427fdf75c6907 No-Presubmit: true No-Tree-Checks: true No-Try: true Bug: skia:6828 Reviewed-on: https://skia-review.googlesource.com/22120 Reviewed-by: Leon Scroggins <scroggo@google.com> Commit-Queue: Leon Scroggins <scroggo@google.com>
* Correctly stroke zero length segments in multi-contour pathsGravatar Brian Osman2017-07-10
| | | | | | | | Bug: skia: Change-Id: I959287780ef94a258a6746132f3acb9f90e6c6cc Reviewed-on: https://skia-review.googlesource.com/21863 Reviewed-by: Cary Clark <caryclark@google.com> Commit-Queue: Brian Osman <brianosman@google.com>
* Always enable Analytic AA for rectsGravatar Yuqian Li2017-07-10
| | | | | | | | | | | | Previously, suitableForAAA disabled Analytic AA for small rects. But that's a mistake. Re-enabling AAA will bring 10-20% speedup for small rects (~800ns -> ~700ns measured by path_fill_small_rect nanobench). Bug: skia: Change-Id: I1d8bf4c105d8d116ea441a46e6c955c546bcbb22 Reviewed-on: https://skia-review.googlesource.com/22074 Reviewed-by: Mike Reed <reed@google.com> Commit-Queue: Yuqian Li <liyuqian@google.com>
* Make SkImage_Lazy::onMakeColorSpace return a SkImage_LazyGravatar Christopher Cameron2017-07-10
| | | | | | | | | | | | | | | | | | | | | | | | | | Make SkImage_Lazy::onMakeColorSpace return a new SkImage_Lazy with the color space of SkImage_Lazy::fInfo changed. Update the call to SkImageGenerator::getPixels to specify image info with this new color space. Update the call to SkImageGenerator::generateTexture to specify this new color space. Update SkPictureImageGenerator to respect the color space argument. Add a SkTransferFunctionBehavior argument to SkImageGenerator::generateTexture to indicate if color conversion is to be doing using an xform canvas. Update Generator_GrYUVProvider::refAsTextureProxy to include a color conversion step to respect this new color space. TBR=reed@google.com Bug:739559 Change-Id: I156a858884659e9dfae739a653bab2ef89274959 Reviewed-on: https://skia-review.googlesource.com/21605 Commit-Queue: Brian Osman <brianosman@google.com> Reviewed-by: Christopher Cameron <ccameron@chromium.org> Reviewed-by: Christopher Cameron <ccameron@google.com> Reviewed-by: Brian Osman <brianosman@google.com>
* Revert "don't compose with (forced) opaque colors"Gravatar Ethan Nicholas2017-07-10
| | | | | | | | | | | | | | | | | | | | | | | | | | This reverts commit 81995592d8a941fcf79ba5cee71a37510fa8d6e5. Reason for revert: Various bots reporting "Processor ComposeTwo claimed output for const input doesn't match actual output" Original change's description: > don't compose with (forced) opaque colors > > Bug: skia: > Change-Id: Ic5ea706430b4698e7e937a0cc424ec29b0d8da10 > Reviewed-on: https://skia-review.googlesource.com/22029 > Reviewed-by: Brian Salomon <bsalomon@google.com> > Commit-Queue: Mike Reed <reed@google.com> TBR=bsalomon@google.com,brianosman@google.com,reed@google.com Change-Id: Idf0e0db6e2d81dd00fa39c4ea0b3bcd92af8cae0 No-Presubmit: true No-Tree-Checks: true No-Try: true Bug: skia: Reviewed-on: https://skia-review.googlesource.com/22067 Reviewed-by: Ethan Nicholas <ethannicholas@google.com> Commit-Queue: Ethan Nicholas <ethannicholas@google.com>
* Avoid unneeded SkPictureImageFilter color space transformsGravatar Florin Malita2017-07-10
| | | | | | | Change-Id: Ib5391b4bc315cf709ba6276a79357ce43ee9427e Reviewed-on: https://skia-review.googlesource.com/22062 Reviewed-by: Mike Reed <reed@google.com> Commit-Queue: Florin Malita <fmalita@chromium.org>
* Remove unused ctor in GrTextureDomainGravatar Robert Phillips2017-07-10
| | | | | | | Change-Id: I82b4add39f87133157f94745902df0b3a1a23680 Reviewed-on: https://skia-review.googlesource.com/22063 Reviewed-by: Greg Daniel <egdaniel@google.com> Commit-Queue: Robert Phillips <robertphillips@google.com>
* ICC: SkICCGetColorProfileTag supports special casesGravatar Hal Canary2017-07-10
| | | | | | | | | | | | | | | | | | | | | | | | Special cases: - "sRGB" - "AdobeRGB" - "DCI-P3" - "Linear Transfer with sRGB Gamut" - "2.2 Transfer with sRGB Gamut" - "sRGB Transfer with DCI-P3 Gamut" - "Linear Transfer with DCI-P3 Gamut" - "sRGB Transfer with Rec-BT-2020 Gamut" - "Linear Transfer with Rec-BT-2020 Gamut" tools/colorspaceinfo now prints out the Tag. Also: constants representing gSRGB_TransferFn, g2Dot2_TransferFn, and gLinear_TransferFn, gDCIP3_TransferFn. BUG=skia:6720 Change-Id: I92a3f9db9d744d3ec366e4e59afd759ba043c235 Reviewed-on: https://skia-review.googlesource.com/20225 Reviewed-by: Derek Sollenberger <djsollen@google.com> Commit-Queue: Hal Canary <halcanary@google.com>
* Remove support for decoding to kIndex_8Gravatar Leon Scroggins III2017-07-10
| | | | | | | | | | Fix up callsites, and remove tests that no longer make sense. Bug: skia:6828 Change-Id: I2548c4b7528b7b1be7412563156f27b52c9d4295 Reviewed-on: https://skia-review.googlesource.com/21664 Reviewed-by: Derek Sollenberger <djsollen@google.com> Commit-Queue: Leon Scroggins <scroggo@google.com>
* [Reland] More SkColorSpaceXformer cachingGravatar Florin Malita2017-07-10
| | | | | | | | | | | | * apply(SkColorFilter*) * apply(SkImage*) Also add purge logic to minimize caching scope. Change-Id: I295d20f760f8be0c3746858d6f9c73e351f10a36 Reviewed-on: https://skia-review.googlesource.com/22030 Commit-Queue: Florin Malita <fmalita@chromium.org> Reviewed-by: Mike Reed <reed@google.com>
* don't compose with (forced) opaque colorsGravatar Mike Reed2017-07-10
| | | | | | | | Bug: skia: Change-Id: Ic5ea706430b4698e7e937a0cc424ec29b0d8da10 Reviewed-on: https://skia-review.googlesource.com/22029 Reviewed-by: Brian Salomon <bsalomon@google.com> Commit-Queue: Mike Reed <reed@google.com>
* Revert "Make TessellatingPathOp be a non-legacy GrMeshDrawOp"Gravatar Ethan Nicholas2017-07-10
| | | | | | | | | | | | | | | | | | | | | | | | This reverts commit 086ce11386849c445a99c7bb8c43947f54618a75. Reason for revert: Looks to be upsetting the bots (grglgpu.cpp(2766): fatal error: "assert(!useHWAA || rt->isStencilBufferMultisampled())") Original change's description: > Make TessellatingPathOp be a non-legacy GrMeshDrawOp > > Change-Id: Ic92fdca7bdca91eab3a87e4fea3972ffdcfd5b12 > Reviewed-on: https://skia-review.googlesource.com/21867 > Reviewed-by: Jim Van Verth <jvanverth@google.com> > Commit-Queue: Brian Salomon <bsalomon@google.com> TBR=jvanverth@google.com,bsalomon@google.com Change-Id: Ibb0c8f8f4e2dea018b54686ab780535e2f69539a No-Presubmit: true No-Tree-Checks: true No-Try: true Reviewed-on: https://skia-review.googlesource.com/22060 Reviewed-by: Ethan Nicholas <ethannicholas@google.com> Commit-Queue: Ethan Nicholas <ethannicholas@google.com>
* Revert "converted GrCircleBlurFragmentProcessor to sksl"Gravatar Ethan Nicholas2017-07-10
| | | | | | | | | | | | | | | | | | | | | | | | | This reverts commit 9b80ffc77b8000b493eb1226dc6ec21f1e99edfc. Reason for revert: breaking ANGLE and Android Vulkan GMs Original change's description: > converted GrCircleBlurFragmentProcessor to sksl > > Bug: skia: > Change-Id: I1b70ba2003c9e9de2b5b9acadaf25c9ed59b1198 > Reviewed-on: https://skia-review.googlesource.com/21727 > Commit-Queue: Ethan Nicholas <ethannicholas@google.com> > Reviewed-by: Brian Salomon <bsalomon@google.com> TBR=bsalomon@google.com,ethannicholas@google.com # Not skipping CQ checks because original CL landed > 1 day ago. Bug: skia: Change-Id: Ia313013b4354b34fa5a02bdb16d007a462c5ca94 Reviewed-on: https://skia-review.googlesource.com/22028 Reviewed-by: Ethan Nicholas <ethannicholas@google.com> Commit-Queue: Ethan Nicholas <ethannicholas@google.com>
* Make TessellatingPathOp be a non-legacy GrMeshDrawOpGravatar Brian Salomon2017-07-10
| | | | | | | Change-Id: Ic92fdca7bdca91eab3a87e4fea3972ffdcfd5b12 Reviewed-on: https://skia-review.googlesource.com/21867 Reviewed-by: Jim Van Verth <jvanverth@google.com> Commit-Queue: Brian Salomon <bsalomon@google.com>
* Add missing checks for geometry shader stages in GrVkUtil.cppGravatar Chris Dalton2017-07-09
| | | | | | | | Bug: skia: Change-Id: I30cb6d5ee5016536537c48346c58ef4cf19f16c5 Reviewed-on: https://skia-review.googlesource.com/21845 Reviewed-by: Greg Daniel <egdaniel@google.com> Commit-Queue: Chris Dalton <csmartdalton@google.com>