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

Unified Diff: src/gpu/GrAllocator.h

Issue 23566022: move GrMalloc, GrFree, Gr_bzero to their sk equivalents (Closed) Base URL: https://skia.googlecode.com/svn/trunk
Patch Set: Created 7 years, 3 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/gpu/GrAllocPool.cpp ('k') | src/gpu/GrAtlas.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/gpu/GrAllocator.h
diff --git a/src/gpu/GrAllocator.h b/src/gpu/GrAllocator.h
index 57ca03cd329cf520d178920778da6953e7acedbd..23bb6b76c9ddb4c83621fc10c36a66d16ab551fd 100755
--- a/src/gpu/GrAllocator.h
+++ b/src/gpu/GrAllocator.h
@@ -49,9 +49,9 @@ public:
// we always have at least one block
if (0 == indexInBlock) {
if (0 != fCount) {
- fBlocks.push_back() = GrMalloc(fBlockSize);
+ fBlocks.push_back() = sk_malloc_throw(fBlockSize);
} else if (fOwnFirstBlock) {
- fBlocks[0] = GrMalloc(fBlockSize);
+ fBlocks[0] = sk_malloc_throw(fBlockSize);
}
}
void* ret = (char*)fBlocks[fCount/fItemsPerBlock] +
@@ -67,10 +67,10 @@ public:
int blockCount = GrMax((unsigned)1,
GrUIDivRoundUp(fCount, fItemsPerBlock));
for (int i = 1; i < blockCount; ++i) {
- GrFree(fBlocks[i]);
+ sk_free(fBlocks[i]);
}
if (fOwnFirstBlock) {
- GrFree(fBlocks[0]);
+ sk_free(fBlocks[0]);
fBlocks[0] = NULL;
}
fBlocks.pop_back_n(blockCount-1);
« no previous file with comments | « src/gpu/GrAllocPool.cpp ('k') | src/gpu/GrAtlas.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698