diff options
author | Brian Salomon <bsalomon@google.com> | 2017-02-01 12:07:17 -0500 |
---|---|---|
committer | Skia Commit-Bot <skia-commit-bot@chromium.org> | 2017-02-01 18:01:17 +0000 |
commit | 5e6895295a88fb702f49309542149d73f709bb10 (patch) | |
tree | 27870dc65a454a55fa114efffcf31f148d5242eb /src/utils/SkShadowTessellator.h | |
parent | c86b1456f73eaf5a43fac8c920c7140993b2f0ba (diff) |
Add caching of ambient and spot shadow meshes.
Change-Id: If882186225621af4af4b4ddae0c786ec33ff40f3
Reviewed-on: https://skia-review.googlesource.com/7643
Commit-Queue: Brian Salomon <bsalomon@google.com>
Reviewed-by: Jim Van Verth <jvanverth@google.com>
Diffstat (limited to 'src/utils/SkShadowTessellator.h')
-rwxr-xr-x | src/utils/SkShadowTessellator.h | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/utils/SkShadowTessellator.h b/src/utils/SkShadowTessellator.h index 63e7bdc4c5..13924f204f 100755 --- a/src/utils/SkShadowTessellator.h +++ b/src/utils/SkShadowTessellator.h @@ -45,6 +45,11 @@ public: int indexCount() const { return fIndexCnt; } const uint16_t* indices() const { return fIndices.get(); } + size_t size() const { + return sizeof(*this) + fVertexCnt * (sizeof(SkPoint) + sizeof(SkColor)) + + fIndexCnt * sizeof(uint16_t); + } + private: template<typename T> using Deleter = SkTDArray<SkPoint>::Deleter; template<typename T> using UniqueArray = std::unique_ptr<const T[], Deleter<T>>; |