Index: src/core/SkPaintPriv.cpp |
diff --git a/src/core/SkPaintPriv.cpp b/src/core/SkPaintPriv.cpp |
index c6957cd1cafe29ba19b76937a3d10999c7680927..3ced57392934e1f5b6a5fbb993c9c7f7be9acab9 100644 |
--- a/src/core/SkPaintPriv.cpp |
+++ b/src/core/SkPaintPriv.cpp |
@@ -9,6 +9,7 @@ |
#include "SkBitmap.h" |
#include "SkColorFilter.h" |
+#include "SkImage.h" |
#include "SkPaint.h" |
#include "SkShader.h" |
@@ -49,3 +50,8 @@ bool isPaintOpaque(const SkPaint* paint, const SkBitmap* bmpReplacesShader) { |
return isPaintOpaque(paint, contentType); |
} |
+ |
+bool isPaintOpaque(const SkPaint* paint, const SkImage* image) { |
+ return isPaintOpaque(paint, image->isOpaque() ? |
+ kOpaque_SkPaintBitmapOpacity : kUnknown_SkPaintBitmapOpacity); |
+} |