Index: src/core/SkRWBuffer.cpp |
diff --git a/src/core/SkRWBuffer.cpp b/src/core/SkRWBuffer.cpp |
index 07a537a640a27173bea2093614bef8a468db0d01..41f1a287d20320351eaca3ab94096a5fe000e332 100644 |
--- a/src/core/SkRWBuffer.cpp |
+++ b/src/core/SkRWBuffer.cpp |
@@ -181,7 +181,12 @@ bool SkROBuffer::Iter::next() { |
/////////////////////////////////////////////////////////////////////////////////////////////////// |
-SkRWBuffer::SkRWBuffer(size_t initialCapacity) : fHead(nullptr), fTail(nullptr), fTotalUsed(0) {} |
+SkRWBuffer::SkRWBuffer(size_t initialCapacity) : fHead(nullptr), fTail(nullptr), fTotalUsed(0) { |
+ if (initialCapacity) { |
+ fHead = SkBufferHead::Alloc(initialCapacity); |
+ fTail = &fHead->fBlock; |
+ } |
+} |
SkRWBuffer::~SkRWBuffer() { |
this->validate(); |