aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/gpu/text/GrTextBlobCache.cpp
diff options
context:
space:
mode:
authorGravatar Florin Malita <fmalita@google.com>2017-03-09 22:42:58 +0000
committerGravatar Skia Commit-Bot <skia-commit-bot@chromium.org>2017-03-09 22:43:05 +0000
commit3304c447b953dad79fe7f355184ac13ed7e302e0 (patch)
treebc1f96794e5807b231a29a72b45718386788f3d5 /src/gpu/text/GrTextBlobCache.cpp
parente03c3e5edcbcb53dcef9729ddd6bef07dc750645 (diff)
Revert "Hold sk_sp<GrAtlasTextBlob> refs in GrTextBlobCache instead of raw ptrs"
This reverts commit db3ceb86421fb9da86bb920e3a1f0957beec08d9. Reason for revert: observing some strange budget behavior w/ instrumented Chromium builds; need to investigate. Original change's description: > Hold sk_sp<GrAtlasTextBlob> refs in GrTextBlobCache instead of raw ptrs > > Refactor to store sk_sps, and minimize explicit ref manipulation. > > Change-Id: Ie3d18e5fe1cefbbc5c2f3c4941287a24038522a6 > Reviewed-on: https://skia-review.googlesource.com/9490 > Commit-Queue: Florin Malita <fmalita@chromium.org> > Reviewed-by: Brian Salomon <bsalomon@google.com> > TBR=bsalomon@google.com,robertphillips@google.com,fmalita@chromium.org,reviews@skia.org NOPRESUBMIT=true NOTREECHECKS=true NOTRY=true Change-Id: I8ca9862ad1519a9ec69ad1ce8e4d129b0dae7b0a Reviewed-on: https://skia-review.googlesource.com/9524 Reviewed-by: Florin Malita <fmalita@google.com> Commit-Queue: Florin Malita <fmalita@google.com>
Diffstat (limited to 'src/gpu/text/GrTextBlobCache.cpp')
-rw-r--r--src/gpu/text/GrTextBlobCache.cpp7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/gpu/text/GrTextBlobCache.cpp b/src/gpu/text/GrTextBlobCache.cpp
index c53fcb0492..f6dac691f4 100644
--- a/src/gpu/text/GrTextBlobCache.cpp
+++ b/src/gpu/text/GrTextBlobCache.cpp
@@ -8,13 +8,14 @@
#include "GrTextBlobCache.h"
GrTextBlobCache::~GrTextBlobCache() {
- SkDEBUGCODE(this->freeAll();)
+ this->freeAll();
}
void GrTextBlobCache::freeAll() {
fBlobIDCache.foreach([this](uint32_t, BlobIDCacheEntry* entry) {
- for (const auto& blob : entry->fBlobs) {
- fBlobList.remove(blob.get());
+ for (auto* blob : entry->fBlobs) {
+ fBlobList.remove(blob);
+ blob->unref();
}
});