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

Unified Diff: src/core/SkVarAlloc.cpp

Issue 1061783002: Rearrange SkRecord with small N in mind (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: 32-bit fix Created 5 years, 8 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 | « src/core/SkVarAlloc.h ('k') | tests/PictureTest.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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) {
« no previous file with comments | « src/core/SkVarAlloc.h ('k') | tests/PictureTest.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698