Index: src/core/SkVarAlloc.cpp |
diff --git a/src/core/SkVarAlloc.cpp b/src/core/SkVarAlloc.cpp |
index 88bd17028fbe19156e448e3f066cb2b0230421ca..fa89d38c23a286a03f4d28d92bb1996a428ae607 100644 |
--- a/src/core/SkVarAlloc.cpp |
+++ b/src/core/SkVarAlloc.cpp |
@@ -1,3 +1,10 @@ |
+/* |
+ * Copyright 2015 Google Inc. |
+ * |
+ * Use of this source code is governed by a BSD-style license that can be |
+ * found in the LICENSE file. |
+ */ |
+ |
#include "SkVarAlloc.h" |
// We use non-standard malloc diagnostic methods to make sure our allocations are sized well. |
@@ -25,6 +32,12 @@ SkVarAlloc::SkVarAlloc(size_t minLgSize) |
, fLgSize(minLgSize) |
, fBlock(NULL) {} |
+SkVarAlloc::SkVarAlloc(size_t minLgSize, char* storage, size_t len) |
+ : fByte(storage) |
+ , fRemaining(len) |
+ , fLgSize(minLgSize) |
+ , fBlock(NULL) {} |
+ |
SkVarAlloc::~SkVarAlloc() { |
Block* b = fBlock; |
while (b) { |