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

Unified Diff: src/core/SkSmallAllocator.h

Issue 2249703002: add gm that exercises compose shader allocations (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 4 years, 4 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 | « gm/composeshader.cpp ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/core/SkSmallAllocator.h
diff --git a/src/core/SkSmallAllocator.h b/src/core/SkSmallAllocator.h
index 22baa898ea21a712a2aa4b596b84ce4114c44b80..9095fa57fc11fde0022c023f5e8341d7dae819dd 100644
--- a/src/core/SkSmallAllocator.h
+++ b/src/core/SkSmallAllocator.h
@@ -80,10 +80,12 @@ public:
const size_t storageRemaining = sizeof(fStorage) - fStorageUsed;
Rec* rec = &fRecs[fNumObjects];
if (storageRequired > storageRemaining) {
- // Allocate on the heap. Ideally we want to avoid this situation,
- // but we're not sure we can catch all callers, so handle it but
- // assert false in debug mode.
- SkASSERT(false);
+ // Allocate on the heap. Ideally we want to avoid this situation.
+
+ // With the gm composeshader_bitmap2, storage required is 4476
+ // and storage remaining is 3392. Increasing the base storage
+ // causes google 3 tests to fail.
+
rec->fStorageSize = 0;
rec->fHeapStorage = sk_malloc_throw(storageRequired);
rec->fObj = static_cast<void*>(rec->fHeapStorage);
« no previous file with comments | « gm/composeshader.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698