diff options
author | 2017-12-15 11:41:09 -0500 | |
---|---|---|
committer | 2017-12-15 17:06:08 +0000 | |
commit | 0215e39d7e415d0530231df6ad20d5f215c72152 (patch) | |
tree | 91fec56dae447ceb15e1743117a8ff272c60a7c3 /include | |
parent | 29c14a760682e2c449fa043b5e8b69937cb58f3a (diff) |
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>
Diffstat (limited to 'include')
-rw-r--r-- | include/core/SkMatrix.h | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/include/core/SkMatrix.h b/include/core/SkMatrix.h index e88232834b..b527ab5ef9 100644 --- a/include/core/SkMatrix.h +++ b/include/core/SkMatrix.h @@ -1337,6 +1337,9 @@ public: @param count items in SkPoint3 array to transform */ void mapHomogeneousPoints(SkPoint3 dst[], const SkPoint3 src[], int count) const; + /** Same as above but with a variable offset between successive points. */ + void mapHomogeneousPointsWithStride(SkPoint3 dst[], const SkPoint3 src[], size_t stride, + int count) const; /** Maps SkPoint (x, y) to result. SkPoint is mapped by multiplying by SkMatrix. Given: |