diff options
author | Brian Salomon <bsalomon@google.com> | 2018-05-24 14:08:31 -0400 |
---|---|---|
committer | Skia Commit-Bot <skia-commit-bot@chromium.org> | 2018-05-24 19:34:19 +0000 |
commit | 8a8dd33e18ce6946913247732273b1cd48ba0433 (patch) | |
tree | 5782976128037e3cecc5041c973a741fa647ee3f /gm/image_pict.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 'gm/image_pict.cpp')
-rw-r--r-- | gm/image_pict.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/gm/image_pict.cpp b/gm/image_pict.cpp index f244fe8f35..11bb902291 100644 --- a/gm/image_pict.cpp +++ b/gm/image_pict.cpp @@ -287,9 +287,9 @@ protected: } // No API to draw a GrTexture directly, so we cheat and create a private image subclass - sk_sp<SkImage> texImage(new SkImage_Gpu(canvas->getGrContext(), image->uniqueID(), - kPremul_SkAlphaType, std::move(proxy), - std::move(texColorSpace), SkBudgeted::kNo)); + sk_sp<SkImage> texImage(new SkImage_Gpu( + sk_ref_sp(canvas->getGrContext()), image->uniqueID(), kPremul_SkAlphaType, + std::move(proxy), std::move(texColorSpace), SkBudgeted::kNo)); canvas->drawImage(texImage.get(), x, y); #endif } |