diff options
author | bungeman <bungeman@google.com> | 2016-06-09 08:01:03 -0700 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2016-06-09 08:01:03 -0700 |
commit | 06ca8ec87cf6fab57cadd043a5ac18c4154a4129 (patch) | |
tree | 95e7eaaaf3f42ce550332277c431e3ec119446f4 /include/private | |
parent | 897a8e38879643d81a64d2bb6bed4e22af982aa4 (diff) |
sk_sp for Ganesh.
Convert use of GrFragmentProcessor, GrGeometryProcessor, and
GrXPFactory to sk_sp. This clarifies ownership and should
reduce reference count churn by moving ownership.
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2041113004
Review-Url: https://codereview.chromium.org/2041113004
Diffstat (limited to 'include/private')
-rw-r--r-- | include/private/SkTArray.h | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/include/private/SkTArray.h b/include/private/SkTArray.h index 55d4f86aaa..1fe2c3857c 100644 --- a/include/private/SkTArray.h +++ b/include/private/SkTArray.h @@ -121,6 +121,15 @@ public: } /** + * Ensures there is enough reserved space for n elements. + */ + void reserve(int n) { + if (fCount < n) { + this->checkRealloc(n - fCount); + } + } + + /** * Resets to a copy of a C array. */ void reset(const T* array, int count) { |