aboutsummaryrefslogtreecommitdiffhomepage
path: root/tests
Commit message (Collapse)AuthorAge
* Add internal grsurface flag to track if using gl rectangle or external texture.Gravatar Greg Daniel2018-05-02
| | | | | | | | Bug: skia: Change-Id: I84963833bbc3ae957c919a19f6e78fce2c9de7ef Reviewed-on: https://skia-review.googlesource.com/125294 Reviewed-by: Robert Phillips <robertphillips@google.com> Commit-Queue: Greg Daniel <egdaniel@google.com>
* fonts: Reland push font remoting.Gravatar Khushal2018-05-02
| | | | | | | | | | | | | | | | | | | This relands the following changes: 1) https://skia-review.googlesource.com/c/skia/+/120283 2) https://skia-review.googlesource.com/c/skia/+/125029 3) https://skia-review.googlesource.com/c/skia/+/125140 The original changes had to be reverted due to a memory leak in SkBaseDevice from SkTextBlobCacheDiffCanvas. This has been addressed by https://skia-review.googlesource.com/c/skia/+/125160 TBR=herb@google.com Bug: skia:7515, 831354 Change-Id: I73f4fcb1c397f31bf01553ff48c71ed2d6dd0770 Reviewed-on: https://skia-review.googlesource.com/125326 Commit-Queue: Khusal Sagar <khushalsagar@chromium.org> Reviewed-by: Khusal Sagar <khushalsagar@chromium.org>
* Reland "Remove devKerning"Gravatar Herb Derby2018-05-02
| | | | | | | | | | | | | | | | | | | | | | This is a reland of c86c5c0144b85d0bc8ec791f9609ee2d4e7d835a Original change's description: > Remove devKerning > > Dev kerning is not supported by any scalers. This is > mostly removed. The remaining fields fRsbDelta and > fLsbDelta are kept to keep Android compiling. > > Change-Id: If1a9ee9bb599d4e1bdf4b3751ac0c65246350809 > Reviewed-on: https://skia-review.googlesource.com/124921 > Reviewed-by: Ben Wagner <bungeman@google.com> > Commit-Queue: Herb Derby <herb@google.com> Change-Id: Ibf5fac5f1442c7e62392d5146ad460da27b10d5c Reviewed-on: https://skia-review.googlesource.com/125300 Reviewed-by: Herb Derby <herb@google.com> Reviewed-by: Mike Klein <mtklein@google.com> Commit-Queue: Herb Derby <herb@google.com>
* Take sk_sp<SkDevice> instead of SkDevice*Gravatar Herb Derby2018-05-02
| | | | | | | | | Change-Id: I0b296bf5b80adc19758a3dc99160be9d2ed05680 Reviewed-on: https://skia-review.googlesource.com/125160 Commit-Queue: Herb Derby <herb@google.com> Commit-Queue: Mike Reed <reed@google.com> Reviewed-by: Mike Reed <reed@google.com> Auto-Submit: Herb Derby <herb@google.com>
* Revert "fonts: Set up remote glyph caching to push fonts."Gravatar Mike Klein2018-05-02
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This reverts commit 101d56359a5a5dc3b8a2a4149ac171e25eb0bec0. Reason for revert: 5 of 5 Original change's description: > fonts: Set up remote glyph caching to push fonts. > > Currently the SkStrikeClient is designed to pull fonts from the server > on demand, and to pre-fetch a batched request by analyzing the ops using > a SkTextBlobCacheDiffCanvas. This change modifies the design to support > a push based model, where the server pushes fonts required by the client > and sets up the requisite SkGlyphCaches on the client prior to > rasterizing the ops. > > This model still relies on the SkTextBlobCacheDiffCanvas for analyzing > the glyphs required for rasterizing an op. The glyph caches required for > raster are locked and missing glyphs to be sent to the client are tracked > by the SkStrikeServer. The embedder can serialize this font data at any > point, but must ensure that this data is deserialized by the > SkStrikeClient at the remote end, before rasterizing any ops analyzed > prior to serialization. Any refs on the caches are released once the > font data is serialized by the server. > > The locking of glyph caches relies on the embedder providing discardable > handles. These handles can be created on the server and serialized to be > sent to the client, and map to an instance of SkGlyphCache. This allows > the server to control the lifetime of the caches on the client. > > Bug: skia:7515 > Change-Id: Id39f346b47b60899778404bbd0429ee811d0e53b > Reviewed-on: https://skia-review.googlesource.com/120283 > Commit-Queue: Khusal Sagar <khushalsagar@chromium.org> > Reviewed-by: Herb Derby <herb@google.com> TBR=mtklein@google.com,herb@google.com,khushalsagar@chromium.org Change-Id: If72caf968ddcbf70b8b9d71782a2339a118ed202 No-Presubmit: true No-Tree-Checks: true No-Try: true Bug: skia:7515 Reviewed-on: https://skia-review.googlesource.com/125264 Reviewed-by: Mike Klein <mtklein@google.com> Commit-Queue: Mike Klein <mtklein@google.com>
* Revert "Remove devKerning"Gravatar Mike Klein2018-05-02
| | | | | | | | | | | | | | | | | | | | | | | | | | | | This reverts commit c86c5c0144b85d0bc8ec791f9609ee2d4e7d835a. Reason for revert: 4 of 5 Original change's description: > Remove devKerning > > Dev kerning is not supported by any scalers. This is > mostly removed. The remaining fields fRsbDelta and > fLsbDelta are kept to keep Android compiling. > > Change-Id: If1a9ee9bb599d4e1bdf4b3751ac0c65246350809 > Reviewed-on: https://skia-review.googlesource.com/124921 > Reviewed-by: Ben Wagner <bungeman@google.com> > Commit-Queue: Herb Derby <herb@google.com> TBR=bungeman@google.com,herb@google.com,reed@google.com Change-Id: If865f702868192a1b72cd811baa996dd1282bbce No-Presubmit: true No-Tree-Checks: true No-Try: true Reviewed-on: https://skia-review.googlesource.com/125263 Reviewed-by: Mike Klein <mtklein@google.com> Commit-Queue: Mike Klein <mtklein@google.com>
* Revert "fonts: Bandaid fix for desc mismatch in SkRemoteGlyphCache."Gravatar Mike Klein2018-05-02
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This reverts commit ef4142a9bc5fb5fe3158139e18f41e7da867ff93. Reason for revert: 2 of 5 Original change's description: > fonts: Bandaid fix for desc mismatch in SkRemoteGlyphCache. > > Since the typeface proxies on the client don't perform the same > filtering done on the server during SkDescriptor generation, it causes > the desc mismatches during raster. Disable this filtering on the server > until this is resolved. > > Bug: 831354 > Change-Id: I5683372fb497a4874dede5aec9c734cd1392872c > Reviewed-on: https://skia-review.googlesource.com/125140 > Commit-Queue: Khusal Sagar <khushalsagar@chromium.org> > Reviewed-by: Herb Derby <herb@google.com> TBR=herb@google.com,khushalsagar@chromium.org Change-Id: I8e732f57aa49323c186e3c4ea6120ff1caf8e25b No-Presubmit: true No-Tree-Checks: true No-Try: true Bug: 831354 Reviewed-on: https://skia-review.googlesource.com/125261 Reviewed-by: Mike Klein <mtklein@google.com> Commit-Queue: Mike Klein <mtklein@google.com>
* fonts: Bandaid fix for desc mismatch in SkRemoteGlyphCache.Gravatar Khushal2018-05-01
| | | | | | | | | | | | | Since the typeface proxies on the client don't perform the same filtering done on the server during SkDescriptor generation, it causes the desc mismatches during raster. Disable this filtering on the server until this is resolved. Bug: 831354 Change-Id: I5683372fb497a4874dede5aec9c734cd1392872c Reviewed-on: https://skia-review.googlesource.com/125140 Commit-Queue: Khusal Sagar <khushalsagar@chromium.org> Reviewed-by: Herb Derby <herb@google.com>
* Remove devKerningGravatar Herb Derby2018-05-01
| | | | | | | | | | | Dev kerning is not supported by any scalers. This is mostly removed. The remaining fields fRsbDelta and fLsbDelta are kept to keep Android compiling. Change-Id: If1a9ee9bb599d4e1bdf4b3751ac0c65246350809 Reviewed-on: https://skia-review.googlesource.com/124921 Reviewed-by: Ben Wagner <bungeman@google.com> Commit-Queue: Herb Derby <herb@google.com>
* Fix index overflow check for rewriting fans as triangles.Gravatar Brian Salomon2018-05-01
| | | | | | | | | | Not only could the old test cause int overflow, it was just wrong. Bug: skia:8085 Change-Id: Id6b81f4aa1b115f0dbfd2266aee8fab5d5d30aee Reviewed-on: https://skia-review.googlesource.com/124779 Reviewed-by: Chris Dalton <csmartdalton@google.com> Commit-Queue: Brian Salomon <bsalomon@google.com>
* fonts: Set up remote glyph caching to push fonts.Gravatar Khushal2018-05-01
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | Currently the SkStrikeClient is designed to pull fonts from the server on demand, and to pre-fetch a batched request by analyzing the ops using a SkTextBlobCacheDiffCanvas. This change modifies the design to support a push based model, where the server pushes fonts required by the client and sets up the requisite SkGlyphCaches on the client prior to rasterizing the ops. This model still relies on the SkTextBlobCacheDiffCanvas for analyzing the glyphs required for rasterizing an op. The glyph caches required for raster are locked and missing glyphs to be sent to the client are tracked by the SkStrikeServer. The embedder can serialize this font data at any point, but must ensure that this data is deserialized by the SkStrikeClient at the remote end, before rasterizing any ops analyzed prior to serialization. Any refs on the caches are released once the font data is serialized by the server. The locking of glyph caches relies on the embedder providing discardable handles. These handles can be created on the server and serialized to be sent to the client, and map to an instance of SkGlyphCache. This allows the server to control the lifetime of the caches on the client. Bug: skia:7515 Change-Id: Id39f346b47b60899778404bbd0429ee811d0e53b Reviewed-on: https://skia-review.googlesource.com/120283 Commit-Queue: Khusal Sagar <khushalsagar@chromium.org> Reviewed-by: Herb Derby <herb@google.com>
* Convert skcms to only export functions (not data)Gravatar Brian Osman2018-05-01
| | | | | | | | | | | | | | This simplifies shared library builds on Windows (no need to conditionally change declspec to dllimport). Once this lands, we can make the same change (plus update internal references): https://skia-review.googlesource.com/c/skcms/+/124982 Change-Id: I0d4fa9031258f77d370e6e6e018afaf543c29d85 Reviewed-on: https://skia-review.googlesource.com/124983 Commit-Queue: Brian Osman <brianosman@google.com> Reviewed-by: Mike Klein <mtklein@chromium.org>
* Add test to ensure that skcms' sRGB turns into Skia's sRGB color spaceGravatar Brian Osman2018-04-30
| | | | | | | | Change-Id: Ib69926218895f9c3df8d02906188f5e54d134fad Reviewed-on: https://skia-review.googlesource.com/124265 Commit-Queue: Brian Osman <brianosman@google.com> Auto-Submit: Brian Osman <brianosman@google.com> Reviewed-by: Mike Klein <mtklein@chromium.org>
* Rewrite SkVertices specified with triangle fans as indexed trianglesGravatar Brian Salomon2018-04-28
| | | | | | | Change-Id: Ifaacc426bc657b324f6a885a8ef70b347b048226 Reviewed-on: https://skia-review.googlesource.com/124349 Commit-Queue: Brian Salomon <bsalomon@google.com> Reviewed-by: Chris Dalton <csmartdalton@google.com>
* Revert "Reland "Revert "Add arcs as a specialized geometry to GrShape."""Gravatar Brian Salomon2018-04-26
| | | | | | | | | | This reverts commit 580aee2fa4a57bf8208498fbc23acea04e16e092. Bug: skia:7794 Change-Id: I9c2b923859c826dff58c22c529dc4e2ab4d0f186 Reviewed-on: https://skia-review.googlesource.com/124042 Reviewed-by: Brian Salomon <bsalomon@google.com> Commit-Queue: Brian Salomon <bsalomon@google.com>
* Reland "Revert "Add arcs as a specialized geometry to GrShape.""Gravatar Brian Salomon2018-04-25
| | | | | | | | | | | | | | | | | | | | | | | | | | | | This reverts commit 8a98bc96748d1bdaf9c2d8cfa0b672e3a035973d. Reason for revert: <INSERT REASONING HERE> Original change's description: > Revert "Revert "Add arcs as a specialized geometry to GrShape."" > > This reverts commit af88ec37124846a0168a4ab061bf10cc6030c2d6. > > Bug: skia:7794 > Change-Id: I2d0e1d7b4e025481241d823b09f5de5d0f1a13eb > Reviewed-on: https://skia-review.googlesource.com/123627 > Reviewed-by: Robert Phillips <robertphillips@google.com> > Commit-Queue: Brian Salomon <bsalomon@google.com> TBR=bsalomon@google.com,robertphillips@google.com Change-Id: Ib09a533600028b76a69b455c952f3dd12b39bdba No-Presubmit: true No-Tree-Checks: true No-Try: true Bug: skia:7794 Reviewed-on: https://skia-review.googlesource.com/123780 Reviewed-by: Brian Salomon <bsalomon@google.com> Commit-Queue: Brian Salomon <bsalomon@google.com>
* Make SkString::appendf safe for long strings.Gravatar Brian Salomon2018-04-25
| | | | | | | | Bug: skia:7841 Change-Id: I5bc77f5230b63da74e42d756ab4a1fefcfab9926 Reviewed-on: https://skia-review.googlesource.com/123634 Reviewed-by: Mike Reed <reed@google.com> Commit-Queue: Brian Salomon <bsalomon@google.com>
* Remove the MSAA path rendererGravatar Chris Dalton2018-04-25
| | | | | | | | Bug: skia: Change-Id: Ib18bede613c8d27fd6326f655dc2d638e35870ff Reviewed-on: https://skia-review.googlesource.com/123726 Reviewed-by: Brian Salomon <bsalomon@google.com> Commit-Queue: Chris Dalton <csmartdalton@google.com>
* Revert "Revert "Add arcs as a specialized geometry to GrShape.""Gravatar Brian Salomon2018-04-25
| | | | | | | | | | This reverts commit af88ec37124846a0168a4ab061bf10cc6030c2d6. Bug: skia:7794 Change-Id: I2d0e1d7b4e025481241d823b09f5de5d0f1a13eb Reviewed-on: https://skia-review.googlesource.com/123627 Reviewed-by: Robert Phillips <robertphillips@google.com> Commit-Queue: Brian Salomon <bsalomon@google.com>
* Experiment to track coverage in a layerGravatar Mike Reed2018-04-25
| | | | | | | | Bug: skia: Change-Id: I5ed334f63e64991944394dc8103092a2c6280546 Reviewed-on: https://skia-review.googlesource.com/122000 Commit-Queue: Mike Reed <reed@google.com> Reviewed-by: Mike Klein <mtklein@google.com>
* Compile with latest clang 7.Gravatar Ben Wagner2018-04-24
| | | | | | | | | | | | | Changes to warnings in clang introduced by https://reviews.llvm.org/D43322 and https://reviews.llvm.org/D44883 cause warning as error failures when building Skia. In particular this addresses return-std-move-in-c++11 and self-assign-overloaded. Change-Id: I680318098d8af1b64fba464585c7cdfcfcf39d66 Reviewed-on: https://skia-review.googlesource.com/123582 Reviewed-by: Greg Daniel <egdaniel@google.com> Reviewed-by: Mike Klein <mtklein@google.com> Commit-Queue: Ben Wagner <bungeman@google.com>
* prepare to remove obsolete macrosGravatar Cary Clark2018-04-24
| | | | | | | | | | | | | | SkColorSetARGBMacro and SkColorSetARGBInline are macros which will be deleted. Replace them with a standard equivalent. R=scroggo@google.com Bug: skia:6898 Change-Id: I16e010776e991c19a375d0686ecd1b1cc4c59a9b Reviewed-on: https://skia-review.googlesource.com/123501 Auto-Submit: Cary Clark <caryclark@skia.org> Commit-Queue: Leon Scroggins <scroggo@google.com> Reviewed-by: Leon Scroggins <scroggo@google.com>
* Reland "call skcms_OptimizeForSpeed()"Gravatar Mike Klein2018-04-24
| | | | | | | | | | | | | | | | | | | | | | | This is a reland of 3b8feb331a11989fdd82c2d8d18e576df98e8895 Original change's description: > call skcms_OptimizeForSpeed() > > I've guarded src and dst separately, so that we can land, > rebaseline just the src change, and then later (when it > does something), rebaseline optimizing dst separately. > > Small threshold tweak to keep a unit test passing. > > Change-Id: I57cc43c54b6065f58fa8f9448ea1d73fc42505f0 > Reviewed-on: https://skia-review.googlesource.com/123181 > Commit-Queue: Mike Klein <mtklein@chromium.org> > Reviewed-by: Brian Osman <brianosman@google.com> Change-Id: Ia29b4c941e121486a627ac7221947f4a452211ad Reviewed-on: https://skia-review.googlesource.com/123480 Reviewed-by: Mike Klein <mtklein@google.com> Commit-Queue: Mike Klein <mtklein@google.com>
* Revert "Add arcs as a specialized geometry to GrShape."Gravatar Mike Klein2018-04-24
| | | | | | | | | | | | | | | | | | | | | | | | | | This reverts commit 255bcf57ffd9db368cd66ca9697549efd799153e. Reason for revert: layout and scuba image diffs Original change's description: > Add arcs as a specialized geometry to GrShape. > > BUG: skia:7794 > > Change-Id: I484693711f48e55631732a0f4ee97e2848dec89d > Reviewed-on: https://skia-review.googlesource.com/122900 > Commit-Queue: Brian Salomon <bsalomon@google.com> > Reviewed-by: Robert Phillips <robertphillips@google.com> TBR=bsalomon@google.com,robertphillips@google.com Change-Id: I9293b8fbb535d940bca5fc30a95908416b9eb7a7 No-Presubmit: true No-Tree-Checks: true No-Try: true Reviewed-on: https://skia-review.googlesource.com/123362 Reviewed-by: Mike Klein <mtklein@google.com> Commit-Queue: Mike Klein <mtklein@google.com>
* Revert "call skcms_OptimizeForSpeed()"Gravatar Mike Klein2018-04-24
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This reverts commit 3b8feb331a11989fdd82c2d8d18e576df98e8895. Reason for revert: darks too bright Original change's description: > call skcms_OptimizeForSpeed() > > I've guarded src and dst separately, so that we can land, > rebaseline just the src change, and then later (when it > does something), rebaseline optimizing dst separately. > > Small threshold tweak to keep a unit test passing. > > Change-Id: I57cc43c54b6065f58fa8f9448ea1d73fc42505f0 > Reviewed-on: https://skia-review.googlesource.com/123181 > Commit-Queue: Mike Klein <mtklein@chromium.org> > Reviewed-by: Brian Osman <brianosman@google.com> TBR=mtklein@chromium.org,brianosman@google.com Change-Id: I23e59d4dc711e8b112e70f31a5c9abad67551bcd No-Presubmit: true No-Tree-Checks: true No-Try: true Reviewed-on: https://skia-review.googlesource.com/123361 Reviewed-by: Mike Klein <mtklein@google.com> Commit-Queue: Mike Klein <mtklein@google.com>
* Add arcs as a specialized geometry to GrShape.Gravatar Brian Salomon2018-04-23
| | | | | | | | | BUG: skia:7794 Change-Id: I484693711f48e55631732a0f4ee97e2848dec89d Reviewed-on: https://skia-review.googlesource.com/122900 Commit-Queue: Brian Salomon <bsalomon@google.com> Reviewed-by: Robert Phillips <robertphillips@google.com>
* call skcms_OptimizeForSpeed()Gravatar Mike Klein2018-04-23
| | | | | | | | | | | | | I've guarded src and dst separately, so that we can land, rebaseline just the src change, and then later (when it does something), rebaseline optimizing dst separately. Small threshold tweak to keep a unit test passing. Change-Id: I57cc43c54b6065f58fa8f9448ea1d73fc42505f0 Reviewed-on: https://skia-review.googlesource.com/123181 Commit-Queue: Mike Klein <mtklein@chromium.org> Reviewed-by: Brian Osman <brianosman@google.com>
* Reland "Prevent masked solid-color draws from being turned into clears"Gravatar Robert Phillips2018-04-23
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This reverts commit f92bb3785fa8015cde9f379be52dedfce5abc290. Reason for revert: The new unit test has been suppressed on ANGLE Original change's description: > Revert "Prevent masked solid-color draws from being turned into clears" > > This reverts commit e9f2bbe082e9e1eb9d76e3043adedc9443427d8d. > > Reason for revert: ANGLE > > Original change's description: > > Prevent masked solid-color draws from being turned into clears > > > > GrRenderTargetContext::drawRect was eliding a BlurMask filtered circle. > > > > Bug: skia:7765 > > Change-Id: Id98c059f7d786ee5c9bca839c8e099997ff2aedb > > Reviewed-on: https://skia-review.googlesource.com/122793 > > Reviewed-by: Brian Salomon <bsalomon@google.com> > > TBR=bsalomon@google.com,robertphillips@google.com > > Change-Id: I1b7752eab0fcf55ab6248eed587fd85d438efd78 > No-Presubmit: true > No-Tree-Checks: true > No-Try: true > Bug: skia:7765 > Reviewed-on: https://skia-review.googlesource.com/122960 > Reviewed-by: Robert Phillips <robertphillips@google.com> > Commit-Queue: Robert Phillips <robertphillips@google.com> TBR=bsalomon@google.com,robertphillips@google.com Change-Id: If432c24548ef0f6df4fd6a06aa3b1fb38ba793b8 No-Presubmit: true No-Tree-Checks: true No-Try: true Bug: skia:7765 Reviewed-on: https://skia-review.googlesource.com/123000 Reviewed-by: Robert Phillips <robertphillips@google.com> Commit-Queue: Robert Phillips <robertphillips@google.com>
* Revert "Prevent masked solid-color draws from being turned into clears"Gravatar Robert Phillips2018-04-23
| | | | | | | | | | | | | | | | | | | | | | | | | | | This reverts commit e9f2bbe082e9e1eb9d76e3043adedc9443427d8d. Reason for revert: ANGLE Original change's description: > Prevent masked solid-color draws from being turned into clears > > GrRenderTargetContext::drawRect was eliding a BlurMask filtered circle. > > Bug: skia:7765 > Change-Id: Id98c059f7d786ee5c9bca839c8e099997ff2aedb > Reviewed-on: https://skia-review.googlesource.com/122793 > Reviewed-by: Brian Salomon <bsalomon@google.com> TBR=bsalomon@google.com,robertphillips@google.com Change-Id: I1b7752eab0fcf55ab6248eed587fd85d438efd78 No-Presubmit: true No-Tree-Checks: true No-Try: true Bug: skia:7765 Reviewed-on: https://skia-review.googlesource.com/122960 Reviewed-by: Robert Phillips <robertphillips@google.com> Commit-Queue: Robert Phillips <robertphillips@google.com>
* Prevent masked solid-color draws from being turned into clearsGravatar Robert Phillips2018-04-23
| | | | | | | | | GrRenderTargetContext::drawRect was eliding a BlurMask filtered circle. Bug: skia:7765 Change-Id: Id98c059f7d786ee5c9bca839c8e099997ff2aedb Reviewed-on: https://skia-review.googlesource.com/122793 Reviewed-by: Brian Salomon <bsalomon@google.com>
* Prevent matrix stack from being corrupted if a rotated image filter is ↵Gravatar Robert Phillips2018-04-20
| | | | | | | | | | clipped out Bug: skia:7765 Change-Id: Id76b63cebc25dcdff02d4ba3f6d6bba6f2b6b842 Reviewed-on: https://skia-review.googlesource.com/122782 Reviewed-by: Florin Malita <fmalita@chromium.org> Commit-Queue: Robert Phillips <robertphillips@google.com>
* When creating testing backendTexture take colorspace into account.Gravatar Greg Daniel2018-04-19
| | | | | | | | | Bug: skia: Change-Id: Ifa8dbad3eca81790648476f9a6d3fa5a088fede9 Reviewed-on: https://skia-review.googlesource.com/122341 Reviewed-by: Robert Phillips <robertphillips@google.com> Reviewed-by: Brian Osman <brianosman@google.com> Commit-Queue: Greg Daniel <egdaniel@google.com>
* path is rect track cornersGravatar Cary Clark2018-04-19
| | | | | | | | | | | | | | | | | | | | This was triggered by an exploit that started the first edge well outside the final rectangle, causing the captured to exceed the correct result. Ivan observes that we really only want the first and third corners to compute the bounds, so remove the tracking code that looks for a valid range of points, and record the corners instead. R=robertphillips@google.com Bug: 824145,skia:7792 Change-Id: If228573d0f05c7158dba8142c144d13834e691ec Reviewed-on: https://skia-review.googlesource.com/122081 Commit-Queue: Cary Clark <caryclark@skia.org> Commit-Queue: Robert Phillips <robertphillips@google.com> Reviewed-by: Robert Phillips <robertphillips@google.com> Auto-Submit: Cary Clark <caryclark@skia.org>
* Prevent unnecessary/unbounded growth of SkTDynamicHash capacityGravatar Florin Malita2018-04-18
| | | | | | | | | | | | | | | | | | | | | | | SkTDynamicHash doesn't immediately recycle slots for removed entries, but instead just marks them as deleted. The only way to reclaim deleted slots currently is when an exponential grow/resize is triggered. A consequence of this is that the capacity/allocated storage can grow indefinitely when the hash is long-lived and churning -- even if the number of active entries is small/stable. To prevent this, I propose we only grow the capacity when the number of active slots constitutes a significant portion. Otherwise (when most slots are deleted), we trigger a "purge" (resize to the same capacity) to clear the tombstones. Bug: chromium:832482 Change-Id: Iefdcd7439f7d62ac021e176b71007d207c8bc876 Reviewed-on: https://skia-review.googlesource.com/122082 Reviewed-by: Mike Klein <mtklein@chromium.org> Commit-Queue: Florin Malita <fmalita@chromium.org>
* ccpr: Implement conicsGravatar Chris Dalton2018-04-18
| | | | | | | | | | TBR=egdaniel@google.com Bug: skia: Change-Id: Idf7811dc285961db52db41c9ff145afda40c274d Reviewed-on: https://skia-review.googlesource.com/122127 Reviewed-by: Chris Dalton <csmartdalton@google.com> Commit-Queue: Chris Dalton <csmartdalton@google.com>
* Always call endFlush on opLists that might survive a flushGravatar Chris Dalton2018-04-18
| | | | | | | | | | | | We were missing a few that got unreffed due to failed proxy instantiation. Bug: skia:7655 Bug: skia:7111 Change-Id: I95847a16890f2993a1433d4d9fdaa8a4a6c2f0b6 Reviewed-on: https://skia-review.googlesource.com/122121 Reviewed-by: Robert Phillips <robertphillips@google.com> Commit-Queue: Chris Dalton <csmartdalton@google.com>
* Convert A8 D32 mask blitters to Sk4pxGravatar Florin Malita2018-04-18
| | | | | | | | | | | | | | | | | | | | | | | | | Improves the newly added bench by ~25% (hsw): -- before -- micros bench 2298.34 shadermaskfilter_picture_80 8888 2339.60 shadermaskfilter_picture_ff 8888 2287.11 shadermaskfilter_bitmap_80 8888 2223.14 shadermaskfilter_bitmap_ff 8888 -- after -- 1693.36 shadermaskfilter_picture_80 8888 1637.45 shadermaskfilter_picture_ff 8888 1691.65 shadermaskfilter_bitmap_80 8888 1637.70 shadermaskfilter_bitmap_ff 8888 But: skia:7810 Change-Id: I7274b10f517551ee2c0646842f72e0372d55e509 Reviewed-on: https://skia-review.googlesource.com/121642 Commit-Queue: Florin Malita <fmalita@chromium.org> Reviewed-by: Mike Klein <mtklein@google.com>
* fix path is rect flaw exposed by goldGravatar Cary Clark2018-04-18
| | | | | | | | | | | | | | | | | | | One of the path is rect bug fixes changed the behavior of zero-length strokes which showed up as a change in Gold. The bug is if a rect is defined by a series of colinear movetos, the bounds did not work out if the rect started and stopped in the middle of a side. R=robertphillips@google.com Bug: 824145,skia:7792 Change-Id: I226545efeda03dedd928eebc120d2508b428fef0 Reviewed-on: https://skia-review.googlesource.com/122002 Auto-Submit: Cary Clark <caryclark@skia.org> Reviewed-by: Robert Phillips <robertphillips@google.com> Commit-Queue: Cary Clark <caryclark@skia.org>
* IWYU for some more test files starting with 'C'.Gravatar Ben Wagner2018-04-17
| | | | | | | Change-Id: I010527b342cbfa0b425ef0d00966219413d9e77d Reviewed-on: https://skia-review.googlesource.com/121886 Reviewed-by: Herb Derby <herb@google.com> Commit-Queue: Ben Wagner <bungeman@google.com>
* No long require copy as draw for vulkan wrapped resources.Gravatar Greg Daniel2018-04-17
| | | | | | | | | | | | | | With the recent changes to GrBackendTexture and the atomic ref counted GrVkImageLayout, this should not longer be an issue for cross context images. There still is the requirement that they need to manually synchronize the submission of work involving the image on two threads, but that is a requirement regardless of layout issues. Bug: skia: Change-Id: Ia86e51fda8606838dabd1bc36cf14c7679b46d49 Reviewed-on: https://skia-review.googlesource.com/121349 Commit-Queue: Greg Daniel <egdaniel@google.com> Reviewed-by: Brian Osman <brianosman@google.com>
* path is rect diag test is requiredGravatar Cary Clark2018-04-17
| | | | | | | | | | | | | | | Removed a test that appeared to go uncalled; Ivan to the rescue, with a test case proving that it is required. R=robertphillips@google.com Bug: 824145,skia:7792 Change-Id: I7df9688072bd36b7597673148e3fe5dbbf82f5a7 Reviewed-on: https://skia-review.googlesource.com/121883 Commit-Queue: Cary Clark <caryclark@skia.org> Commit-Queue: Robert Phillips <robertphillips@google.com> Auto-Submit: Cary Clark <caryclark@skia.org> Reviewed-by: Robert Phillips <robertphillips@google.com>
* path is rect bug number twelveGravatar Cary Clark2018-04-17
| | | | | | | | | | | | | | | | | | Exposes that final close along a diagonal need not include a close verb if the subsequent verb is move; so we have to check for a diagonal then. The later check for diagonal included a comment that it may not be needed which does appear to be the case. R=robertphillips@google.com Bug: 824145,skia:7792 Change-Id: I17a9414e8b3e69b82c2eda28195696eae4e3d513 Reviewed-on: https://skia-review.googlesource.com/121801 Commit-Queue: Cary Clark <caryclark@skia.org> Commit-Queue: Robert Phillips <robertphillips@google.com> Auto-Submit: Cary Clark <caryclark@skia.org> Reviewed-by: Robert Phillips <robertphillips@google.com>
* yet another path is rect exploitGravatar Cary Clark2018-04-17
| | | | | | | | | | | | | | | This one accumulates the othershoot when all four sides have the same direction, and the final side when closed should cause the overshoot to be ignored. Docs-Preview: https://skia.org/?cl=121787 Bug: 824145,skia:7792 Change-Id: I71ea0fcdd0f03a4fcac224b57220c65c321112f6 Reviewed-on: https://skia-review.googlesource.com/121787 Commit-Queue: Cary Clark <caryclark@skia.org> Commit-Queue: Robert Phillips <robertphillips@google.com> Auto-Submit: Cary Clark <caryclark@skia.org> Reviewed-by: Robert Phillips <robertphillips@google.com>
* a more involved path is rect bugGravatar Cary Clark2018-04-17
| | | | | | | | | | | | | | | | | | This is bug number ten in the series, and is the most interesting. It exploits that the code tracks corners 0, 2, and 3 but not corner 1. Changing the code to track all corners is the biggest so far, and while it (hopefully) simplifies things, the presence of new code may signify more bugs to come. R=robertphillips@google.com Bug: 824145,skia::7792 Change-Id: Ia18e4d80fbed06ae6d9c89dcb4c462c5610213cc Reviewed-on: https://skia-review.googlesource.com/121487 Reviewed-by: Robert Phillips <robertphillips@google.com> Commit-Queue: Cary Clark <caryclark@google.com>
* Revert "ccpr: Implement conics"Gravatar Chris Dalton2018-04-16
| | | | | | | | | | | | | | | | | | | | | | | | | | This reverts commit 98b241573e6083c4c7f0ce9e30cc214c4da1a8ba. Reason for revert: TSAN not happy Original change's description: > ccpr: Implement conics > > Bug: skia: > Change-Id: I4bae8b059072af987abb7b2d9c57fe08f783d680 > Reviewed-on: https://skia-review.googlesource.com/120040 > Commit-Queue: Chris Dalton <csmartdalton@google.com> > Reviewed-by: Greg Daniel <egdaniel@google.com> TBR=egdaniel@google.com,bsalomon@google.com,csmartdalton@google.com Change-Id: Ic29bf660f042c20b7e4492b03400412e378dbb8a No-Presubmit: true No-Tree-Checks: true No-Try: true Bug: skia: Reviewed-on: https://skia-review.googlesource.com/121717 Reviewed-by: Chris Dalton <csmartdalton@google.com> Commit-Queue: Chris Dalton <csmartdalton@google.com>
* ccpr: Implement conicsGravatar Chris Dalton2018-04-16
| | | | | | | | Bug: skia: Change-Id: I4bae8b059072af987abb7b2d9c57fe08f783d680 Reviewed-on: https://skia-review.googlesource.com/120040 Commit-Queue: Chris Dalton <csmartdalton@google.com> Reviewed-by: Greg Daniel <egdaniel@google.com>
* Remove SkPaint::kGenA8FromLCD_Flag.Gravatar Ben Wagner2018-04-16
| | | | | | | | | | | | | The original intent of this flag is now handled by SkPixelGeomety on SkSurfaceProps on SkSurface. BUG=skia:7515 Change-Id: I54bb1be072b5b5b2164a59196bfeacac254823c7 Reviewed-on: https://skia-review.googlesource.com/121346 Commit-Queue: Ben Wagner <bungeman@google.com> Reviewed-by: Herb Derby <herb@google.com> Reviewed-by: Jim Van Verth <jvanverth@google.com>
* Don't allow ganesh to allocate mip maps for wrapped textures.Gravatar Greg Daniel2018-04-16
| | | | | | | | | | | | | | We will not allocate new mips on a wrapped texture but we will use mips if the wrapped texture already has one. If we need mips for a draw this will trigger a copy to occur. Also some cleanup up of our InternalSurfaceFlags in general. Bug: skia:7806 Change-Id: I7aa666478cc91bba6e0644b323825fcc9b49793a Reviewed-on: https://skia-review.googlesource.com/121348 Commit-Queue: Greg Daniel <egdaniel@google.com> Reviewed-by: Robert Phillips <robertphillips@google.com>
* Make TestCase class in GrShapeTest heap allocate its GrShapesGravatar Brian Salomon2018-04-16
| | | | | | | | | Uses less stack space in test functions. Change-Id: I50a66cc27d95c2b4e2292184b928f7bbd71789f0 Reviewed-on: https://skia-review.googlesource.com/121482 Commit-Queue: Brian Salomon <bsalomon@google.com> Reviewed-by: Robert Phillips <robertphillips@google.com>
* rewrite iterator to make msvc happyGravatar Mike Reed2018-04-13
| | | | | | | | | | | | Revert "Revert "add test for degenerate canvas dimension"" This reverts commit 1749af20a11d0f364dbb7cad8dc89101f956c923. Bug: skia: Change-Id: I382cbef397dfba600a6779b159764239399b177f Reviewed-on: https://skia-review.googlesource.com/121344 Reviewed-by: Mike Reed <reed@google.com> Commit-Queue: Mike Reed <reed@google.com>