aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/core/SkMatrix.cpp
Commit message (Collapse)AuthorAge
* remove unneeded scale from procsGravatar Mike Reed2018-07-12
| | | | | | | | Bug: skia: Change-Id: I85adbbaf0e9d7d23c3f07490a1d323c87e8aa4da Reviewed-on: https://skia-review.googlesource.com/140980 Reviewed-by: Cary Clark <caryclark@google.com> Commit-Queue: Mike Reed <reed@google.com>
* 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>
* Stop using SkTSwap.Gravatar Ben Wagner2018-06-19
| | | | | | | | | | | | | Use std::swap instead. It does not appear that any external user specializes SkTSwap, but some may still use it. This removes all use in Skia so that SkTSwap can later be removed in a smaller CL. After that the <utility> include can be removed from SkTypes.h. Change-Id: If03d4ee07dbecda961aa9f0dc34d171ef5168753 Reviewed-on: https://skia-review.googlesource.com/135578 Reviewed-by: Hal Canary <halcanary@google.com> Reviewed-by: Mike Klein <mtklein@google.com> Commit-Queue: Ben Wagner <bungeman@google.com>
* Revert "Revert "SkTypes: extract SkTo""Gravatar Hal Canary2018-06-14
| | | | | | | | | | | | | | | | This reverts commit fdcfb8b7c23fbf18f872d2c31d27978235033876. > Original change's description: > > SkTypes: extract SkTo > > > > Change-Id: I8de790d5013db2105ad885fa2683303d7c250b09 > > Reviewed-on: https://skia-review.googlesource.com/133620 > > Reviewed-by: Mike Klein <mtklein@google.com> Change-Id: Ida74fbc5c21248a724a5edbf9fae18a33bcb23aa Reviewed-on: https://skia-review.googlesource.com/134506 Reviewed-by: Mike Klein <mtklein@google.com> Commit-Queue: Hal Canary <halcanary@google.com>
* Revert "SkTypes: extract SkTo"Gravatar Hal Canary2018-06-13
| | | | | | | | | | | | | | | | | | | | | | | This reverts commit 2a2f67592602b18527bc3fd449132d420cd5b62e. Reason for revert: this appears to be what is holding up the Chrome roll. Original change's description: > SkTypes: extract SkTo > > Change-Id: I8de790d5013db2105ad885fa2683303d7c250b09 > Reviewed-on: https://skia-review.googlesource.com/133620 > Reviewed-by: Mike Klein <mtklein@google.com> TBR=mtklein@google.com,halcanary@google.com No-Presubmit: true No-Tree-Checks: true No-Try: true Change-Id: Iafd738aedfb679a23c061a51afe4b98a8d4cdfae Reviewed-on: https://skia-review.googlesource.com/134504 Reviewed-by: Hal Canary <halcanary@google.com> Commit-Queue: Hal Canary <halcanary@google.com>
* SkTypes: extract SkToGravatar Hal Canary2018-06-12
| | | | | | Change-Id: I8de790d5013db2105ad885fa2683303d7c250b09 Reviewed-on: https://skia-review.googlesource.com/133620 Reviewed-by: Mike Klein <mtklein@google.com>
* rebaseGravatar Cary Clark2018-06-08
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This reverts commit 32a4910e57b1fdd3c8671de1ee85e05ca21d079f. Reason for revert: SkMatrix::toString use has been removed from flutter and has been picked up in fuchsia Additionally some bookmaker changes take into account recent additions of typedef comments and the generated header comment. Original change's description: > Revert "remove toString" > > This reverts commit 5191880cbf3ee4d122b0d11b4945fbab0784fda7. > > Reason for revert: broke flutter > > Original change's description: > > remove toString > > > > toString may have been used by obsolete debugger only > > find out if that is so > > > > R=​brianosman@google.com,bsalomon@google.com > > > > Docs-Preview: https://skia.org/?cl=119894 > > Bug:830651 > > Change-Id: I737f19b7d3fbc869bea2f443fa3b5ed7c1393ffd > > Reviewed-on: https://skia-review.googlesource.com/119894 > > Commit-Queue: Cary Clark <caryclark@google.com> > > Reviewed-by: Brian Salomon <bsalomon@google.com> > > TBR=bsalomon@google.com,brianosman@google.com,caryclark@google.com,caryclark@skia.org > > Change-Id: I9f81de6c3615ee0608bcea9081b77239b4b8816c TBR=bsalomon@google.com,brianosman@google.com # Not skipping CQ checks because original CL landed > 1 day ago. Reviewed-on: https://skia-review.googlesource.com/129623 Reviewed-by: Cary Clark <caryclark@skia.org> Commit-Queue: Cary Clark <caryclark@google.com> Docs-Preview: https://skia.org/?cl=133583 Bug: 830651 Change-Id: If8499e796be63580ad419e150e94d43e8b89de1b Reviewed-on: https://skia-review.googlesource.com/133583 Commit-Queue: Cary Clark <caryclark@skia.org> Auto-Submit: Cary Clark <caryclark@skia.org>
* Revert "Reland "remove toString""Gravatar Cary Clark2018-05-31
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This reverts commit 92e37b6d79f12ccfaaf7671413316952d182267d. Reason for revert: toString still used by flutter Original change's description: > Reland "remove toString" > > This reverts commit 32a4910e57b1fdd3c8671de1ee85e05ca21d079f. > > Reason for revert: SkMatrix::toString use has been removed from flutter and has been picked up in fuchsia > > Original change's description: > > Revert "remove toString" > > > > This reverts commit 5191880cbf3ee4d122b0d11b4945fbab0784fda7. > > > > Reason for revert: broke flutter > > > > Original change's description: > > > remove toString > > > > > > toString may have been used by obsolete debugger only > > > find out if that is so > > > > > > R=​brianosman@google.com,bsalomon@google.com > > > > > > Docs-Preview: https://skia.org/?cl=119894 > > > Bug:830651 > > > Change-Id: I737f19b7d3fbc869bea2f443fa3b5ed7c1393ffd > > > Reviewed-on: https://skia-review.googlesource.com/119894 > > > Commit-Queue: Cary Clark <caryclark@google.com> > > > Reviewed-by: Brian Salomon <bsalomon@google.com> > > > > TBR=bsalomon@google.com,brianosman@google.com,caryclark@google.com,caryclark@skia.org > > > > Change-Id: I9f81de6c3615ee0608bcea9081b77239b4b8816c > > No-Presubmit: true > > No-Tree-Checks: true > > No-Try: true > > Bug: 830651 > > Reviewed-on: https://skia-review.googlesource.com/129340 > > Reviewed-by: Cary Clark <caryclark@google.com> > > Commit-Queue: Cary Clark <caryclark@google.com> > > TBR=bsalomon@google.com,brianosman@google.com,caryclark@google.com,caryclark@skia.org > > # Not skipping CQ checks because original CL landed > 1 day ago. > > Bug: 830651 > Change-Id: Ida8725b6051132d8c46faf99358a8fcc1bcabf34 > Reviewed-on: https://skia-review.googlesource.com/129623 > Reviewed-by: Cary Clark <caryclark@skia.org> > Reviewed-by: Cary Clark <caryclark@google.com> > Commit-Queue: Cary Clark <caryclark@google.com> TBR=bsalomon@google.com,brianosman@google.com,caryclark@google.com,caryclark@skia.org Change-Id: Iafc59ffc1b3db67c520ba31bf12d68e1b46c0ea2 No-Presubmit: true No-Tree-Checks: true No-Try: true Bug: 830651 Reviewed-on: https://skia-review.googlesource.com/131082 Reviewed-by: Cary Clark <caryclark@google.com> Commit-Queue: Cary Clark <caryclark@google.com>
* Reland "remove toString"Gravatar Cary Clark2018-05-31
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This reverts commit 32a4910e57b1fdd3c8671de1ee85e05ca21d079f. Reason for revert: SkMatrix::toString use has been removed from flutter and has been picked up in fuchsia Original change's description: > Revert "remove toString" > > This reverts commit 5191880cbf3ee4d122b0d11b4945fbab0784fda7. > > Reason for revert: broke flutter > > Original change's description: > > remove toString > > > > toString may have been used by obsolete debugger only > > find out if that is so > > > > R=​brianosman@google.com,bsalomon@google.com > > > > Docs-Preview: https://skia.org/?cl=119894 > > Bug:830651 > > Change-Id: I737f19b7d3fbc869bea2f443fa3b5ed7c1393ffd > > Reviewed-on: https://skia-review.googlesource.com/119894 > > Commit-Queue: Cary Clark <caryclark@google.com> > > Reviewed-by: Brian Salomon <bsalomon@google.com> > > TBR=bsalomon@google.com,brianosman@google.com,caryclark@google.com,caryclark@skia.org > > Change-Id: I9f81de6c3615ee0608bcea9081b77239b4b8816c > No-Presubmit: true > No-Tree-Checks: true > No-Try: true > Bug: 830651 > Reviewed-on: https://skia-review.googlesource.com/129340 > Reviewed-by: Cary Clark <caryclark@google.com> > Commit-Queue: Cary Clark <caryclark@google.com> TBR=bsalomon@google.com,brianosman@google.com,caryclark@google.com,caryclark@skia.org # Not skipping CQ checks because original CL landed > 1 day ago. Bug: 830651 Change-Id: Ida8725b6051132d8c46faf99358a8fcc1bcabf34 Reviewed-on: https://skia-review.googlesource.com/129623 Reviewed-by: Cary Clark <caryclark@skia.org> Reviewed-by: Cary Clark <caryclark@google.com> Commit-Queue: Cary Clark <caryclark@google.com>
* Revert "remove toString"Gravatar Cary Clark2018-05-20
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This reverts commit 5191880cbf3ee4d122b0d11b4945fbab0784fda7. Reason for revert: broke flutter Original change's description: > remove toString > > toString may have been used by obsolete debugger only > find out if that is so > > R=​brianosman@google.com,bsalomon@google.com > > Docs-Preview: https://skia.org/?cl=119894 > Bug:830651 > Change-Id: I737f19b7d3fbc869bea2f443fa3b5ed7c1393ffd > Reviewed-on: https://skia-review.googlesource.com/119894 > Commit-Queue: Cary Clark <caryclark@google.com> > Reviewed-by: Brian Salomon <bsalomon@google.com> TBR=bsalomon@google.com,brianosman@google.com,caryclark@google.com,caryclark@skia.org Change-Id: I9f81de6c3615ee0608bcea9081b77239b4b8816c No-Presubmit: true No-Tree-Checks: true No-Try: true Bug: 830651 Reviewed-on: https://skia-review.googlesource.com/129340 Reviewed-by: Cary Clark <caryclark@google.com> Commit-Queue: Cary Clark <caryclark@google.com>
* remove toStringGravatar Cary Clark2018-05-20
| | | | | | | | | | | | | | toString may have been used by obsolete debugger only find out if that is so R=brianosman@google.com,bsalomon@google.com Docs-Preview: https://skia.org/?cl=119894 Bug:830651 Change-Id: I737f19b7d3fbc869bea2f443fa3b5ed7c1393ffd Reviewed-on: https://skia-review.googlesource.com/119894 Commit-Queue: Cary Clark <caryclark@google.com> Reviewed-by: Brian Salomon <bsalomon@google.com>
* mapRect should not fiddle with nonfinite values.Gravatar Cary Clark2018-05-17
| | | | | | | | | Docs-Preview: https://skia.org/?cl=128682 Bug: skia:7967 Change-Id: Ic43387b7705ee8385b8df2430886484ff856077c Reviewed-on: https://skia-review.googlesource.com/128682 Reviewed-by: Mike Reed <reed@google.com> Commit-Queue: Mike Reed <reed@google.com>
* Revert "Revert "implement SkScalar versions in terms of float versions""Gravatar Mike Reed2018-05-14
| | | | | | | | | | This reverts commit 0e6db75eebab430e7f6665c8cfa1e7dcd2fef123. Bug: skia: Change-Id: I015d01efc58dfe03dae6bcc57c4b1102276e7566 Reviewed-on: https://skia-review.googlesource.com/127967 Reviewed-by: Mike Reed <reed@google.com> Commit-Queue: Mike Reed <reed@google.com>
* begin to wrap all float dividesGravatar Mike Reed2018-02-12
| | | | | | | | Bug: skia:7607 skia:6134 Change-Id: Id126e92816bef1df1372bd531238cda9f3b36fab Reviewed-on: https://skia-review.googlesource.com/106261 Reviewed-by: Mike Klein <mtklein@chromium.org> Commit-Queue: Mike Reed <reed@google.com>
* Misc guarding of enums in ImageFilter CreateProcsGravatar Robert Phillips2018-01-24
| | | | | | | Change-Id: I51886aaf2a4670f46ca489b2369dc00e60403c75 Reviewed-on: https://skia-review.googlesource.com/99328 Reviewed-by: Mike Reed <reed@google.com> Commit-Queue: Robert Phillips <robertphillips@google.com>
* Make SkMatrixPriv stride mapping functions take separate src and dst stridesGravatar Brian Salomon2018-01-08
| | | | | | | Change-Id: Ib7600a7611e3ca78f6a8ca091fa383ceddb751cf Reviewed-on: https://skia-review.googlesource.com/91402 Commit-Queue: Brian Salomon <bsalomon@google.com> Reviewed-by: Robert Phillips <robertphillips@google.com>
* Revert "Revert "move homogenous with stride to matrixpriv""Gravatar Brian Salomon2017-12-19
| | | | | | | | | | | | | This reverts commit de71572f650005e36d4fc2fe95fb5677a25ae4f6. Revert "Revert "Transform vertices for distance field glyphs on CPU."" This reverts commit f226e66d75374e370f3ae2c6895bc689670e9e18. Change-Id: I2545afae3beb1d6b14bba056853ed826ae7a4679 Reviewed-on: https://skia-review.googlesource.com/86603 Reviewed-by: Greg Daniel <egdaniel@google.com> Commit-Queue: Brian Salomon <bsalomon@google.com>
* Revert "Transform vertices for distance field glyphs on CPU."Gravatar Greg Daniel2017-12-18
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This reverts commit 0215e39d7e415d0530231df6ad20d5f215c72152. Reason for revert: break intel 540 and HD2000 intel release bots on gltestthreading gm dftext_blob_pers Original change's description: > Transform vertices for distance field glyphs on CPU. > > This allows batching of DF draws with different view matrices. > > For perspective matrices this means the transformed position vertex > attribute must have w values. Currently, non-perspective DF draws still > use 2 component positions, though this could be changed in the future. > Consequently, perspective draws can batch with other perspective draws > but not non-perspective draws. > > Adds a GM to test batching and reusing the same blobs with both perspective > and non-perspective matrices. > > Change-Id: I0e42c5449ebf3a5a54025dbcdec824d904d5bd9e > Reviewed-on: https://skia-review.googlesource.com/79900 > Commit-Queue: Brian Salomon <bsalomon@google.com> > Reviewed-by: Jim Van Verth <jvanverth@google.com> TBR=jvanverth@google.com,bsalomon@google.com # Not skipping CQ checks because original CL landed > 1 day ago. Change-Id: Idc658d9263976d5b5e00a5026c5d6d3c8f4bdc2d Reviewed-on: https://skia-review.googlesource.com/86560 Commit-Queue: Greg Daniel <egdaniel@google.com> Reviewed-by: Greg Daniel <egdaniel@google.com>
* Revert "move homogenous with stride to matrixpriv"Gravatar Greg Daniel2017-12-18
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This reverts commit 2d53d984251a753b9d0fb3adad3be09243cf5c14. Reason for revert: revert needed to revert previous cl Original change's description: > move homogenous with stride to matrixpriv > > this appears to be needed only by Skia > internally, so move it out of the public > includes. > > R=​bsalomon@google.com > Bug: skia:6898 > Change-Id: Iebdda8f2c9a8fd953dd44bac9b74158d7491c21a > Reviewed-on: https://skia-review.googlesource.com/85961 > Commit-Queue: Cary Clark <caryclark@skia.org> > Commit-Queue: Cary Clark <caryclark@google.com> > Reviewed-by: Brian Salomon <bsalomon@google.com> TBR=bsalomon@google.com,caryclark@google.com,caryclark@skia.org # Not skipping CQ checks because original CL landed > 1 day ago. Bug: skia:6898 Change-Id: Icbd15ee0b524c770a324c490ab0cadf6a045e0d5 Reviewed-on: https://skia-review.googlesource.com/86800 Reviewed-by: Greg Daniel <egdaniel@google.com> Commit-Queue: Greg Daniel <egdaniel@google.com>
* move homogenous with stride to matrixprivGravatar Cary Clark2017-12-15
| | | | | | | | | | | | | | this appears to be needed only by Skia internally, so move it out of the public includes. R=bsalomon@google.com Bug: skia:6898 Change-Id: Iebdda8f2c9a8fd953dd44bac9b74158d7491c21a Reviewed-on: https://skia-review.googlesource.com/85961 Commit-Queue: Cary Clark <caryclark@skia.org> Commit-Queue: Cary Clark <caryclark@google.com> Reviewed-by: Brian Salomon <bsalomon@google.com>
* Transform vertices for distance field glyphs on CPU.Gravatar Brian Salomon2017-12-15
| | | | | | | | | | | | | | | | | | This allows batching of DF draws with different view matrices. For perspective matrices this means the transformed position vertex attribute must have w values. Currently, non-perspective DF draws still use 2 component positions, though this could be changed in the future. Consequently, perspective draws can batch with other perspective draws but not non-perspective draws. Adds a GM to test batching and reusing the same blobs with both perspective and non-perspective matrices. Change-Id: I0e42c5449ebf3a5a54025dbcdec824d904d5bd9e Reviewed-on: https://skia-review.googlesource.com/79900 Commit-Queue: Brian Salomon <bsalomon@google.com> Reviewed-by: Jim Van Verth <jvanverth@google.com>
* fix mapRect to always return the same as rectStaysRectGravatar Mike Reed2017-10-18
| | | | | | | | Bug: skia: Change-Id: I7c19703613b3173942a12153b30e9951f35c0008 Reviewed-on: https://skia-review.googlesource.com/61820 Reviewed-by: Cary Clark <caryclark@google.com> Commit-Queue: Mike Reed <reed@google.com>
* convert mapHomogeneousPoints to SkPoint3Gravatar Cary Clark2017-10-18
| | | | | | | | | | | | | | | SkMatrix::mapHomogeneousPoints takes an array of SkScalar, but expects essentially SkPoint3, so make it so. R: robertphillips@google.com, reed@google.com Bug: skia:6898 Change-Id: Ibaf8b05c08b7df16c67d6a77d914667ace9a70da Reviewed-on: https://skia-review.googlesource.com/58380 Commit-Queue: Cary Clark <caryclark@skia.org> Commit-Queue: Cary Clark <caryclark@google.com> Reviewed-by: Mike Reed <reed@google.com> Reviewed-by: Robert Phillips <robertphillips@google.com>
* Revert "Revert "Make GPU backend triangulate rects such that they are ↵Gravatar Brian Salomon2017-10-18
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | rendered as tri strips rather than tri fans."" This reverts commit 62563deb6b4dbb0b1db7f29f35e07dcef043af31. Reason for revert: change that affected similar set of GMs reverted, relanding now that this is more easily triagable. Original change's description: > Revert "Make GPU backend triangulate rects such that they are rendered as tri strips rather than tri fans." > > This reverts commit fa2d604a7ded95a3ace905519b476129cd0fffcb. > > Reason for revert: <INSERT REASONING HERE> > > Original change's description: > > Make GPU backend triangulate rects such that they are rendered as tri strips rather than tri fans. > > > > Right now when we turn rects into quads we use a vertex order compatible with a tri fan rather than a tri strip. > > > > I wanted it to be the case that the same code could be used to generate a non-indexed mesh for a single rect or indexed using the quad index buffer when batching. Triangle fanning is not available in all APIS (e.g. is emulated in ANGLE and not supported in Metal) so it seems better to use a triangle strip over a fan in the single rect case. > > > > > > Change-Id: I31eebd794e7328f4b39e3ec3377bf2ec556360ca > > Reviewed-on: https://skia-review.googlesource.com/60081 > > Commit-Queue: Brian Salomon <bsalomon@google.com> > > Reviewed-by: Robert Phillips <robertphillips@google.com> > > TBR=bsalomon@google.com,robertphillips@google.com > > Change-Id: I7c4c23aa418da09c9708b28cce64ab58e282dd3a > No-Presubmit: true > No-Tree-Checks: true > No-Try: true > Reviewed-on: https://skia-review.googlesource.com/60683 > Reviewed-by: Brian Salomon <bsalomon@google.com> > Commit-Queue: Brian Salomon <bsalomon@google.com> TBR=bsalomon@google.com,robertphillips@google.com Change-Id: Iefcd16676a7617d32e89fc84206cd4e88e9a06e1 No-Presubmit: true No-Tree-Checks: true No-Try: true Reviewed-on: https://skia-review.googlesource.com/61160 Reviewed-by: Brian Salomon <bsalomon@google.com> Commit-Queue: Brian Salomon <bsalomon@google.com>
* Revert "Make GPU backend triangulate rects such that they are rendered as ↵Gravatar Brian Salomon2017-10-17
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | tri strips rather than tri fans." This reverts commit fa2d604a7ded95a3ace905519b476129cd0fffcb. Reason for revert: <INSERT REASONING HERE> Original change's description: > Make GPU backend triangulate rects such that they are rendered as tri strips rather than tri fans. > > Right now when we turn rects into quads we use a vertex order compatible with a tri fan rather than a tri strip. > > I wanted it to be the case that the same code could be used to generate a non-indexed mesh for a single rect or indexed using the quad index buffer when batching. Triangle fanning is not available in all APIS (e.g. is emulated in ANGLE and not supported in Metal) so it seems better to use a triangle strip over a fan in the single rect case. > > > Change-Id: I31eebd794e7328f4b39e3ec3377bf2ec556360ca > Reviewed-on: https://skia-review.googlesource.com/60081 > Commit-Queue: Brian Salomon <bsalomon@google.com> > Reviewed-by: Robert Phillips <robertphillips@google.com> TBR=bsalomon@google.com,robertphillips@google.com Change-Id: I7c4c23aa418da09c9708b28cce64ab58e282dd3a No-Presubmit: true No-Tree-Checks: true No-Try: true Reviewed-on: https://skia-review.googlesource.com/60683 Reviewed-by: Brian Salomon <bsalomon@google.com> Commit-Queue: Brian Salomon <bsalomon@google.com>
* Make GPU backend triangulate rects such that they are rendered as tri strips ↵Gravatar Brian Salomon2017-10-17
| | | | | | | | | | | | | | rather than tri fans. Right now when we turn rects into quads we use a vertex order compatible with a tri fan rather than a tri strip. I wanted it to be the case that the same code could be used to generate a non-indexed mesh for a single rect or indexed using the quad index buffer when batching. Triangle fanning is not available in all APIS (e.g. is emulated in ANGLE and not supported in Metal) so it seems better to use a triangle strip over a fan in the single rect case. Change-Id: I31eebd794e7328f4b39e3ec3377bf2ec556360ca Reviewed-on: https://skia-review.googlesource.com/60081 Commit-Queue: Brian Salomon <bsalomon@google.com> Reviewed-by: Robert Phillips <robertphillips@google.com>
* remove unused SkMatrix setIDivGravatar Cary Clark2017-10-16
| | | | | | | | | | | | Unused setIDiv, untested internally. Unused by google3, android, chromium. R: reed@google.com Bug: skia: 6898 Change-Id: I57101b147272ed198746afc298cc0f5a6434abe0 Reviewed-on: https://skia-review.googlesource.com/59960 Commit-Queue: Cary Clark <caryclark@google.com> Reviewed-by: Mike Reed <reed@google.com>
* Revert "move SkMatrix anonymous affine enum to private"Gravatar Mike Reed2017-10-13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This reverts commit 708ec81d7a9bba12cd7e574b5c5ae80b2ad77919. Reason for revert: broke android frameworks/base/core/jni/android/graphics/pdf/PdfEditor.cpp frameworks/base/core/jni/android/graphics/pdf/PdfEditor.cpp:153:54: error: no member named 'kAScaleX' in 'SkMatrix'; did you mean 'kMScaleX'? FS_MATRIX transform = {transformValues[SkMatrix::kAScaleX], transformValues[SkMatrix::kASkewY], ~~~~~~~~~~^~~~~~~~ Original change's description: > move SkMatrix anonymous affine enum to private > > enum members aren't used by SkMatrix.h or by > clients outside of Skia. > > R: reed@google.com, bungeman@google.com > Bug: skia:6898 > Change-Id: I6873b4106e5ffe354caf5ec18cc613910304fa13 > Reviewed-on: https://skia-review.googlesource.com/59160 > Reviewed-by: Mike Reed <reed@google.com> > Reviewed-by: Ben Wagner <bungeman@google.com> > Commit-Queue: Cary Clark <caryclark@skia.org> TBR=bungeman@google.com,reed@google.com,caryclark@skia.org Change-Id: I7fe80879e8b851c9036fc910a314129c299d82d2 No-Presubmit: true No-Tree-Checks: true No-Try: true Bug: skia:6898 Reviewed-on: https://skia-review.googlesource.com/59460 Reviewed-by: Mike Reed <reed@google.com> Commit-Queue: Mike Reed <reed@google.com>
* move SkMatrix anonymous affine enum to privateGravatar Cary Clark2017-10-12
| | | | | | | | | | | | | enum members aren't used by SkMatrix.h or by clients outside of Skia. R: reed@google.com, bungeman@google.com Bug: skia:6898 Change-Id: I6873b4106e5ffe354caf5ec18cc613910304fa13 Reviewed-on: https://skia-review.googlesource.com/59160 Reviewed-by: Mike Reed <reed@google.com> Reviewed-by: Ben Wagner <bungeman@google.com> Commit-Queue: Cary Clark <caryclark@skia.org>
* Suppress float-cast-overflow for double-to-float in SkMatrix{,44}Gravatar Ben Wagner2017-09-18
| | | | | | | | | | No API change. Bug: skia:4632 Change-Id: Ic9cb9de7cce8aca43f0ce8066abcc44a0b04ca84 Reviewed-on: https://skia-review.googlesource.com/47681 Commit-Queue: Ben Wagner <benjaminwagner@google.com> Reviewed-by: Mike Klein <mtklein@chromium.org>
* 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>
* optimize intersect, use getType to utilize fast-case in preTranslateGravatar Mike Reed2017-03-07
| | | | | | | | | | | | | | | 10-15% speed up in clip_record_overhead bench Comparing the raw fType field was missing the (maybe deprecatable) IsRectToRect bit (0x10), which is set for identity and translate matrices, so we were never taking the fast case. BUG=skia: Change-Id: I1c73f4bae42f2311454c7568ef8891239c3cae83 Reviewed-on: https://skia-review.googlesource.com/9388 Commit-Queue: Mike Reed <reed@google.com> Reviewed-by: Herb Derby <herb@google.com>
* Don't mark the matrix-type as dirty just be cause we translate it.Gravatar Mike Reed2017-03-02
| | | | | | | | | | | | | | | | This speeds up simple mods to canvas, e.g. save() translate(...) ... restore() BUG=skia: Change-Id: I4b872e7d3102fad21d9c17a275006f5576827d41 Reviewed-on: https://skia-review.googlesource.com/9169 Reviewed-by: Herb Derby <herb@google.com> Commit-Queue: Mike Reed <reed@google.com>
* start removing uses of SkScalarMulGravatar Mike Reed2017-02-06
| | | | | | | | | BUG=skia:6197 Change-Id: Ic444c7ee4ca547f483dc8232dcacd6d4ba87d913 Reviewed-on: https://skia-review.googlesource.com/8041 Reviewed-by: Cary Clark <caryclark@google.com> Commit-Queue: Mike Reed <reed@google.com>
* Continue making Ganesh use absolute texture coordinates - take 2Gravatar Robert Phillips2017-01-20
| | | | | | | | | | | | The idea here is that the GrCoordTransform will actually hold a GrTextureProxy (rather than a GrTexture) and then, in GrGLSLPrimitiveProcessor::GetTransformMatrix, use the instantiated width & height (when uploading the transform matrix) Relanding of: https://skia-review.googlesource.com/c/6977/ Change-Id: Ibc9b9e354f7fc23b1a6e6e4fe7c9fe3cef771c02 Reviewed-on: https://skia-review.googlesource.com/7265 Reviewed-by: Brian Salomon <bsalomon@google.com> Commit-Queue: Robert Phillips <robertphillips@google.com>
* Revert "Continue making Ganesh use absolute texture coordinates"Gravatar Joe Gregorio2017-01-17
| | | | | | | | | | | This reverts commit 4493a9dc9df8cf306a974bde7e0e9c5470ebcdc9. Reason for revert: Continuing failures https://luci-milo.appspot.com/swarming/task/33c693c3539a1410 Change-Id: Id371d6df6a875a5f6872f4ebd91b08a354d949de Reviewed-on: https://skia-review.googlesource.com/7125 Commit-Queue: Joe Gregorio <jcgregorio@google.com> Reviewed-by: Joe Gregorio <jcgregorio@google.com>
* Continue making Ganesh use absolute texture coordinatesGravatar Robert Phillips2017-01-17
| | | | | | | | | The idea here is that the GrCoordTransform will actually hold a GrTextureProxy (rather than a GrTexture) and then, in GrGLSLPrimitiveProcessor::GetTransformMatrix, use the instantiated width & height (when uploading the transform matrix) Change-Id: Ibac3a540fcb1967ceef571157d41c1937acfadf8 Reviewed-on: https://skia-review.googlesource.com/6977 Reviewed-by: Brian Salomon <bsalomon@google.com> Commit-Queue: Robert Phillips <robertphillips@google.com>
* add SkMatrixPriv for specialized helpersGravatar reed2016-08-22
| | | | | | | BUG=skia: GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2268443002 Review-Url: https://codereview.chromium.org/2268443002
* Fast path translate() in SkCanvas and SkLiteDL.Gravatar mtklein2016-08-19
| | | | | | | | | | | | | | | | | | | | | | | This adds didTranslate() so that SkLiteDL (and other canvas recorders) can record the translate rather than the full concat. It also adds a case to SkMatrix::preTranslate() to fast path translate x translate -> translate (i.e. +=). BUG=skia: GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2255283002 Committed: https://skia.googlesource.com/skia/+/5fa47f4fd13b3158de4599414c86d17649c2dd1c Misc bots failing in pictureimagefilter replay modes. https://luci-milo.appspot.com/swarming/task/30b8e53f3a1f4f10/steps/dm/0/stdout Problem is FMA vs. not. CQ_INCLUDE_TRYBOTS=master.client.skia: Test-Ubuntu-GCC-GCE-CPU-AVX2-x86_64-Release-Fast-Trybot Review-Url: https://codereview.chromium.org/2255283002
* Revert of Fast path translate() in SkCanvas and SkLiteDL. (patchset #5 ↵Gravatar mtklein2016-08-18
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | id:80001 of https://codereview.chromium.org/2255283002/ ) Reason for revert: speculative Original issue's description: > Fast path translate() in SkCanvas and SkLiteDL. > > This adds didTranslate() so that SkLiteDL (and other canvas recorders) > can record the translate rather than the full concat. > > It also adds a case to SkMatrix::preTranslate() to fast path > translate x translate -> translate (i.e. +=). > > BUG=skia: > GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2255283002 > > Committed: https://skia.googlesource.com/skia/+/5fa47f4fd13b3158de4599414c86d17649c2dd1c TBR=herb@google.com,reed@google.com,mtklein@chromium.org # Skipping CQ checks because original CL landed less than 1 days ago. NOPRESUBMIT=true NOTREECHECKS=true NOTRY=true BUG=skia: Review-Url: https://codereview.chromium.org/2264433002
* Fast path translate() in SkCanvas and SkLiteDL.Gravatar mtklein2016-08-18
| | | | | | | | | | | | | This adds didTranslate() so that SkLiteDL (and other canvas recorders) can record the translate rather than the full concat. It also adds a case to SkMatrix::preTranslate() to fast path translate x translate -> translate (i.e. +=). BUG=skia: GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2255283002 Review-Url: https://codereview.chromium.org/2255283002
* Revert of Change mapRectScaleTranslate to pass args/ret by value (patchset ↵Gravatar halcanary2016-08-10
| | | | | | | | | | | | | | | | | | | | | | | | | | #2 id:20001 of https://codereview.chromium.org/2138943002/ ) Reason for revert: Build-Ubuntu-GCC-Arm7-Release-Android fails. Original issue's description: > Change mapRectScaleTranslate to pass args/ret by value > > This reverts commit 6092b6e0e57be20d2e1ad079c0af133d2f67bfd3. > > BUG=skia: > GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2138943002 > > Committed: https://skia.googlesource.com/skia/+/1bd13ca922d6448d595064faee486eaf3fa56e56 TBR=mtklein@google.com,msarett@google.com,reed@google.com # Skipping CQ checks because original CL landed less than 1 days ago. NOPRESUBMIT=true NOTREECHECKS=true NOTRY=true BUG=skia: Review-Url: https://codereview.chromium.org/2234843002
* Change mapRectScaleTranslate to pass args/ret by valueGravatar reed2016-08-10
| | | | | | | | | This reverts commit 6092b6e0e57be20d2e1ad079c0af133d2f67bfd3. BUG=skia: GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2138943002 Review-Url: https://codereview.chromium.org/2138943002
* Fix the assert and clamping in SkMatrix::get*Scale[s]().Gravatar kolczyk2016-07-19
| | | | | | | | | Follow-up after https://codereview.chromium.org/2143133005/. BUG=skia:4718 GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2154123003 Review-Url: https://codereview.chromium.org/2154123003
* Guard SkMatrix::get*Scale[s]() against negative nearly-zero values.Gravatar kolczyk2016-07-16
| | | | | | | BUG=skia:4718 GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2143133005 Review-Url: https://codereview.chromium.org/2143133005
* Revert of change mapRectScaleTranslate to pass args/ret by value (patchset ↵Gravatar reed2016-07-10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | #1 id:1 of https://codereview.chromium.org/2137853002/ ) Reason for revert: Triggered a compiler bug on Android? FAILED: /usr/bin/ccache /b/work/skia/platform_tools/android/bin/../toolchains/arm-r11c-14/bin/arm-linux-androideabi-g++ -MMD -MF obj/src/core/core.SkMatrix.o.d -DSK_INTERNAL -DSK_GAMMA_APPLY_TO_A8 -DQT_NO_KEYWORDS -DSK_ALLOW_STATIC_GLOBAL_INITIALIZERS=0 -DSK_SUPPORT_GPU=1 -DSK_FORCE_DISTANCE_FIELD_TEXT=0 -DSK_HAS_GIF_LIBRARY -DSK_HAS_JPEG_LIBRARY -DSK_HAS_PNG_LIBRARY -DSK_HAS_WEBP_LIBRARY -DSK_TEST_QCMS -DSK_IS_BOT -DSK_CODEC_DECODES_RAW -DSK_ARM_HAS_NEON -DSK_BUILD_FOR_ANDROID -DSK_GAMMA_EXPONENT=1.4 -DSK_GAMMA_CONTRAST=0.0 -DSKIA_DLL -DSKIA_IMPLEMENTATION=1 -DSK_SUPPORT_LEGACY_CLIPTOLAYERFLAG -DNDEBUG -I../../../include/c -I../../../include/config -I../../../include/core -I../../../include/pathops -I../../../include/ports -I../../../include/private -I../../../include/utils -I../../../include/images -I../../../src/core -I../../../src/sfnt -I../../../src/image -I../../../src/opts -I../../../src/utils -I../../../include/gpu -I../../../src/gpu -I../../../platform_tools/android/third_party/cpufeatures -fPIC -g -fno-exceptions -fstrict-aliasing -Wall -Wextra -Winit-self -Wpointer-arith -Wsign-compare -Wvla -Wno-unused-parameter -Werror -march=armv7-a -mthumb -mfpu=neon -mfloat-abi=softfp -fuse-ld=gold -O2 -std=c++11 -fno-rtti -fno-threadsafe-statics -Wnon-virtual-dtor -c ../../../src/core/SkMatrix.cpp -o obj/src/core/core.SkMatrix.o ../../../src/core/SkMatrix.cpp: In member function 'SkRect SkMatrix::mapRectScaleTranslate(SkRect) const': ../../../src/core/SkMatrix.cpp:1120:1: error: unrecognizable insn: } ^ (insn 32 31 33 2 (set (reg:V4SF 115 [ D.83077 ]) (unspec:V4SF [ (mem/c:V4SF (reg/f:SI 104 virtual-incoming-args) [0 MEM[(const __builtin_neon_sf[4] *)&src]+0 S16 A32]) ] UNSPEC_VLD1)) /b/work/skia/platform_tools/android/toolchains/arm-r11c-14/lib/gcc/arm-linux-androideabi/4.9/include/arm_neon.h:8693 -1 (nil)) ../../../src/core/SkMatrix.cpp:1120:1: internal compiler error: in extract_insn, at recog.c:2202 Please submit a full bug report, with preprocessed source if appropriate. See <http://source.android.com/source/report-bugs.html> for instructions. Original issue's description: > change mapRectScaleTranslate to pass args/ret by value > > BUG=skia: > GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2137853002 > > TBR=mtklein > > Committed: https://skia.googlesource.com/skia/+/14dce6ed5934d7a6e1fac79f8e76e12f5670aae2 TBR=msarett@google.com,mtklein@google.com # Skipping CQ checks because original CL landed less than 1 days ago. NOPRESUBMIT=true NOTREECHECKS=true NOTRY=true BUG=skia: Review-Url: https://codereview.chromium.org/2139523002
* change mapRectScaleTranslate to pass args/ret by valueGravatar reed2016-07-10
| | | | | | | | | BUG=skia: GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2137853002 TBR=mtklein Review-Url: https://codereview.chromium.org/2137853002
* speed up maprect for scale+trans caseGravatar reed2016-06-30
| | | | | | | BUG=skia: GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2111703002 Review-Url: https://codereview.chromium.org/2111703002
* Graduate matrix map-point procs out of SkOpts.Gravatar mtklein2016-04-14
| | | | | | | | | | | | | | | These are implemented generically with Sk4s and don't benefit from anything fancier than vanilla SSE/NEON. This means there's no need to hide this code away in another file or behind a function pointer... it's readable and we have compile-time support for all the instructions it needs. BUG=skia: GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1872193002 CQ_EXTRA_TRYBOTS=client.skia:Test-Ubuntu-GCC-GCE-CPU-AVX2-x86_64-Release-SKNX_NO_SIMD-Trybot Review URL: https://codereview.chromium.org/1872193002
* Change SkMatrix::fixedStepInX to return SkVector (of SkScalar) rather than ↵Gravatar benjaminwagner2016-02-16
| | | | | | | | | | | | | SkFixed. All users were immediately converting to SkScalar or SkFixed3232. This method is not used in Chromium, Android, or Google3. BUG=skia:4632 GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1692013002 Review URL: https://codereview.chromium.org/1692013002