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

Unified Diff: src/gpu/GrAllocPool.cpp

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 | « include/gpu/GrTypes.h ('k') | src/gpu/GrAllocator.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/gpu/GrAllocPool.cpp
diff --git a/src/gpu/GrAllocPool.cpp b/src/gpu/GrAllocPool.cpp
index 127511f16487f2fd1e50344c282812302a4300cc..d7b553176d8eb4eee947a33021110a4e685b9c93 100644
--- a/src/gpu/GrAllocPool.cpp
+++ b/src/gpu/GrAllocPool.cpp
@@ -20,7 +20,7 @@ struct GrAllocPool::Block {
static Block* Create(size_t size, Block* next) {
SkASSERT(size >= GrAllocPool_MIN_BLOCK_SIZE);
- Block* block = (Block*)GrMalloc(sizeof(Block) + size);
+ Block* block = (Block*)sk_malloc_throw(sizeof(Block) + size);
block->fNext = next;
block->fPtr = (char*)block + sizeof(Block);
block->fBytesFree = size;
@@ -69,7 +69,7 @@ void GrAllocPool::reset() {
Block* block = fBlock;
while (block) {
Block* next = block->fNext;
- GrFree(block);
+ sk_free(block);
block = next;
}
fBlock = NULL;
@@ -94,7 +94,7 @@ void GrAllocPool::release(size_t bytes) {
bytes = fBlock->release(bytes);
if (fBlock->empty()) {
Block* next = fBlock->fNext;
- GrFree(fBlock);
+ sk_free(fBlock);
fBlock = next;
SkDEBUGCODE(fBlocksAllocated -= 1;)
}
« no previous file with comments | « include/gpu/GrTypes.h ('k') | src/gpu/GrAllocator.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698