Index: src/core/SkBitmap.cpp |
diff --git a/src/core/SkBitmap.cpp b/src/core/SkBitmap.cpp |
index bff08801fc1cf069ed8ada3607d7bcd8dfb5117d..2fae75ae3841dd39d53c305ee83f70b8ae806fe5 100644 |
--- a/src/core/SkBitmap.cpp |
+++ b/src/core/SkBitmap.cpp |
@@ -11,6 +11,7 @@ |
#include "SkColorPriv.h" |
#include "SkDither.h" |
#include "SkFlattenable.h" |
+#include "SkImagePriv.h" |
#include "SkMallocPixelRef.h" |
#include "SkMask.h" |
#include "SkOrderedReadBuffer.h" |
@@ -332,6 +333,11 @@ BAD_CONFIG: |
return false; |
} |
+bool SkBitmap::setConfig(const SkImageInfo& info, size_t rowBytes) { |
+ return this->setConfig(SkImageInfoToBitmapConfig(info), info.fWidth, |
+ info.fHeight, rowBytes, info.fAlphaType); |
+} |
+ |
bool SkBitmap::setAlphaType(SkAlphaType alphaType) { |
if (!validate_alphaType(this->config(), alphaType, &alphaType)) { |
return false; |