diff options
author | 2018-05-24 14:08:31 -0400 | |
---|---|---|
committer | 2018-05-24 19:34:19 +0000 | |
commit | 8a8dd33e18ce6946913247732273b1cd48ba0433 (patch) | |
tree | 5782976128037e3cecc5041c973a741fa647ee3f /tools/gpu/GrTest.cpp | |
parent | 3a2cb1accd51e85e19fd672a793296239e9913e3 (diff) |
Make SkImage own its GrContext.
Change-Id: I86577fab5406ae9ad89d87fa971b0db6e0283cb4
Reviewed-on: https://skia-review.googlesource.com/130020
Commit-Queue: Brian Salomon <bsalomon@google.com>
Reviewed-by: Robert Phillips <robertphillips@google.com>
Diffstat (limited to 'tools/gpu/GrTest.cpp')
-rw-r--r-- | tools/gpu/GrTest.cpp | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/tools/gpu/GrTest.cpp b/tools/gpu/GrTest.cpp index ec07758db2..f3630ff721 100644 --- a/tools/gpu/GrTest.cpp +++ b/tools/gpu/GrTest.cpp @@ -137,8 +137,9 @@ sk_sp<SkImage> GrContextPriv::getFontAtlasImage_ForTesting(GrMaskFormat format, } SkASSERT(proxies[index]->priv().isExact()); - sk_sp<SkImage> image(new SkImage_Gpu(fContext, kNeedNewImageUniqueID, kPremul_SkAlphaType, - proxies[index], nullptr, SkBudgeted::kNo)); + sk_sp<SkImage> image(new SkImage_Gpu(sk_ref_sp(fContext), kNeedNewImageUniqueID, + kPremul_SkAlphaType, proxies[index], nullptr, + SkBudgeted::kNo)); return image; } |