Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(312)

Unified Diff: src/image/SkImage.cpp

Issue 2239723002: fix memory leak, remake Imageshader to use sk_sp (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 4 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | src/image/SkImageShader.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/image/SkImage.cpp
diff --git a/src/image/SkImage.cpp b/src/image/SkImage.cpp
index 921bc6f5d7bf99860709f18a355b2e449f7d2308..9febeaa96e12daf5d4d962a755688dd35562e97b 100644
--- a/src/image/SkImage.cpp
+++ b/src/image/SkImage.cpp
@@ -108,7 +108,7 @@ void SkImage::preroll(GrContext* ctx) const {
sk_sp<SkShader> SkImage::makeShader(SkShader::TileMode tileX, SkShader::TileMode tileY,
const SkMatrix* localMatrix) const {
- return SkImageShader::Make(this, tileX, tileY, localMatrix);
+ return SkImageShader::Make(sk_ref_sp(const_cast<SkImage*>(this)), tileX, tileY, localMatrix);
}
#ifdef SK_SUPPORT_LEGACY_CREATESHADER_PTR
« no previous file with comments | « no previous file | src/image/SkImageShader.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698