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

Unified Diff: src/gpu/GrMemoryPool.cpp

Issue 1552283002: Return 'correct' size from GrMemoryPool (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: tweak Created 4 years, 12 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/GrMemoryPool.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/gpu/GrMemoryPool.cpp
diff --git a/src/gpu/GrMemoryPool.cpp b/src/gpu/GrMemoryPool.cpp
index cc26452c19cc4c2b92de3f7458478141bca8a71f..1e005857b226a6932199695c6e4548ceadf24db9 100644
--- a/src/gpu/GrMemoryPool.cpp
+++ b/src/gpu/GrMemoryPool.cpp
@@ -21,7 +21,7 @@ GrMemoryPool::GrMemoryPool(size_t preallocSize, size_t minAllocSize) {
fMinAllocSize = GrSizeAlignUp(minAllocSize + kPerAllocPad, kAlignment),
fPreallocSize = GrSizeAlignUp(preallocSize + kPerAllocPad, kAlignment);
fPreallocSize = SkTMax(fPreallocSize, fMinAllocSize);
- fSize = fPreallocSize;
+ fSize = 0;
fHead = CreateBlock(fPreallocSize);
fTail = fHead;
@@ -165,6 +165,6 @@ void GrMemoryPool::validate() {
} while ((block = block->fNext));
SkASSERT(allocCount == fAllocationCnt);
SkASSERT(prev == fTail);
- SkASSERT(fAllocBlockCnt != 0 || fSize == fPreallocSize);
+ SkASSERT(fAllocBlockCnt != 0 || fSize == 0);
#endif
}
« no previous file with comments | « src/gpu/GrMemoryPool.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698