Fix memory leak in https://skia-review.googlesource.com/c/4227/ (Back SkSpecialImage_Gpu with a GrTextureProxy)

GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2472703005

Review-Url: https://codereview.chromium.org/2472703005
This commit is contained in:
robertphillips 2016-11-02 11:48:43 -07:00 committed by Commit bot
parent 86c2c0f077
commit c3f4bf7ab3

View File

@ -65,8 +65,7 @@ sk_sp<GrTextureProxy> GrTextureProxy::Make(GrTextureProvider* texProvider,
size_t rowBytes) {
if (srcData) {
// If we have srcData, for now, we create a wrapped GrTextureProxy
sk_sp<GrTexture> tex = sk_ref_sp(texProvider->createTexture(desc, budgeted,
srcData, rowBytes));
sk_sp<GrTexture> tex(texProvider->createTexture(desc, budgeted, srcData, rowBytes));
return GrTextureProxy::Make(std::move(tex));
}