aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/core/SkWriter32.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/core/SkWriter32.h')
-rw-r--r--src/core/SkWriter32.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/core/SkWriter32.h b/src/core/SkWriter32.h
index e81178d47e..1e004a8b1d 100644
--- a/src/core/SkWriter32.h
+++ b/src/core/SkWriter32.h
@@ -39,6 +39,10 @@ public:
// return the current offset (will always be a multiple of 4)
size_t bytesWritten() const { return fUsed; }
+ // Returns true iff all of the bytes written so far are stored in the initial storage
+ // buffer provided in the constructor or the most recent call to reset.
+ bool usingInitialStorage() const { return fData == fExternal; }
+
SK_ATTR_DEPRECATED("use bytesWritten")
size_t size() const { return this->bytesWritten(); }