blob: ce74977e49fa1b65628706f216acf8a337b2a9a3 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
|
/*
* Copyright 2015 Google Inc.
*
* Use of this source code is governed by a BSD-style license that can be
* found in the LICENSE file.
*/
#include "GrTextBlobCache.h"
GrTextBlobCache::~GrTextBlobCache() {
this->freeAll();
}
void GrTextBlobCache::freeAll() {
SkTDynamicHash<GrAtlasTextBlob, GrAtlasTextBlob::Key>::Iter iter(&fCache);
while (!iter.done()) {
GrAtlasTextBlob* blob = &(*iter);
fBlobList.remove(blob);
blob->unref();
++iter;
}
fCache.rewind();
// There should be no allocations in the memory pool at this point
SkASSERT(fPool.isEmpty());
}
|