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

Side by Side Diff: src/gpu/text/GrTextBlobCache.cpp

Issue 1555993005: Add assert that memory pool is empty when GrTextBlobCache frees (Closed) Base URL: https://skia.googlesource.com/skia.git@minor-mempoolfix
Patch Set: Created 4 years, 11 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 unified diff | Download patch
« no previous file with comments | « src/gpu/GrDrawingManager.cpp ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright 2015 Google Inc. 2 * Copyright 2015 Google Inc.
3 * 3 *
4 * Use of this source code is governed by a BSD-style license that can be 4 * Use of this source code is governed by a BSD-style license that can be
5 * found in the LICENSE file. 5 * found in the LICENSE file.
6 */ 6 */
7 7
8 #include "GrTextBlobCache.h" 8 #include "GrTextBlobCache.h"
9 9
10 static const int kVerticesPerGlyph = 4; 10 static const int kVerticesPerGlyph = 4;
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after
48 48
49 void GrTextBlobCache::freeAll() { 49 void GrTextBlobCache::freeAll() {
50 SkTDynamicHash<GrAtlasTextBlob, GrAtlasTextBlob::Key>::Iter iter(&fCache); 50 SkTDynamicHash<GrAtlasTextBlob, GrAtlasTextBlob::Key>::Iter iter(&fCache);
51 while (!iter.done()) { 51 while (!iter.done()) {
52 GrAtlasTextBlob* blob = &(*iter); 52 GrAtlasTextBlob* blob = &(*iter);
53 fBlobList.remove(blob); 53 fBlobList.remove(blob);
54 blob->unref(); 54 blob->unref();
55 ++iter; 55 ++iter;
56 } 56 }
57 fCache.rewind(); 57 fCache.rewind();
58
59 // There should be no allocations in the memory pool at this point
60 SkASSERT(fPool.isEmpty());
58 } 61 }
OLDNEW
« no previous file with comments | « src/gpu/GrDrawingManager.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698