use colortype instead of config
clone of https://codereview.chromium.org/305133006/
TBR=
BUG=skia:
Author: reed@google.com
Review URL: https://codereview.chromium.org/301233011
diff --git a/include/core/SkImageInfo.h b/include/core/SkImageInfo.h
index 8391954..d66158d 100644
--- a/include/core/SkImageInfo.h
+++ b/include/core/SkImageInfo.h
@@ -189,6 +189,14 @@
SkISize dimensions() const { return SkISize::Make(fWidth, fHeight); }
+ /**
+ * Return a new ImageInfo with the same colortype and alphatype as this info,
+ * but with the specified width and height.
+ */
+ SkImageInfo makeWH(int newWidth, int newHeight) const {
+ return SkImageInfo::Make(newWidth, newHeight, fColorType, fAlphaType);
+ }
+
int bytesPerPixel() const {
return SkColorTypeBytesPerPixel(fColorType);
}