Index: src/image/SkImage_Base.h |
diff --git a/src/image/SkImage_Base.h b/src/image/SkImage_Base.h |
index ade891f4cb3d54ff9264af8da3a8cc256192c4af..8dc2cb6eae9f0157af65c1827f0cb08151b24a8f 100644 |
--- a/src/image/SkImage_Base.h |
+++ b/src/image/SkImage_Base.h |
@@ -78,6 +78,10 @@ static inline SkImage_Base* as_IB(SkImage* image) { |
return static_cast<SkImage_Base*>(image); |
} |
+static inline SkImage_Base* as_IB(const sk_sp<SkImage>& image) { |
+ return static_cast<SkImage_Base*>(image.get()); |
+} |
+ |
static inline const SkImage_Base* as_IB(const SkImage* image) { |
return static_cast<const SkImage_Base*>(image); |
} |