Index: src/image/SkImage.cpp |
diff --git a/src/image/SkImage.cpp b/src/image/SkImage.cpp |
index 09f7ecc4cf61f5fa4cebb234ebd7d081f89462b1..986fdec3a42dfa919fa9a4079c0e187597877130 100644 |
--- a/src/image/SkImage.cpp |
+++ b/src/image/SkImage.cpp |
@@ -371,6 +371,10 @@ bool SkImage::isLazyGenerated() const { |
return as_IB(this)->onIsLazyGenerated(); |
} |
+bool SkImage::isAlphaOnly() const { |
+ return as_IB(this)->onImageInfo().colorType() == kAlpha_8_SkColorType; |
+} |
+ |
////////////////////////////////////////////////////////////////////////////////////// |
#if !SK_SUPPORT_GPU |