Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(8)

Unified Diff: include/core/SkTDArray.h

Issue 156683004: Cleaner external buffer handling in SkWriter32 (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 6 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | include/core/SkWriter32.h » ('j') | include/core/SkWriter32.h » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: include/core/SkTDArray.h
diff --git a/include/core/SkTDArray.h b/include/core/SkTDArray.h
index 14447217e93416626d06d820d0b2b0d58d441987..fc546ac717faf7b12a2a0aebac57910435846e36 100644
--- a/include/core/SkTDArray.h
+++ b/include/core/SkTDArray.h
@@ -101,6 +101,11 @@ public:
int count() const { return fCount; }
/**
+ * Return the number of elements there is space for without growing.
reed1 2014/02/06 20:14:40 // This includes however many elements may already
iancottrell 2014/02/06 21:33:06 Done. Is this better?
reed1 2014/02/06 21:41:34 If I add 3 elements, and call reserve() and it ret
+ */
+ int reserved() const { return fReserve; }
+
+ /**
* return the number of bytes in the array: count * sizeof(T)
*/
size_t bytes() const { return fCount * sizeof(T); }
« no previous file with comments | « no previous file | include/core/SkWriter32.h » ('j') | include/core/SkWriter32.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698