aboutsummaryrefslogtreecommitdiffhomepage
path: root/include
diff options
context:
space:
mode:
authorGravatar Brian Salomon <bsalomon@google.com>2017-01-30 17:01:28 -0500
committerGravatar Skia Commit-Bot <skia-commit-bot@chromium.org>2017-01-31 14:42:29 +0000
commit958fbc460a1e680c6a9979e140da8bfc00b8831d (patch)
treec18a9093a67b34f9a09c472b4cfaed10c9478179 /include
parent9206c76337cd349c769103e06af005edd0583a10 (diff)
Make SkShadowUtils tessellations ref counted in preparation for caching them.
Change-Id: I60133fcc4101a27bcc3e7ad38e7348ad9147b8a9 Reviewed-on: https://skia-review.googlesource.com/7784 Reviewed-by: Jim Van Verth <jvanverth@google.com> Commit-Queue: Brian Salomon <bsalomon@google.com>
Diffstat (limited to 'include')
-rw-r--r--include/private/SkTDArray.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/include/private/SkTDArray.h b/include/private/SkTDArray.h
index f71d357005..16f8474bd4 100644
--- a/include/private/SkTDArray.h
+++ b/include/private/SkTDArray.h
@@ -72,6 +72,12 @@ public:
SkTSwap(fCount, other.fCount);
}
+ // The deleter that ought to be used for a std:: smart pointer that takes ownership from
+ // release().
+ struct Deleter {
+ void operator()(const void* p) { sk_free((void*)p); }
+ };
+
/** Return a ptr to the array of data, to be freed with sk_free. This also
resets the SkTDArray to be empty.
*/