diff options
author | Florin Malita <fmalita@chromium.org> | 2017-03-10 18:02:29 +0000 |
---|---|---|
committer | Skia Commit-Bot <skia-commit-bot@chromium.org> | 2017-03-10 18:02:40 +0000 |
commit | c337c9e02057fc61ef22ac80fa2e5f3dae92b498 (patch) | |
tree | 0195b4ba3355ccf1af9f5681509235f6392a4350 /src/gpu/text/GrTextBlobCache.cpp | |
parent | 053730de732922ecee21be665af111ce671ce045 (diff) |
Revert "Revert "Hold sk_sp<GrAtlasTextBlob> refs in GrTextBlobCache instead of raw ptrs""
This reverts commit 3304c447b953dad79fe7f355184ac13ed7e302e0.
Reason for revert: Fix for SkTHashMap issue landed
Original change's description:
> 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>
>
TBR=bsalomon@google.com,robertphillips@google.com,reviews@skia.org,fmalita@chromium.org,fmalita@google.com
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
Change-Id: I1ba50e3b574381717fbbf46b829d72aceff8f7fe
Reviewed-on: https://skia-review.googlesource.com/9535
Reviewed-by: Florin Malita <fmalita@chromium.org>
Commit-Queue: Florin Malita <fmalita@chromium.org>
Diffstat (limited to 'src/gpu/text/GrTextBlobCache.cpp')
-rw-r--r-- | src/gpu/text/GrTextBlobCache.cpp | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/src/gpu/text/GrTextBlobCache.cpp b/src/gpu/text/GrTextBlobCache.cpp index f6dac691f4..c53fcb0492 100644 --- a/src/gpu/text/GrTextBlobCache.cpp +++ b/src/gpu/text/GrTextBlobCache.cpp @@ -8,14 +8,13 @@ #include "GrTextBlobCache.h" GrTextBlobCache::~GrTextBlobCache() { - this->freeAll(); + SkDEBUGCODE(this->freeAll();) } void GrTextBlobCache::freeAll() { fBlobIDCache.foreach([this](uint32_t, BlobIDCacheEntry* entry) { - for (auto* blob : entry->fBlobs) { - fBlobList.remove(blob); - blob->unref(); + for (const auto& blob : entry->fBlobs) { + fBlobList.remove(blob.get()); } }); |