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

Unified Diff: src/core/SkVarAlloc.h

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/SkRecord.cpp ('k') | src/core/SkVarAlloc.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/core/SkVarAlloc.h
diff --git a/src/core/SkVarAlloc.h b/src/core/SkVarAlloc.h
index fb55192439a1b0a1d17f5d0cdb24c9ea657cc827..8a55b366155fdfafdd598511a374876ffd565d24 100644
--- a/src/core/SkVarAlloc.h
+++ b/src/core/SkVarAlloc.h
@@ -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.
+ */
+
#ifndef SkVarAlloc_DEFINED
#define SkVarAlloc_DEFINED
@@ -7,6 +14,9 @@ class SkVarAlloc : SkNoncopyable {
public:
// Smallest block we'll allocate is 2**N bytes.
explicit SkVarAlloc(size_t minLgSize);
+ // Same as above, but first uses up to len bytes from storage.
+ SkVarAlloc(size_t minLgSize, char* storage, size_t len);
+
~SkVarAlloc();
// Returns contiguous bytes aligned at least for pointers. You may pass SK_MALLOC_THROW, etc.
« no previous file with comments | « src/core/SkRecord.cpp ('k') | src/core/SkVarAlloc.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698