aboutsummaryrefslogtreecommitdiffhomepage
path: root/tests
Commit message (Collapse)AuthorAge
...
* Use simple buffers instead of vectorsGravatar Herb Derby2018-07-12
| | | | | | | | | | Start using simple buffers, these will be used for multiple runs latter on. Change-Id: Iab0559d5a47eb5e54254a985051d5d25a91be69f Reviewed-on: https://skia-review.googlesource.com/140791 Commit-Queue: Herb Derby <herb@google.com> Reviewed-by: Mike Klein <mtklein@google.com>
* update SkColor4f::FromColor() to preserve transfer functionGravatar Mike Klein2018-07-12
| | | | | | | | | | | | This kills off some sRGB tables, and lots of call sites can now use SkColor4f::FromColor(). It doesn't seem important to keep this test. Change-Id: Ia79ec8ace45e80bbc7a1e33f560f59289e61b2fb Reviewed-on: https://skia-review.googlesource.com/141046 Commit-Queue: Mike Klein <mtklein@chromium.org> Reviewed-by: Brian Osman <brianosman@google.com>
* Add SkTypeface::getVariationDesignParametersGravatar Ben Wagner2018-07-12
| | | | | | | | | This adds a way for users to query the axis parameters for a typeface. Change-Id: Idc2ac0d84bc7ae2ca484ae410cba5b01883418e5 Reviewed-on: https://skia-review.googlesource.com/137706 Commit-Queue: Ben Wagner <bungeman@google.com> Reviewed-by: Mike Reed <reed@google.com>
* Update SRGBReadWritePixelsTest again, to only test opaque colorsGravatar Brian Osman2018-07-12
| | | | | | | | | | | | | | | | With our new world (never doing linear blending), the read-back conversion from premul sRGB to premul linear no longer produces the same answer. By always using opaque pixels, the existing check functions in this test can continue to verify that the sRGB <-> linear conversion is happening correctly during read/write, independent of any color space transformation (which is now altering the outcome). Bug: skia: Change-Id: Id8e28b3bc4b9674043bd870a39d229207ccdc6d7 Reviewed-on: https://skia-review.googlesource.com/140987 Auto-Submit: Brian Osman <brianosman@google.com> Reviewed-by: Mike Klein <mtklein@google.com> Commit-Queue: Brian Osman <brianosman@google.com>
* Remove SK_LEGACY_GPU_PIXEL_OPS testsGravatar Brian Osman2018-07-12
| | | | | | | | | | Bug: skia: Change-Id: I12ba9199845a43c8e070454093b744eed272a548 Reviewed-on: https://skia-review.googlesource.com/140981 Commit-Queue: Brian Osman <brianosman@google.com> Commit-Queue: Brian Salomon <bsalomon@google.com> Auto-Submit: Brian Osman <brianosman@google.com> Reviewed-by: Brian Salomon <bsalomon@google.com>
* In RGBA444TextureTest, use valid premul colorsGravatar Brian Osman2018-07-12
| | | | | | | | | | | | | | | In both the 565 and 4444 tests, we use a repeating pattern of two 16-bit values. Neither of these were valid premul colors in 4444, and the first one (FF00) had zero alpha. With upcoming changes to format conversion, that may need to be unpremul'd and premul'd during readPixels, causing this test to fail. Change-Id: Idbf0f8162d6f68ca2b70ede8c48f788f4379d414 Reviewed-on: https://skia-review.googlesource.com/140799 Commit-Queue: Brian Osman <brianosman@google.com> Commit-Queue: Mike Klein <mtklein@google.com> Auto-Submit: Brian Osman <brianosman@google.com> Reviewed-by: Mike Klein <mtklein@google.com>
* Use new SkGlyphIDSet - v3Gravatar Herb Derby2018-07-12
| | | | | | | | | | | | | v1 - had problems with msan and unintialized glyphs. v2 - had problems with typefaces with no glyphs in them This adds a check to make sure there are glyphs in the font when going to uniquify. Change-Id: Id27fa4578be33da1e468b4652db19740ddcadfc6 Reviewed-on: https://skia-review.googlesource.com/140785 Commit-Queue: Herb Derby <herb@google.com> Reviewed-by: Mike Klein <mtklein@google.com>
* Remove SkDrawFilter.Gravatar Ben Wagner2018-07-12
| | | | | | | | | Change-Id: I0204a9522e828c87bb7c6c20ae34ce51161442af Reviewed-on: https://skia-review.googlesource.com/137895 Reviewed-by: Herb Derby <herb@google.com> Reviewed-by: Ben Wagner <bungeman@google.com> Reviewed-by: Mike Reed <reed@google.com> Commit-Queue: Ben Wagner <bungeman@google.com>
* Reland "Make GPU cache invalidation SkMessageBus messages go to one GrContext."Gravatar Brian Salomon2018-07-11
| | | | | | | | | | | | | | | | | | | | | | | | | This is a reland of f4c5bb9aba485aa47c27b15905d81992b7cf4707 Original change's description: > Make GPU cache invalidation SkMessageBus messages go to one GrContext. > > Makes it so the template param to SkMessageBus must implement: > bool shouldSend(uint32_t inboxID) const > > Updates all GPU backend message types to only go to the GrContext that > is adding a cache entry. > > Bug: skia: > Change-Id: I3e8a4eb90654b7b8ac57cac9fb508c0ef1d51058 > Reviewed-on: https://skia-review.googlesource.com/140220 > Reviewed-by: Robert Phillips <robertphillips@google.com> > Reviewed-by: Jim Van Verth <jvanverth@google.com> Bug: skia: Change-Id: I8402bfe3ed0170c99936d47050458817030b473b Reviewed-on: https://skia-review.googlesource.com/140801 Reviewed-by: Brian Salomon <bsalomon@google.com> Commit-Queue: Brian Salomon <bsalomon@google.com>
* Remove interal use of SkRefCnt_SafeAssign.Gravatar Ben Wagner2018-07-11
| | | | | | | | | | | | It turns out that SkDeviceProfile is no longer used and can just be deleted. The ResourceCacheTest and DebugGLTestContext are changed to use smart pointers where possible. This also clarifies the squirrelly part of the test. DebugGLTestContext is going away soon anyway. Change-Id: I95ef24afa58aa4d356429b93d4dec0d72e3fd827 Reviewed-on: https://skia-review.googlesource.com/140577 Reviewed-by: Brian Salomon <bsalomon@google.com> Commit-Queue: Ben Wagner <bungeman@google.com>
* collapse parametric_{r,g,b} into parametric, remove _a and gamma_dstGravatar Mike Klein2018-07-11
| | | | | | | | | | | | | parametric_a and gamma_dst were unused outside of unit tests. In all other cases, we always use parametric_{r,g,b} together and always pass them the same argument. So we can collapse them into a single stage like gamma and to/from_srgb. Change-Id: I08cea896c7744f97b4f4bf9e029f5d643e45e177 Reviewed-on: https://skia-review.googlesource.com/140576 Commit-Queue: Mike Klein <mtklein@chromium.org> Reviewed-by: Brian Osman <brianosman@google.com>
* Revert "Use new SkGlyphIDSet - v2"Gravatar Herb Derby2018-07-11
| | | | | | | | | | | | | | | | | | | | | | | | | | This reverts commit 0421083a447a8ab105d20c786f7d8377f30a6d5d. Reason for revert: fushia page fault Original change's description: > Use new SkGlyphIDSet - v2 > > Add bzero to make msan and valgrind happy. > > Change-Id: I9b4e2f2b8e690da4b4b920fef27d5a8854092219 > Reviewed-on: https://skia-review.googlesource.com/140563 > Reviewed-by: Mike Klein <mtklein@google.com> > Commit-Queue: Herb Derby <herb@google.com> TBR=mtklein@google.com,herb@google.com Change-Id: I4e5e16644cbf56b5ff0b21afd6f3962e3976a1da No-Presubmit: true No-Tree-Checks: true No-Try: true Reviewed-on: https://skia-review.googlesource.com/140803 Reviewed-by: Herb Derby <herb@google.com> Commit-Queue: Herb Derby <herb@google.com>
* Revert "Use simple buffers instead of vectors"Gravatar Herb Derby2018-07-11
| | | | | | | | | | | | | | | | | | | | | | | | | | | This reverts commit b188da121c1575caa6b0b9755e3f80a6b5e44611. Reason for revert: Patch on a rollback Original change's description: > Use simple buffers instead of vectors > > Start using simple buffers, these will be used for > multiple runs latter on. > > Change-Id: I8dadbed036b7a60d708c49b84bb5e3bb3710f704 > Reviewed-on: https://skia-review.googlesource.com/140578 > Reviewed-by: Mike Klein <mtklein@google.com> > Commit-Queue: Herb Derby <herb@google.com> TBR=mtklein@google.com,herb@google.com Change-Id: I51d9ad9bc0fd7efb93e5db4dc504d8dc31e7cfb4 No-Presubmit: true No-Tree-Checks: true No-Try: true Reviewed-on: https://skia-review.googlesource.com/140802 Reviewed-by: Herb Derby <herb@google.com> Commit-Queue: Herb Derby <herb@google.com>
* Revert "Make GPU cache invalidation SkMessageBus messages go to one GrContext."Gravatar Brian Salomon2018-07-11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This reverts commit f4c5bb9aba485aa47c27b15905d81992b7cf4707. Reason for revert: Accidentally submitted without CQ Original change's description: > Make GPU cache invalidation SkMessageBus messages go to one GrContext. > > Makes it so the template param to SkMessageBus must implement: > bool shouldSend(uint32_t inboxID) const > > Updates all GPU backend message types to only go to the GrContext that > is adding a cache entry. > > Bug: skia: > Change-Id: I3e8a4eb90654b7b8ac57cac9fb508c0ef1d51058 > Reviewed-on: https://skia-review.googlesource.com/140220 > Reviewed-by: Robert Phillips <robertphillips@google.com> > Reviewed-by: Jim Van Verth <jvanverth@google.com> TBR=jvanverth@google.com,bsalomon@google.com,robertphillips@google.com Change-Id: Iadb667d8027341703d254325320ddaa528fb33a1 No-Presubmit: true No-Tree-Checks: true No-Try: true Bug: skia: Reviewed-on: https://skia-review.googlesource.com/140800 Reviewed-by: Brian Salomon <bsalomon@google.com> Commit-Queue: Brian Salomon <bsalomon@google.com>
* Make GPU cache invalidation SkMessageBus messages go to one GrContext.Gravatar Brian Salomon2018-07-11
| | | | | | | | | | | | | | Makes it so the template param to SkMessageBus must implement: bool shouldSend(uint32_t inboxID) const Updates all GPU backend message types to only go to the GrContext that is adding a cache entry. Bug: skia: Change-Id: I3e8a4eb90654b7b8ac57cac9fb508c0ef1d51058 Reviewed-on: https://skia-review.googlesource.com/140220 Reviewed-by: Robert Phillips <robertphillips@google.com> Reviewed-by: Jim Van Verth <jvanverth@google.com>
* Use simple buffers instead of vectorsGravatar Herb Derby2018-07-11
| | | | | | | | | | Start using simple buffers, these will be used for multiple runs latter on. Change-Id: I8dadbed036b7a60d708c49b84bb5e3bb3710f704 Reviewed-on: https://skia-review.googlesource.com/140578 Reviewed-by: Mike Klein <mtklein@google.com> Commit-Queue: Herb Derby <herb@google.com>
* Whitespace FixupGravatar Hal Canary2018-07-11
| | | | | | | | Change-Id: I6c4c4b43dfa6b59832c63f8fcf43192b4973d88b Reviewed-on: https://skia-review.googlesource.com/140565 Commit-Queue: Mike Klein <mtklein@google.com> Auto-Submit: Hal Canary <halcanary@google.com> Reviewed-by: Mike Klein <mtklein@google.com>
* Only generate valid premul test data in SRGBReadWritePixels testGravatar Brian Osman2018-07-11
| | | | | | | | | Change-Id: I9ca830b2bcf3341b06bc4e261dba40809b452194 Reviewed-on: https://skia-review.googlesource.com/140572 Commit-Queue: Brian Osman <brianosman@google.com> Commit-Queue: Mike Klein <mtklein@google.com> Auto-Submit: Brian Osman <brianosman@google.com> Reviewed-by: Mike Klein <mtklein@google.com>
* Add more tests for PolyUtilsGravatar Jim Van Verth2018-07-11
| | | | | | | | | | | | | | * Add fuzzer * Add bench tests * Add additional unit test * Fix some bugs these exposed. Bug: skia: Change-Id: I6c587c92cb6cff32ab8300020b78f9f247d2bf64 Reviewed-on: https://skia-review.googlesource.com/139169 Commit-Queue: Jim Van Verth <jvanverth@google.com> Reviewed-by: Kevin Lubick <kjlubick@google.com> Reviewed-by: Robert Phillips <robertphillips@google.com>
* Use new SkGlyphIDSet - v2Gravatar Herb Derby2018-07-11
| | | | | | | | | Add bzero to make msan and valgrind happy. Change-Id: I9b4e2f2b8e690da4b4b920fef27d5a8854092219 Reviewed-on: https://skia-review.googlesource.com/140563 Reviewed-by: Mike Klein <mtklein@google.com> Commit-Queue: Herb Derby <herb@google.com>
* propogate simple angles in pathopsGravatar Cary Clark2018-07-11
| | | | | | | | | | | | | | | | | | | | If an edge is unsortable, its winding value is untrustworthy; it cannot be added to the output on that alone. If one end adjoins a trusted edge, and that edge is added to the output, the untrusted edge can be added as well. Also add in msvs debugging for angles. With this change, all extended tests pass. TBR=reed@google.com Bug: skia:8125 Change-Id: I049c6efa2fa83edd7b49cdd598ec94c356481b0f Reviewed-on: https://skia-review.googlesource.com/140562 Commit-Queue: Cary Clark <caryclark@skia.org> Auto-Submit: Cary Clark <caryclark@skia.org> Reviewed-by: Cary Clark <caryclark@skia.org>
* Remove clamping of kPlus with F16 configsGravatar Brian Osman2018-07-11
| | | | | | | | | | | | | | | | | The most common use-case for F16 is to draw things that are explicitly outside of [0,1]. We can't prevent out-of-range values in general, users could just draw out-of-range content in src mode. We've decided that it's best to avoid surprising behavior, and trust the user in these situations. This effectively reverts https://skia-review.googlesource.com/c/skia/+/48183 Bug: skia: Change-Id: I71c2dd925c567e2862d96ab70c752f19245a69c4 Reviewed-on: https://skia-review.googlesource.com/140500 Reviewed-by: Mike Klein <mtklein@google.com> Reviewed-by: Brian Salomon <bsalomon@google.com> Commit-Queue: Brian Osman <brianosman@google.com>
* Remove old lazy image decoding heuristic logicGravatar Brian Osman2018-07-11
| | | | | | | | | | | This led to removing a lot of transfer function behavior code. There is more that could be done, and we need to add in decoding to dst color space, but this CL is almost entirely mechanical. Change-Id: I91b2169f95aadcfaacdd2b9821bb1a01ce53f9a6 Reviewed-on: https://skia-review.googlesource.com/140349 Reviewed-by: Mike Klein <mtklein@google.com> Commit-Queue: Brian Osman <brianosman@google.com>
* Revert "Use new SkGlyphIDSet"Gravatar Herb Derby2018-07-10
| | | | | | | | | | | | | | | | | | | | | | | | This reverts commit 819f73c23cfd8471e1cbc77ee7c14d8150457765. Reason for revert: uninitialized memory - this is expected but Original change's description: > Use new SkGlyphIDSet > > Change-Id: I6b8080393a22a56577528f66630ad39372edf712 > Reviewed-on: https://skia-review.googlesource.com/140243 > Commit-Queue: Herb Derby <herb@google.com> > Reviewed-by: Mike Klein <mtklein@google.com> TBR=mtklein@google.com,herb@google.com Change-Id: I43e204520710738e9e8c84b0eb00260ca06fe6a2 No-Presubmit: true No-Tree-Checks: true No-Try: true Reviewed-on: https://skia-review.googlesource.com/140384 Reviewed-by: Herb Derby <herb@google.com> Commit-Queue: Herb Derby <herb@google.com>
* Use new SkGlyphIDSetGravatar Herb Derby2018-07-10
| | | | | | | Change-Id: I6b8080393a22a56577528f66630ad39372edf712 Reviewed-on: https://skia-review.googlesource.com/140243 Commit-Queue: Herb Derby <herb@google.com> Reviewed-by: Mike Klein <mtklein@google.com>
* fix line intersect divide by zeroGravatar Cary Clark2018-07-10
| | | | | | | | | | | | | | | | | | | | | | | | | | Test filinmangust14 exposes two problems: - finding top of contour can expose divide by zero - joining partial contour results can add diagonal The latter makes the test return the wrong result, and has not been seen in other tests. The fix is to join disconnected contours by only following the contours provided as input. Working on that. The former bug is more straight-forward; just don't try to compute axis-aligned intersection if the denominator is zero. All existing tests prior to the new one work with this change. R=caryclark@google.com Bug: skia:8125 Change-Id: Ic878d090066708d9baca8475f27d4d5aba2294cc Reviewed-on: https://skia-review.googlesource.com/140121 Reviewed-by: Cary Clark <caryclark@skia.org> Commit-Queue: Cary Clark <caryclark@skia.org> Auto-Submit: Cary Clark <caryclark@skia.org>
* Expand testing of SkMatrix::decomposeScaleGravatar Robert Phillips2018-07-10
| | | | | | | | Bug: skia:7211 Change-Id: If03ad1d364b33e174d91010ca250cd6c2d2f67c2 Reviewed-on: https://skia-review.googlesource.com/140185 Commit-Queue: Robert Phillips <robertphillips@google.com> Reviewed-by: Greg Daniel <egdaniel@google.com>
* Remove run list codeGravatar Herb Derby2018-07-10
| | | | | | | | | | Temporarily remove run list code to gut some overly complicated code. Change-Id: Ib12efc394c05dee391143b440b2fab5bba4f22ae Reviewed-on: https://skia-review.googlesource.com/139865 Reviewed-by: Mike Klein <mtklein@google.com> Commit-Queue: Herb Derby <herb@google.com>
* Deinline some GrPathRenderer method and one GrDrawingMananger method.Gravatar Brian Salomon2018-07-10
| | | | | | | | | | | | | | Removes circular dependencies from coming change. Some IWYU fallout from removing #includes from GrPathRenderer.h and GrDrawingManager.h Bug: skia: Change-Id: Ice377538e6d64b6a74a59e6140e1de9a58ab99bf Reviewed-on: https://skia-review.googlesource.com/140181 Commit-Queue: Brian Salomon <bsalomon@google.com> Auto-Submit: Brian Salomon <bsalomon@google.com> Reviewed-by: Greg Daniel <egdaniel@google.com>
* Add sRGB profile to mandrill imagesGravatar Brian Osman2018-07-09
| | | | | | | | | Bug: skia: Change-Id: Ic0e0ae23c88f86885583a304d90d1ce874ff14ed Reviewed-on: https://skia-review.googlesource.com/139960 Auto-Submit: Brian Osman <brianosman@google.com> Commit-Queue: Mike Klein <mtklein@google.com> Reviewed-by: Mike Klein <mtklein@google.com>
* Revert "Add genIDs from all contributing elements to GrReducedClip's mask key."Gravatar Brian Salomon2018-07-09
| | | | | | | | | | | | | | | | | | | | | | | | | This reverts commit 1354048c8fa885b83e414532c011d710590d6b46. Reason for revert: tsan/valgrind failures Original change's description: > Add genIDs from all contributing elements to GrReducedClip's mask key. > > Change-Id: I3fed124ba3fefd1ef82acdb4ace9531d0c89ad8b > Reviewed-on: https://skia-review.googlesource.com/138586 > Commit-Queue: Brian Salomon <bsalomon@google.com> > Reviewed-by: Robert Phillips <robertphillips@google.com> TBR=bsalomon@google.com,robertphillips@google.com,csmartdalton@google.com Change-Id: Ia5bc098309cd02baf46f03d8ff17fabbd383481e No-Presubmit: true No-Tree-Checks: true No-Try: true Reviewed-on: https://skia-review.googlesource.com/139920 Reviewed-by: Brian Salomon <bsalomon@google.com> Commit-Queue: Brian Salomon <bsalomon@google.com>
* Add genIDs from all contributing elements to GrReducedClip's mask key.Gravatar Brian Salomon2018-07-09
| | | | | | | Change-Id: I3fed124ba3fefd1ef82acdb4ace9531d0c89ad8b Reviewed-on: https://skia-review.googlesource.com/138586 Commit-Queue: Brian Salomon <bsalomon@google.com> Reviewed-by: Robert Phillips <robertphillips@google.com>
* Add color type to the image filter DAG's OutputPropertiesGravatar Brian Osman2018-07-06
| | | | | | | | | | | | Don't try to guess the pixel config to use for intermediates. Instead, just make the intermediates in the same color type (and space) as the final destination. This removes some no-longer-correct logic that was using sRGB configs, resulting in linear blending and precision loss. Change-Id: I627c47193a9f2889c3dc121170ff3e7d5d315fa0 Reviewed-on: https://skia-review.googlesource.com/139547 Reviewed-by: Mike Klein <mtklein@google.com> Commit-Queue: Brian Osman <brianosman@google.com>
* Add some new PolyUtils tests.Gravatar Jim Van Verth2018-07-03
| | | | | | | | | | | | | Also: * clean up PolyUtils checks to be correct and consistent. * fix some bugs discovered by the unit tests. Bug: skia: Change-Id: I1a8e07d13cb44fecc67344154dc1002f3f910f5d Reviewed-on: https://skia-review.googlesource.com/138592 Reviewed-by: Robert Phillips <robertphillips@google.com> Reviewed-by: Greg Daniel <egdaniel@google.com> Commit-Queue: Jim Van Verth <jvanverth@google.com>
* Reland "Remove setting/use of GrPixelConfig in GrBackendTex/RT ctors."Gravatar Greg Daniel2018-07-03
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This reverts commit 34aa059c1502d67c9a5f4db449667a8709b69fb9. Reason for revert: <INSERT REASONING HERE> Original change's description: > Revert "Remove setting/use of GrPixelConfig in GrBackendTex/RT ctors." > > This reverts commit ff2181e62e79ffd2ce628fc8c05b5457d4f54163. > > Reason for revert: suspect it's behind Chrome roll failure > > Original change's description: > > Remove setting/use of GrPixelConfig in GrBackendTex/RT ctors. > > > > Bug: skia: > > Change-Id: I1466668e3502cd1e6e1f6aed4105e0f626d293dd > > Reviewed-on: https://skia-review.googlesource.com/138987 > > Commit-Queue: Greg Daniel <egdaniel@google.com> > > Reviewed-by: Robert Phillips <robertphillips@google.com> > > TBR=egdaniel@google.com,bsalomon@google.com,robertphillips@google.com > > Change-Id: I4cba44858aafffbadc45e18349b93c741d7cfc66 > No-Presubmit: true > No-Tree-Checks: true > No-Try: true > Bug: skia: > Reviewed-on: https://skia-review.googlesource.com/139220 > Reviewed-by: Ethan Nicholas <ethannicholas@google.com> > Commit-Queue: Ethan Nicholas <ethannicholas@google.com> Bug: skia: Change-Id: Ib1fd10c126862824f3e31c420c697ac749c637f5 Reviewed-on: https://skia-review.googlesource.com/139221 Commit-Queue: Greg Daniel <egdaniel@google.com> Reviewed-by: Robert Phillips <robertphillips@google.com>
* Revert "Remove setting/use of GrPixelConfig in GrBackendTex/RT ctors."Gravatar Ethan Nicholas2018-07-03
| | | | | | | | | | | | | | | | | | | | | | | | | | This reverts commit ff2181e62e79ffd2ce628fc8c05b5457d4f54163. Reason for revert: suspect it's behind Chrome roll failure Original change's description: > Remove setting/use of GrPixelConfig in GrBackendTex/RT ctors. > > Bug: skia: > Change-Id: I1466668e3502cd1e6e1f6aed4105e0f626d293dd > Reviewed-on: https://skia-review.googlesource.com/138987 > Commit-Queue: Greg Daniel <egdaniel@google.com> > Reviewed-by: Robert Phillips <robertphillips@google.com> TBR=egdaniel@google.com,bsalomon@google.com,robertphillips@google.com Change-Id: I4cba44858aafffbadc45e18349b93c741d7cfc66 No-Presubmit: true No-Tree-Checks: true No-Try: true Bug: skia: Reviewed-on: https://skia-review.googlesource.com/139220 Reviewed-by: Ethan Nicholas <ethannicholas@google.com> Commit-Queue: Ethan Nicholas <ethannicholas@google.com>
* Remove setting/use of GrPixelConfig in GrBackendTex/RT ctors.Gravatar Greg Daniel2018-07-03
| | | | | | | | Bug: skia: Change-Id: I1466668e3502cd1e6e1f6aed4105e0f626d293dd Reviewed-on: https://skia-review.googlesource.com/138987 Commit-Queue: Greg Daniel <egdaniel@google.com> Reviewed-by: Robert Phillips <robertphillips@google.com>
* GrTessellator: handle three consecutive collinear edges.Gravatar Stephen White2018-07-02
| | | | | | | | | | | | | | | In some cases, splitting may produce three consecutive edges which are collinear. The first one was being merged out, causing the third one to be missed. The fix is to switch the arguments to merge_edges_*, ensuring that the second parameter (the destination edge) is never merged out. Bug: 851409 Change-Id: I65be2e8222846c99f7bc8d17ea61ddead617cc31 Reviewed-on: https://skia-review.googlesource.com/138700 Reviewed-by: Robert Phillips <robertphillips@google.com> Commit-Queue: Stephen White <senorblanco@chromium.org>
* Remove sRGB config checks based on color spaceGravatar Brian Osman2018-07-02
| | | | | | | | | | | | | | | | All of the restrictions/assumptions that led to this code are gone, so we can always use appropriate color space. For the YUV provider, if/when we re-introduce 8888 sRGB, the color space will have a linear transfer function, so the color space xform will automatically do what was happening here. That removes the last usage of framebuffer sRGB control, so we can remove all kinds of GrPaint and GrPipeline plumbing for that feature. Change-Id: I24af1d498dbc75210f92f8c61b10aa31eec022f6 Reviewed-on: https://skia-review.googlesource.com/138986 Reviewed-by: Mike Klein <mtklein@chromium.org> Commit-Queue: Brian Osman <brianosman@google.com>
* Revert "Some scissor state cleanup."Gravatar Brian Salomon2018-07-02
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | This reverts commit a219419c9d76432dca74494b611ff1f59086d139. Reason for revert: breaking things Original change's description: > Some scissor state cleanup. > > Separate flushing the enablement of scissor from the rect in GrGLGpu. > > Move GrPipeline::ScissorState to a global enum and use more broadly. > Rename to GrScissorTest to avoid name conflict with existing > GrScissorState. > > Change-Id: Ib32160b3300bc12de2d2e1761d152fd1bba8b683 > Reviewed-on: https://skia-review.googlesource.com/137395 > Commit-Queue: Brian Salomon <bsalomon@google.com> > Reviewed-by: Chris Dalton <csmartdalton@google.com> TBR=bsalomon@google.com,csmartdalton@google.com Change-Id: If71a5c5efc86d4239b40675bad2a6cb1f77460f8 No-Presubmit: true No-Tree-Checks: true No-Try: true Reviewed-on: https://skia-review.googlesource.com/138900 Reviewed-by: Brian Salomon <bsalomon@google.com> Commit-Queue: Brian Salomon <bsalomon@google.com>
* Some scissor state cleanup.Gravatar Brian Salomon2018-07-02
| | | | | | | | | | | | | Separate flushing the enablement of scissor from the rect in GrGLGpu. Move GrPipeline::ScissorState to a global enum and use more broadly. Rename to GrScissorTest to avoid name conflict with existing GrScissorState. Change-Id: Ib32160b3300bc12de2d2e1761d152fd1bba8b683 Reviewed-on: https://skia-review.googlesource.com/137395 Commit-Queue: Brian Salomon <bsalomon@google.com> Reviewed-by: Chris Dalton <csmartdalton@google.com>
* Revert "GrTessellator: handle three consecutive collinear edges."Gravatar Mike Klein2018-06-29
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This reverts commit 26bb0e66f28c41cb1e8e39f00d848997fd33d97c. Reason for revert: segfaulty Here's a log with a stacktrace: https://chromium-swarm.appspot.com/task?id=3e658f7aa40dbb10&refresh=10 Original change's description: > GrTessellator: handle three consecutive collinear edges. > > In some cases, splitting may produce three consecutive edges which > are collinear. The first one was being merged out, causing the third > one to be missed. > > The fix is to switch the arguments to merge_edges_*, ensuring that the > second parameter (the destination edge) is never merged out. > > Bug: 851409. > Change-Id: I70fbbc506e97a26b259c1443b6d1787adec0f9b0 > Reviewed-on: https://skia-review.googlesource.com/138561 > Reviewed-by: Robert Phillips <robertphillips@google.com> > Commit-Queue: Stephen White <senorblanco@chromium.org> TBR=robertphillips@google.com,senorblanco@chromium.org Change-Id: I6ecfb4c487d6f96e9fae7b8b40d74162354ed57c No-Presubmit: true No-Tree-Checks: true No-Try: true Bug: 851409. Reviewed-on: https://skia-review.googlesource.com/138640 Reviewed-by: Mike Klein <mtklein@google.com> Commit-Queue: Mike Klein <mtklein@google.com>
* GrTessellator: handle three consecutive collinear edges.Gravatar Stephen White2018-06-29
| | | | | | | | | | | | | | | In some cases, splitting may produce three consecutive edges which are collinear. The first one was being merged out, causing the third one to be missed. The fix is to switch the arguments to merge_edges_*, ensuring that the second parameter (the destination edge) is never merged out. Bug: 851409. Change-Id: I70fbbc506e97a26b259c1443b6d1787adec0f9b0 Reviewed-on: https://skia-review.googlesource.com/138561 Reviewed-by: Robert Phillips <robertphillips@google.com> Commit-Queue: Stephen White <senorblanco@chromium.org>
* Add ear-clipping code to triangulate simple polygons.Gravatar Jim Van Verth2018-06-29
| | | | | | | | | | Use this to fill concave shadows. Bug: skia:7971 Change-Id: I63dc1ed845f9fa3fcd86f1ad13b03da23cae0313 Reviewed-on: https://skia-review.googlesource.com/135200 Commit-Queue: Jim Van Verth <jvanverth@google.com> Reviewed-by: Robert Phillips <robertphillips@google.com>
* implemented getting format from texture as virtual in gpu capsGravatar Timothy Liang2018-06-28
| | | | | | | | | Bug: skia: Change-Id: If6bbbd212ff472ea322d2bbed61995fe7ba85df7 Reviewed-on: https://skia-review.googlesource.com/138240 Commit-Queue: Timothy Liang <timliang@google.com> Reviewed-by: Brian Salomon <bsalomon@google.com> Reviewed-by: Greg Daniel <egdaniel@google.com>
* GrTessellator: handle collinear final vertex.Gravatar Stephen White2018-06-28
| | | | | | | | | | | | If the last vertex in a contour is collinear with its neighbours, remove it (this edge case was missing). Otherwise, the simplify step may try to split it indefinitely. Bug: 851409 Change-Id: I7efa4e616cdc1508a73c7a9f3de9d3f571569af8 Reviewed-on: https://skia-review.googlesource.com/138106 Reviewed-by: Robert Phillips <robertphillips@google.com> Commit-Queue: Stephen White <senorblanco@chromium.org>
* Revert "Remove drawTextBlob from device use drawGlyphRunList"Gravatar Robert Phillips2018-06-28
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This reverts commit e2e52e46ca63540d429656baeee48fd3a402be26. Reason for revert: See if this is blocking the Chrome roll Original change's description: > Remove drawTextBlob from device use drawGlyphRunList > > Convert all backends to use GlyphRunList instead of > text blobs. If the device did not originally implement > drawTextBlob it will be simulated by drawPosText on the > device. > > Other changes: > Change to using an origin from absolulte positioning. The GPU > code uses origin change to update blobs under translation. > > Change cluster to use const uint32_t instead of just > uint32_t. > > Add SkPaint to runs. > > The draw filter is hosted up to the canavas level and applied there. > > Change-Id: Ib105b6bd26b67db55f1c954e37c79fbdcaa9d4a2 > Reviewed-on: https://skia-review.googlesource.com/137224 > Reviewed-by: Herb Derby <herb@google.com> > Reviewed-by: Khusal Sagar <khushalsagar@chromium.org> > Reviewed-by: Hal Canary <halcanary@google.com> > Reviewed-by: Jim Van Verth <jvanverth@google.com> > Commit-Queue: Herb Derby <herb@google.com> TBR=jvanverth@google.com,halcanary@google.com,bungeman@google.com,herb@google.com,reed@google.com,khushalsagar@chromium.org,khushalsagar@google.com Change-Id: I4d93a534990c89deee7d3aaa00ec40d47e0d2ece No-Presubmit: true No-Tree-Checks: true No-Try: true Reviewed-on: https://skia-review.googlesource.com/138120 Reviewed-by: Robert Phillips <robertphillips@google.com> Commit-Queue: Robert Phillips <robertphillips@google.com>
* Remove drawTextBlob from device use drawGlyphRunListGravatar Herb Derby2018-06-28
| | | | | | | | | | | | | | | | | | | | | | | | | | Convert all backends to use GlyphRunList instead of text blobs. If the device did not originally implement drawTextBlob it will be simulated by drawPosText on the device. Other changes: Change to using an origin from absolulte positioning. The GPU code uses origin change to update blobs under translation. Change cluster to use const uint32_t instead of just uint32_t. Add SkPaint to runs. The draw filter is hosted up to the canavas level and applied there. Change-Id: Ib105b6bd26b67db55f1c954e37c79fbdcaa9d4a2 Reviewed-on: https://skia-review.googlesource.com/137224 Reviewed-by: Herb Derby <herb@google.com> Reviewed-by: Khusal Sagar <khushalsagar@chromium.org> Reviewed-by: Hal Canary <halcanary@google.com> Reviewed-by: Jim Van Verth <jvanverth@google.com> Commit-Queue: Herb Derby <herb@google.com>
* Fix some shadow issues.Gravatar Jim Van Verth2018-06-26
| | | | | | | | | | | | | | | | * Clamp path polygon points to nearest 1/16th of a pixel to help with floating point issues. * Added check for multiple contour paths. * Return empty SkVertices for certain degenerate cases to avoid unnecessary blurs. * Check iteration count in SkOffsetPolygon to avoid infinite loops. * Add new tests to verify these. Bug: skia: Change-Id: Ie6ad48d2504e065dcc822609d369f90c56ef3ad3 Reviewed-on: https://skia-review.googlesource.com/136701 Reviewed-by: Brian Salomon <bsalomon@google.com> Commit-Queue: Jim Van Verth <jvanverth@google.com>
* basic first pass at RGBA F32 supportGravatar Mike Klein2018-06-26
| | | | | | | | | | | | | Draws basically the same as f16. The existing load_f32, load_f32_dst, and store_f32 stages all had the same bug that we'd never noticed because dy was always 0 until now. Change-Id: Ibbd393fa1acc5df414be4cdef0f5a9d11dcccdb3 Reviewed-on: https://skia-review.googlesource.com/137585 Commit-Queue: Mike Klein <mtklein@chromium.org> Reviewed-by: Brian Osman <brianosman@google.com> Reviewed-by: Mike Reed <reed@google.com>