Index: src/core/SkBitmap.cpp |
diff --git a/src/core/SkBitmap.cpp b/src/core/SkBitmap.cpp |
index 151ab50290f53359b3103a364757b452e6dee469..b6c2e2f65ccd4dc8e4cd50e883c6586df94f0d1a 100644 |
--- a/src/core/SkBitmap.cpp |
+++ b/src/core/SkBitmap.cpp |
@@ -519,6 +519,16 @@ bool SkBitmap::installPixels(const SkImageInfo& info, void* pixels, size_t rb, |
return true; |
} |
+bool SkBitmap::installMaskPixels(const SkMask& mask) { |
+ if (SkMask::kA8_Format != mask.fFormat) { |
+ this->reset(); |
+ return false; |
+ } |
+ return this->installPixels(SkImageInfo::MakeA8(mask.fBounds.width(), |
+ mask.fBounds.height()), |
+ mask.fImage, mask.fRowBytes); |
+} |
+ |
bool SkBitmap::allocConfigPixels(Config config, int width, int height, |
bool isOpaque) { |
SkColorType ct; |