aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/core/SkMatrixPriv.h
Commit message (Collapse)AuthorAge
* Rewrite GrQuad to use separate arrays of x and y values to be Sk4f friendly.Gravatar Brian Salomon2018-05-17
| | | | | | | Change-Id: Ie2ad197c5f17849fe6e034b60bc7ec18a00edb24 Reviewed-on: https://skia-review.googlesource.com/128842 Reviewed-by: Brian Osman <brianosman@google.com> Commit-Queue: Brian Salomon <bsalomon@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>
* Remove public version of SkMatrix::mapPointsWithStride.Gravatar Brian Salomon2018-01-05
| | | | | | | | | Use private version already in SkMatrixPriv. Change-Id: I6e9546afdf2b072402f9deecec99a6d236e2c7f4 Reviewed-on: https://skia-review.googlesource.com/91400 Reviewed-by: Robert Phillips <robertphillips@google.com> Commit-Queue: Brian Salomon <bsalomon@google.com>
* Privatize separate src/dst version of SkMatrix::mapPointsWithStride.Gravatar Brian Salomon2018-01-05
| | | | | | | Change-Id: I0bd6a4ded3667029c8c8336217e12eb93174911e Reviewed-on: https://skia-review.googlesource.com/91380 Reviewed-by: Robert Phillips <robertphillips@google.com> Commit-Queue: Brian Salomon <bsalomon@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 "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>
* make point array methods privateGravatar Cary Clark2017-11-07
| | | | | | | | | | | | | | | | | | | | | | | Moved method are not used by chromium, google3, or android. SkPoint::setRectIFan isn't used or tested at all. SkPoint::setRectFan and SkPoint::setRectTriStrip are only used internally. These routines pretend that a SkPoint is part of an array of points. Since that's kind of an odd contract to make public, and because they aren't used outside of Skia, relegate them to a priv file. R=bsalomon@google.com,reed@google.com Bug: skia: 6898 Change-Id: I5ec2eb47799f6fd4b2994da962b1fa69ce659931 Reviewed-on: https://skia-review.googlesource.com/68121 Reviewed-by: Brian Salomon <bsalomon@google.com> Commit-Queue: Cary Clark <caryclark@google.com>
* make matrix serialization privateGravatar Cary Clark2017-10-20
| | | | | | | | | | | | | | | | | | Moves readFromMemory, writeToMemory to private section. No sign that these are called from google3, android, chromium, but function names are common enough that it's hard to know for sure. These are used inside templates internally and for testing, so it is not quite as simple as adding alternate entry points in SkMatrixPriv. R=reed@google.com Bug: skia:6898 Change-Id: I1fac142f4bf0f38608ea93438c46f39147606c4d Reviewed-on: https://skia-review.googlesource.com/62361 Reviewed-by: Mike Reed <reed@google.com> Commit-Queue: Cary Clark <caryclark@google.com>
* make skmatrix getmapproc privateGravatar Cary Clark2017-10-20
| | | | | | | | | | | | | | Make SkMatrix MapXYProc MapPtsProc and friends private. Code search turned up no clients in chromium, google3, android. Fingers crossed. R:reed@google.com Bug: skia:6898 Change-Id: Iee20fe5150499215a09f67cc6f117b685f38f455 Reviewed-on: https://skia-review.googlesource.com/62140 Commit-Queue: Cary Clark <caryclark@google.com> Reviewed-by: Mike Reed <reed@google.com> Reviewed-by: Florin Malita <fmalita@chromium.org>
* 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>
* 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>
* Remove trailing whitespace.Gravatar Ben Wagner2017-10-09
| | | | | | | | | | | Also adds a presubmit to prevent adding trailing whitespace to source code in the future. Change-Id: I41a4df81487f6f00aa19b188f0cac6a3377efde6 Reviewed-on: https://skia-review.googlesource.com/57380 Reviewed-by: Ravi Mistry <rmistry@google.com> Reviewed-by: Mike Reed <reed@google.com> Commit-Queue: Ben Wagner <bungeman@google.com>
* combine setRectFan and mapRectGravatar reed2016-08-24
| | | | | | | BUG=skia: GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2276603002 Review-Url: https://codereview.chromium.org/2276603002
* 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