diff options
author | Ruiqi Mao <ruiqimao@google.com> | 2018-07-09 14:16:56 -0400 |
---|---|---|
committer | Skia Commit-Bot <skia-commit-bot@chromium.org> | 2018-07-09 20:31:28 +0000 |
commit | 9a6e42ff18133ef77066b82cb7e2d19788edd968 (patch) | |
tree | 29ca7c0dbd690c572b8fe222314f83b65cab493b /src/core/SkCanvas.cpp | |
parent | c3833b4c152af3b6fa2a4c4ba7b1da02acd1af80 (diff) |
added caching of SkVertices
SkVertices can now be "volatile", meaning they should not be cached.
SkVertices is volatile by default if the argument is not given.
Pulled from reverted CL: https://skia-review.googlesource.com/c/skia/+/138596
Docs-Preview: https://skia.org/?cl=139545
Bug: skia:
Change-Id: I92cf832efe1c0aaa8f432eedde2678582dd2454e
Reviewed-on: https://skia-review.googlesource.com/139545
Reviewed-by: Brian Osman <brianosman@google.com>
Reviewed-by: Robert Phillips <robertphillips@google.com>
Commit-Queue: Ruiqi Mao <ruiqimao@google.com>
Diffstat (limited to 'src/core/SkCanvas.cpp')
-rw-r--r-- | src/core/SkCanvas.cpp | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/core/SkCanvas.cpp b/src/core/SkCanvas.cpp index 8314f803f0..45bbc64308 100644 --- a/src/core/SkCanvas.cpp +++ b/src/core/SkCanvas.cpp @@ -1715,6 +1715,7 @@ void SkCanvas::drawVertices(const sk_sp<SkVertices>& vertices, const SkMatrix* b SkBlendMode mode, const SkPaint& paint) { TRACE_EVENT0("skia", TRACE_FUNC); RETURN_ON_NULL(vertices); + SkASSERT(boneCount <= 100); this->onDrawVerticesObject(vertices.get(), bones, boneCount, mode, paint); } @@ -1722,6 +1723,7 @@ void SkCanvas::drawVertices(const SkVertices* vertices, const SkMatrix* bones, i SkBlendMode mode, const SkPaint& paint) { TRACE_EVENT0("skia", TRACE_FUNC); RETURN_ON_NULL(vertices); + SkASSERT(boneCount <= 100); this->onDrawVerticesObject(vertices, bones, boneCount, mode, paint); } |